commit 1db49a97dad6fdb0254ab97384465f5b5f8f2873
Author: Marek Sobota <sobotama@students.zcu.cz>
Date:   Thu May 9 18:31:27 2019 +0200

    Uprava terminologie a odstraneni prebytecnych souboru (Re #7320)

diff --git a/src/gui/Window.java b/src/gui/Window.java
index e632081..5221094 100644
--- a/src/gui/Window.java
+++ b/src/gui/Window.java
@@ -51,7 +51,7 @@ public class Window extends JFrame{
 	private static final Dimension OUTPUT_WINDOW_MIN_DIM = new Dimension(320, 160);
 	
 	/**konstanta pro oznaceni souboru se spoji*/
-	private static final int SPOJ_FILE = 0;
+	private static final int SEZNAM_LINEK_FILE = 0;
 	
 	/**konstanta pro oznaceni slozky JDF*/
 	private static final int JDF_DIR = 1;
@@ -71,9 +71,6 @@ public class Window extends JFrame{
 	/**konstanta pro nazev souboru caskody*/
 	private static final String CASKODY = "caskody.txt";
 	
-	/**konstanta pro nazev souboru linky*/
-	private static final String LINKY = "linky.txt";
-	
 	/**konstanta pro nazev souboru pevnykod*/
 	private static final String PEVNY_KOD = "pevnykod.txt";
 	
@@ -84,7 +81,7 @@ public class Window extends JFrame{
 	public static final DateFormat df = new SimpleDateFormat("yyyy/MM/dd");
 	
 	/**atribut se souborem se spoji*/
-	private File spojFile = null;
+	private File linkyFile = null;
 	
 	/**atribut se slozkou JDF*/
 	private File jdfDir = null;
@@ -117,7 +114,7 @@ public class Window extends JFrame{
 	private JDatePickerImpl datePickerTo;
 	
 	/**TextField pro zobrazeni cesty k souboru se spojema*/
-	private JTextField spojPathTF;
+	private JTextField linkyPathTF;
 	
 	/**TextField pro zobrazeni cesty k slozce JDF*/
 	private JTextField jdfPathTF;
@@ -169,7 +166,7 @@ public class Window extends JFrame{
 		JButton spojBT = new JButton("Vybrat spoj soubor");
 		JButton jdfBT = new JButton("Vybrat JDF slozku");
 		JButton outputBT = new JButton("Vybrat vystupni slozku");
-		spojPathTF = new JTextField(TEXT_FIELD_LENGTH);
+		linkyPathTF = new JTextField(TEXT_FIELD_LENGTH);
 		jdfPathTF = new JTextField(TEXT_FIELD_LENGTH);
 		outputPathTF = new JTextField(TEXT_FIELD_LENGTH);
 		outputNameTF = new JTextField(TEXT_FIELD_LENGTH);
@@ -179,7 +176,7 @@ public class Window extends JFrame{
 		initDatePicker();
 		
 		//nastaveni komponent
-		spojPathTF.setEditable(false);
+		linkyPathTF.setEditable(false);
 		jdfPathTF.setEditable(false);
 		outputPathTF.setEditable(false);
 		outputNameTF.setText("Nazev souboru");
@@ -201,7 +198,7 @@ public class Window extends JFrame{
 				System.exit(0);
 			}
 		});
-		spojBT.addActionListener(new FileChooserListener(SPOJ_FILE));
+		spojBT.addActionListener(new FileChooserListener(SEZNAM_LINEK_FILE));
 		jdfBT.addActionListener(new FileChooserListener(JDF_DIR));
 		outputBT.addActionListener(new FileChooserListener(OUTPUT_DIR));
 		
@@ -216,7 +213,7 @@ public class Window extends JFrame{
 		dateToP.add(dateToLB);	
 		dateToP.add(datePickerTo);
 		spojPathP.add(spojPathLB);
-		spojPathP.add(spojPathTF);
+		spojPathP.add(linkyPathTF);
 		spojPathP.add(spojBT);
 		jdfPathP.add(jdfPathLB);
 		jdfPathP.add(jdfPathTF);
@@ -334,7 +331,7 @@ public class Window extends JFrame{
 		 * kontrola jestli jsou obdobi zadana a ve spravnem poradi a jestli jsou cesty vyplněny
 		 */
 		private boolean inputCheck(){
-			if(spojFile == null || jdfDir == null || outputFile == null){
+			if(linkyFile == null || jdfDir == null || outputFile == null){
 				JOptionPane.showMessageDialog(null, "Nejsou vybrany potrebne soubory/slozky", 
 						"Varovani", JOptionPane.WARNING_MESSAGE);
 				return false;
@@ -400,14 +397,13 @@ public class Window extends JFrame{
 			if(option == JFileChooser.APPROVE_OPTION){
 				File selectedFile = fileChooser.getSelectedFile();
 				
-				if(selectedFile.isFile() && fileType == SPOJ_FILE && selectedFile.getName().endsWith(".txt")){
-					spojFile = selectedFile;
-					spojPathTF.setText(spojFile.getAbsolutePath());
+				if(selectedFile.isFile() && fileType == SEZNAM_LINEK_FILE && selectedFile.getName().endsWith(".txt")){
+					linkyFile = selectedFile;
+					linkyPathTF.setText(linkyFile.getAbsolutePath());
 				}
 				else if(selectedFile.isDirectory() && fileType == JDF_DIR){
 					//overi existenci potrebnych souboru ve slozce
 					File caskody = new File(selectedFile.getAbsolutePath() + File.separator + CASKODY);
-					File linky = new File(selectedFile.getAbsolutePath() + File.separator + LINKY);
 					File pevnyKod = new File(selectedFile.getAbsolutePath() + File.separator + PEVNY_KOD);
 					File spoje = new File(selectedFile.getAbsolutePath() + File.separator + SPOJE);
 					if(!caskody.exists()){
@@ -415,11 +411,6 @@ public class Window extends JFrame{
 								"Varovani", JOptionPane.WARNING_MESSAGE);
 						return;
 					}
-					if(!linky.exists()){
-						JOptionPane.showMessageDialog(null, "Ve slozce se nenachazi soubor " + LINKY, 
-								"Varovani", JOptionPane.WARNING_MESSAGE);
-						return;
-					}
 					if(!pevnyKod.exists()){
 						JOptionPane.showMessageDialog(null, "Ve slozce se nenachazi soubor " + PEVNY_KOD, 
 								"Varovani", JOptionPane.WARNING_MESSAGE);
