commit d2be23a318a5d53fb878507dc974577c9b094298
Author: horkmi <horkmi@students.zcu.cz>
Date:   Sun Apr 26 18:02:36 2020 +0200

    Přejmenovaná třída

diff --git a/project/Deserializer/app.config b/project/Deserializer/app.config
index 6d712bc..ac967cd 100644
--- a/project/Deserializer/app.config
+++ b/project/Deserializer/app.config
@@ -1 +1,6 @@
-#Sun Apr 26 09:18:07 CEST 2020
+#Sun Apr 26 17:57:34 CEST 2020
+db_type=MySQL
+ace_theme=ambiance
+ace_mode=java
+db_user=
+db_url=
diff --git a/project/Deserializer/src/CLI.java b/project/Deserializer/src/CLI.java
index 4714f44..c1da7d8 100644
--- a/project/Deserializer/src/CLI.java
+++ b/project/Deserializer/src/CLI.java
@@ -106,7 +106,7 @@ public class CLI implements IConversionResults {
 	
 	public static void main(String[] args) {
 		if (args.length == 0) {
-			Application.launch(Deserializer.class, args);
+			Application.launch(Window.class, args);
 		} else {
 			String input = null, output = null;
 			
diff --git a/project/Deserializer/src/Deserializer.java b/project/Deserializer/src/Deserializer.java
deleted file mode 100644
index 5bfdfca..0000000
--- a/project/Deserializer/src/Deserializer.java
+++ /dev/null
@@ -1,419 +0,0 @@
-import java.io.File;
-import java.util.Properties;
-
-import io.Database.DB_Messenger;
-import io.FileWorker;
-import javafx.application.Application;
-import javafx.application.Platform;
-import javafx.collections.FXCollections;
-import javafx.collections.ObservableList;
-import javafx.geometry.Insets;
-import javafx.geometry.Pos;
-import javafx.scene.Node;
-import javafx.scene.Parent;
-import javafx.scene.Scene;
-import javafx.scene.control.Button;
-import javafx.scene.control.ComboBox;
-import javafx.scene.control.Label;
-import javafx.scene.control.Menu;
-import javafx.scene.control.MenuBar;
-import javafx.scene.control.MenuItem;
-import javafx.scene.control.PasswordField;
-import javafx.scene.control.Separator;
-import javafx.scene.control.SeparatorMenuItem;
-import javafx.scene.control.Tab;
-import javafx.scene.control.TabPane;
-import javafx.scene.control.TabPane.TabClosingPolicy;
-import javafx.scene.control.TextField;
-import javafx.scene.image.Image;
-import javafx.scene.image.ImageView;
-import javafx.scene.input.KeyCode;
-import javafx.scene.input.KeyCodeCombination;
-import javafx.scene.input.KeyCombination;
-import javafx.scene.layout.BorderPane;
-import javafx.scene.layout.HBox;
-import javafx.scene.layout.Priority;
-import javafx.scene.layout.VBox;
-import javafx.stage.FileChooser;
-import javafx.stage.Stage;
-
-/**
- * VM arguments for Java 11: --module-path libs\javafx-sdk-11.0.2\lib --add-modules=javafx.controls
- */
-public class Deserializer extends Application implements IConversionResults {
-	
-	private Stage stage;
-	private Label fullScreen;
-	
-	private Editor editor;
-	private VBox outputLayout;
-	
-	private Converter converter;
-	private Properties properties;
-	
-	@Override
-	public void init() throws Exception {
-		super.init();
-		converter = new Converter(this);
-		converter.start();
-		properties = FileWorker.getConfig();
-	}
-	
-	@Override
-	public void stop() throws Exception {
-		super.stop();
-		converter.end();
-		converter.join();
-		FileWorker.saveConfig(properties);
-		Platform.exit();
-	}
-	
-	@Override
-	public void start(Stage stage) throws Exception {
-		this.stage = stage;
-		stage.getIcons().add(new Image(FileWorker.getResource("/logo.png")));
-		stage.setTitle("Java Object Universal Deserializer");
-		stage.setScene(createScene());
-		stage.show();
-		
-		stage.setMinWidth(stage.getWidth());
-		stage.setMinHeight(stage.getHeight());
-
-		stage.fullScreenProperty().addListener((obs, oldState, newState) -> {
-			changeFullScreenMenuItem();
-		});
-	}
-	
-	private Scene createScene() {
-		createMenu();
-		Scene scene = new Scene(createLayout());
-		scene.getStylesheets().add(FileWorker.getResource("/main.css"));
-		return scene;
-	}
-	
-	private Parent createLayout() {
-		BorderPane layout = new BorderPane();
-		
-		layout.setTop(createMenu());
-		layout.setCenter(createBodyLayout());
-		
-		return layout;
-	}
-	
-	private Node createBodyLayout() {
-		TabPane header = new TabPane();
-        header.setTabClosingPolicy(TabClosingPolicy.UNAVAILABLE);
-        header.getTabs().add(createInputFileTab());
-        header.getTabs().add(createQueryTab());
-        
-        
-        editor = new Editor();
-        
-        String propMode = properties.getProperty(FileWorker.ACE_MODE);
-        String propTheme = properties.getProperty(FileWorker.ACE_THEME);
-        
-        ObservableList<String> aceModes = FXCollections.observableArrayList();
-        ObservableList<String> aceThemes = FXCollections.observableArrayList();
-        FileWorker.getAceModesAndThemes(aceModes, aceThemes);
-        
-        ComboBox<String> modeBox = new ComboBox<String>();
-        modeBox.setItems(aceModes);
-        modeBox.getSelectionModel().select(propMode == null ? Editor.DEFAULT_MODE : propMode);
-        modeBox.getSelectionModel().selectedItemProperty().addListener((observable, oldValue, newValue) -> {
-        	if (modeBox.getValue() != null) {
-        		properties.setProperty(FileWorker.ACE_MODE, modeBox.getValue());
-        		editor.setMode(modeBox.getValue());
-            }
-        });
-        
-        ComboBox<String> themeBox = new ComboBox<String>();
-        themeBox.setItems(aceThemes);
-        themeBox.getSelectionModel().select(propTheme == null ? Editor.DEFAULT_THEME : propTheme);
-        themeBox.getSelectionModel().selectedItemProperty().addListener((observable, oldValue, newValue) -> {
-        	if (themeBox.getValue() != null) {
-        		properties.setProperty(FileWorker.ACE_THEME, themeBox.getValue());
-        		editor.setTheme(themeBox.getValue());
-            }
-        });
-        
-        HBox aceSettings = new HBox();
-        aceSettings.setPadding(new Insets(0, 10, 0, 0));
-        aceSettings.setSpacing(10.0);
-        aceSettings.setAlignment(Pos.CENTER_RIGHT);
-        aceSettings.getChildren().addAll(new Label("Nastavení editoru (režim / téma):"), modeBox, new Label("/"), themeBox);
-        
-        VBox editorLayout = new VBox();
-        editorLayout.setSpacing(5.0);
-        editorLayout.getChildren().addAll(editor.getView(), aceSettings);
-        
-        
-		Label forOutputFile = new Label("Výstupní soubor:");
-		Label outputFile = new Label("    Ještě nebyl vybrán žádný soubor...");
-		outputFile.setStyle("-fx-font-style: italic;");
-		
-		Button save = new Button("Uložit");
-		save.setOnAction(event -> {
-			File jsonFile = null;
-			
-			FileChooser fCh = new FileChooser();
-			fCh.setInitialDirectory(new File("."));
-			fCh.getExtensionFilters().add(new FileChooser.ExtensionFilter("JSON Files", "*.json"));
-			File file = fCh.showSaveDialog(stage);
-			if (file != null) {
-				jsonFile = file;
-				outputFile.setText(file.getAbsolutePath());
-				outputFile.setStyle("-fx-font-weight: bold;");
-			}
-			
-			if (jsonFile != null) {
-				String title = "Uložení JSON";
-				try {
-					FileWorker.saveJson(jsonFile, editor.getJson());
-					Report.info(title, null, "Uložení JSON souboru proběhlo v pořádku.");
-				} catch (Exception e) {
-					Report.error(title, null, "Při ukládání JSON souboru nastala chyba.");
-				}
-			}
-		});
-		
-		HBox bOF = new HBox();
-		bOF.setAlignment(Pos.CENTER_RIGHT);
-		bOF.getChildren().add(save);
-		
-		outputLayout = new VBox();
-		outputLayout.setPadding(new Insets(0, 10, 10, 10));
-		outputLayout.setSpacing(5.0);
-		outputLayout.getChildren().add(forOutputFile);
-		outputLayout.getChildren().add(outputFile);
-		outputLayout.getChildren().add(bOF);
-		setOutputLayoutDisabled(true);
-		
-		
-		VBox layout = new VBox();
-		layout.setSpacing(10.0);
-		VBox.setVgrow(editor.getView(), Priority.ALWAYS);
-		layout.getChildren().addAll(header, new Separator(), editorLayout, new Separator(), outputLayout);
-		
-		return layout;
-	}
-	
-	private Tab createQueryTab() {
-		String propType = properties.getProperty(FileWorker.DB_TYPE);
-		String propUrl = properties.getProperty(FileWorker.DB_URL);
-		String propUser = properties.getProperty(FileWorker.DB_USER);
-        
-		
-		String promptTexts[] = new String[] { "jdbc:mysql://server/nazevDB", "jdbc:oracle:thin:@server:port:nazevDB" };
-		
-		Label rdbmsLabel = new Label("Typ DB");
-		Label urlLabel = new Label("URL");
-		ComboBox<String> rdbms = new ComboBox<String>(FXCollections.observableArrayList(new String[] { "MySQL", "ORACLE" }));
-		TextField url = new TextField(propUrl == null ? "" : propUrl);
-		
-		if (propType == null) {
-			rdbms.getSelectionModel().selectFirst();
-			url.setPromptText(promptTexts[0]);
-		} else {
-			rdbms.getSelectionModel().select(propType);
-			url.setPromptText(promptTexts[rdbms.getItems().indexOf(propType)]);
-		}
-		rdbms.setOnAction(event -> {
-			url.setPromptText(promptTexts[rdbms.getSelectionModel().getSelectedIndex()]);
-		});
-		
-		
-
-		
-		Label userLabel = new Label("Uživatel");
-		Label passwordLabel = new Label("Heslo");
-		TextField user = new TextField(propUser == null ? "" : propUser);
-		PasswordField password = new PasswordField();
-		
-		VBox rdbmsLayout = new VBox();
-		rdbmsLayout.getChildren().addAll(rdbmsLabel, rdbms);
-		VBox urlLayout = new VBox();
-		urlLayout.getChildren().addAll(urlLabel, url);
-		VBox userLayout = new VBox();
-		userLayout.getChildren().addAll(userLabel, user);
-		VBox passwordLayout = new VBox();
-		passwordLayout.getChildren().addAll(passwordLabel, password);
-		
-		rdbmsLabel.setStyle("-fx-font-weight: bold;");
-		urlLabel.setStyle("-fx-font-weight: bold;");
-		userLabel.setStyle("-fx-font-weight: bold;");
-		passwordLabel.setStyle("-fx-font-weight: bold;");
-		
-		url.setMinWidth(400);
-		user.setMinWidth(100);
-		user.setPrefWidth(200);
-		user.setMaxWidth(300);
-		password.setMinWidth(100);
-		password.setPrefWidth(200);
-		password.setMaxWidth(300);
-	
-		HBox.setHgrow(urlLayout, Priority.ALWAYS);
-		
-		HBox connLayout = new HBox();
-		connLayout.setSpacing(10);
-		connLayout.getChildren().addAll(rdbmsLayout, urlLayout, userLayout, passwordLayout);
-		
-		
-		Label select = new Label("SELECT"), from = new Label("FROM"), where = new Label("WHERE"), queryEnd = new Label(";");
-		TextField column = new TextField(), table = new TextField(), cond = new TextField();
-		
-		select.setStyle("-fx-font-weight: bold;");
-		from.setStyle("-fx-font-weight: bold;");
-		where.setStyle("-fx-font-weight: bold;");
-		queryEnd.setStyle("-fx-font-weight: bold;");
-		
-		column.setPromptText("sloupec");
-		table.setPromptText("tabulka");
-		cond.setPromptText("podminka");
-		
-		HBox.setHgrow(column, Priority.ALWAYS);
-		HBox.setHgrow(table, Priority.ALWAYS);
-		HBox.setHgrow(cond, Priority.ALWAYS);
-		
-		HBox queryLayout = new HBox();
-		queryLayout.setAlignment(Pos.CENTER);
-		queryLayout.setSpacing(5.0);
-		queryLayout.getChildren().addAll(select, column, from, table, where, cond, queryEnd);
-		
-		Button setQuery = new Button("Spustit");
-		setQuery.setOnAction(event -> {
-			String urlStr = url.getText().trim();
-			String userStr = user.getText().trim();
-			properties.setProperty(FileWorker.DB_TYPE, rdbms.getValue());
-			properties.setProperty(FileWorker.DB_URL, urlStr);
-			properties.setProperty(FileWorker.DB_USER, userStr);
-			
-			String driver = rdbms.getValue().equals("MySQL") ? "com.mysql.cj.jdbc.Driver" : "oracle.jdbc.driver.OracleDriver";
-			converter.setInput(null, new DB_Messenger(driver, urlStr, userStr, password.getText().trim(),
-					table.getText().trim(), cond.getText().trim(), column.getText().trim()));
-		});
-		
-		HBox bIF = new HBox();
-		bIF.setAlignment(Pos.CENTER_RIGHT);
-		bIF.getChildren().add(setQuery);
-		
-		VBox forInput = new VBox();
-		forInput.setPadding(new Insets(10, 10, 0, 10));
-		forInput.setSpacing(5.0);
-		forInput.getChildren().addAll(connLayout, queryLayout, bIF);
-		
-		return new Tab("SQL", forInput);
-	}
-	
-	private Tab createInputFileTab() {
-		Label forInputFile = new Label("Soubor k deserializaci:");
-		Label inputFile = new Label("    Ještě nebyl vybrán žádný soubor...");
-		inputFile.setStyle("-fx-font-style: italic;");
-		inputFile.setPrefWidth(500); // Value to cut the text.
-		inputFile.setMaxWidth(Double.MAX_VALUE);
-		
-		Button setInputFile = new Button("Vstupní soubor");
-		setInputFile.setOnAction(event -> {
-			FileChooser fCh = new FileChooser();
-			fCh.setInitialDirectory(new File("."));
-			// The input can be a zip file or file without a specific extension -> file chooser without extension filters...
-			// fCh.getExtensionFilters().add(new FileChooser.ExtensionFilter("Binary Files", "*.out"));
-			File file = fCh.showOpenDialog(stage);
-			if (file != null) {
-				setOutputLayoutDisabled(true);
-				
-				inputFile.setText(file.getAbsolutePath());
-				inputFile.setStyle("-fx-font-weight: bold;");
-				
-				converter.setInput(file, null);
-			}
-		});
-		
-		HBox bIF = new HBox();
-		bIF.setAlignment(Pos.CENTER_RIGHT);
-		bIF.getChildren().add(setInputFile);
-		
-		VBox forInput = new VBox();
-		forInput.setAlignment(Pos.CENTER_LEFT);
-		forInput.setPadding(new Insets(10, 10, 0, 10));
-		forInput.setSpacing(5.0);
-		forInput.getChildren().addAll(forInputFile, inputFile, bIF);
-		
-		return new Tab("Soubor", forInput);
-	}
-	
-	private Node createMenu() {
-		Menu menu = new Menu("Aplikace");
-		
-		MenuItem fullScreen = createMenuItem(null, null, new KeyCodeCombination(KeyCode.F, KeyCombination.CONTROL_DOWN));
-		fullScreen.setOnAction(event -> {
-			stage.setFullScreen(!stage.isFullScreen());
-		});
-		this.fullScreen = (Label) fullScreen.getGraphic();
-		changeFullScreenMenuItem();
-        
-        MenuItem close = createMenuItem("Ukončit", FileWorker.getResource("/close.png"), new KeyCodeCombination(KeyCode.E, KeyCombination.CONTROL_DOWN));
-        close.setOnAction(event -> {
-			Platform.exit();
-		});
-        
-        menu.getItems().addAll(fullScreen, new SeparatorMenuItem(), close);
-        
-        MenuBar bar = new MenuBar();
-        bar.getMenus().add(menu);
-        return bar;
-	}
-	
-	private void changeFullScreenMenuItem() {
-		fullScreen.setText(stage.isFullScreen() ? "Normální zobrazení" : "Plné zobrazení");
-		fullScreen.setGraphic(new ImageView(stage.isFullScreen() ? FileWorker.getResource("/normal.png") : FileWorker.getResource("/full.png")));
-	}
-	
-	private MenuItem createMenuItem(String name, String icon, KeyCodeCombination keyCodeComb) {
-		Label label = new Label(name);
-		label.setGraphicTextGap(10);
-		label.getStyleClass().add("menu-graphics");
-		label.setMinWidth(175);
-		label.setMaxWidth(175);
-		if (icon != null)
-			label.setGraphic(new ImageView(new Image(icon)));
-		
-		MenuItem menuItem = new MenuItem();
-		menuItem.setGraphic(label);
-		menuItem.setAccelerator(keyCodeComb);
-        return menuItem;
-	}
-	
-	private void setOutputLayoutDisabled(boolean disable) {
-		outputLayout.setDisable(disable);
-	}
-	
-	@Override
-	public void loadingInputFileError() {
-		Platform.runLater(()->{
-			Report.error("Načítání souboru", null, "Při načítání souboru došlo k chybě.");
-        });
-	}
-
-	@Override
-	public void completed(String html, String json, String loaded) {
-		Platform.runLater(() -> {
-			String _html = html; String _json = json;
-			
-			boolean showData = html != null && html.length() > 0 && json != null && json.length() > 0;
-			
-			if (!showData && loaded != null && loaded.length() > 0 &&
-					Report.confirm("Výsledek deserializace", null, "Při deserializaci došlo k chybě. "
-							+ "Je ale možné, že nejde o serializovaná data. Chcete zobrazit, co bylo načteno?")) {
-				_html = loaded.trim();
-				_json = loaded.trim();
-				showData = true;
-			}
-			
-			if (showData) {
-				editor.setContent(_html, _json);
-				setOutputLayoutDisabled(false);
-			}
-        });
-	}
-	
-}
diff --git a/project/Deserializer/src/Window.java b/project/Deserializer/src/Window.java
new file mode 100644
index 0000000..fbe4dc0
--- /dev/null
+++ b/project/Deserializer/src/Window.java
@@ -0,0 +1,419 @@
+import java.io.File;
+import java.util.Properties;
+
+import io.Database.DB_Messenger;
+import io.FileWorker;
+import javafx.application.Application;
+import javafx.application.Platform;
+import javafx.collections.FXCollections;
+import javafx.collections.ObservableList;
+import javafx.geometry.Insets;
+import javafx.geometry.Pos;
+import javafx.scene.Node;
+import javafx.scene.Parent;
+import javafx.scene.Scene;
+import javafx.scene.control.Button;
+import javafx.scene.control.ComboBox;
+import javafx.scene.control.Label;
+import javafx.scene.control.Menu;
+import javafx.scene.control.MenuBar;
+import javafx.scene.control.MenuItem;
+import javafx.scene.control.PasswordField;
+import javafx.scene.control.Separator;
+import javafx.scene.control.SeparatorMenuItem;
+import javafx.scene.control.Tab;
+import javafx.scene.control.TabPane;
+import javafx.scene.control.TabPane.TabClosingPolicy;
+import javafx.scene.control.TextField;
+import javafx.scene.image.Image;
+import javafx.scene.image.ImageView;
+import javafx.scene.input.KeyCode;
+import javafx.scene.input.KeyCodeCombination;
+import javafx.scene.input.KeyCombination;
+import javafx.scene.layout.BorderPane;
+import javafx.scene.layout.HBox;
+import javafx.scene.layout.Priority;
+import javafx.scene.layout.VBox;
+import javafx.stage.FileChooser;
+import javafx.stage.Stage;
+
+/**
+ * VM arguments for Java 11: --module-path libs\javafx-sdk-11.0.2\lib --add-modules=javafx.controls
+ */
+public class Window extends Application implements IConversionResults {
+	
+	private Stage stage;
+	private Label fullScreen;
+	
+	private Editor editor;
+	private VBox outputLayout;
+	
+	private Converter converter;
+	private Properties properties;
+	
+	@Override
+	public void init() throws Exception {
+		super.init();
+		converter = new Converter(this);
+		converter.start();
+		properties = FileWorker.getConfig();
+	}
+	
+	@Override
+	public void stop() throws Exception {
+		super.stop();
+		converter.end();
+		converter.join();
+		FileWorker.saveConfig(properties);
+		Platform.exit();
+	}
+	
+	@Override
+	public void start(Stage stage) throws Exception {
+		this.stage = stage;
+		stage.getIcons().add(new Image(FileWorker.getResource("/logo.png")));
+		stage.setTitle("Java Object Universal Deserializer");
+		stage.setScene(createScene());
+		stage.show();
+		
+		stage.setMinWidth(stage.getWidth());
+		stage.setMinHeight(stage.getHeight());
+
+		stage.fullScreenProperty().addListener((obs, oldState, newState) -> {
+			changeFullScreenMenuItem();
+		});
+	}
+	
+	private Scene createScene() {
+		createMenu();
+		Scene scene = new Scene(createLayout());
+		scene.getStylesheets().add(FileWorker.getResource("/main.css"));
+		return scene;
+	}
+	
+	private Parent createLayout() {
+		BorderPane layout = new BorderPane();
+		
+		layout.setTop(createMenu());
+		layout.setCenter(createBodyLayout());
+		
+		return layout;
+	}
+	
+	private Node createBodyLayout() {
+		TabPane header = new TabPane();
+        header.setTabClosingPolicy(TabClosingPolicy.UNAVAILABLE);
+        header.getTabs().add(createInputFileTab());
+        header.getTabs().add(createQueryTab());
+        
+        
+        editor = new Editor();
+        
+        String propMode = properties.getProperty(FileWorker.ACE_MODE);
+        String propTheme = properties.getProperty(FileWorker.ACE_THEME);
+        
+        ObservableList<String> aceModes = FXCollections.observableArrayList();
+        ObservableList<String> aceThemes = FXCollections.observableArrayList();
+        FileWorker.getAceModesAndThemes(aceModes, aceThemes);
+        
+        ComboBox<String> modeBox = new ComboBox<String>();
+        modeBox.setItems(aceModes);
+        modeBox.getSelectionModel().select(propMode == null ? Editor.DEFAULT_MODE : propMode);
+        modeBox.getSelectionModel().selectedItemProperty().addListener((observable, oldValue, newValue) -> {
+        	if (modeBox.getValue() != null) {
+        		properties.setProperty(FileWorker.ACE_MODE, modeBox.getValue());
+        		editor.setMode(modeBox.getValue());
+            }
+        });
+        
+        ComboBox<String> themeBox = new ComboBox<String>();
+        themeBox.setItems(aceThemes);
+        themeBox.getSelectionModel().select(propTheme == null ? Editor.DEFAULT_THEME : propTheme);
+        themeBox.getSelectionModel().selectedItemProperty().addListener((observable, oldValue, newValue) -> {
+        	if (themeBox.getValue() != null) {
+        		properties.setProperty(FileWorker.ACE_THEME, themeBox.getValue());
+        		editor.setTheme(themeBox.getValue());
+            }
+        });
+        
+        HBox aceSettings = new HBox();
+        aceSettings.setPadding(new Insets(0, 10, 0, 0));
+        aceSettings.setSpacing(10.0);
+        aceSettings.setAlignment(Pos.CENTER_RIGHT);
+        aceSettings.getChildren().addAll(new Label("Nastavení editoru (režim / téma):"), modeBox, new Label("/"), themeBox);
+        
+        VBox editorLayout = new VBox();
+        editorLayout.setSpacing(5.0);
+        editorLayout.getChildren().addAll(editor.getView(), aceSettings);
+        
+        
+		Label forOutputFile = new Label("Výstupní soubor:");
+		Label outputFile = new Label("    Ještě nebyl vybrán žádný soubor...");
+		outputFile.setStyle("-fx-font-style: italic;");
+		
+		Button save = new Button("Uložit");
+		save.setOnAction(event -> {
+			File jsonFile = null;
+			
+			FileChooser fCh = new FileChooser();
+			fCh.setInitialDirectory(new File("."));
+			fCh.getExtensionFilters().add(new FileChooser.ExtensionFilter("JSON Files", "*.json"));
+			File file = fCh.showSaveDialog(stage);
+			if (file != null) {
+				jsonFile = file;
+				outputFile.setText(file.getAbsolutePath());
+				outputFile.setStyle("-fx-font-weight: bold;");
+			}
+			
+			if (jsonFile != null) {
+				String title = "Uložení JSON";
+				try {
+					FileWorker.saveJson(jsonFile, editor.getJson());
+					Report.info(title, null, "Uložení JSON souboru proběhlo v pořádku.");
+				} catch (Exception e) {
+					Report.error(title, null, "Při ukládání JSON souboru nastala chyba.");
+				}
+			}
+		});
+		
+		HBox bOF = new HBox();
+		bOF.setAlignment(Pos.CENTER_RIGHT);
+		bOF.getChildren().add(save);
+		
+		outputLayout = new VBox();
+		outputLayout.setPadding(new Insets(0, 10, 10, 10));
+		outputLayout.setSpacing(5.0);
+		outputLayout.getChildren().add(forOutputFile);
+		outputLayout.getChildren().add(outputFile);
+		outputLayout.getChildren().add(bOF);
+		setOutputLayoutDisabled(true);
+		
+		
+		VBox layout = new VBox();
+		layout.setSpacing(10.0);
+		VBox.setVgrow(editor.getView(), Priority.ALWAYS);
+		layout.getChildren().addAll(header, new Separator(), editorLayout, new Separator(), outputLayout);
+		
+		return layout;
+	}
+	
+	private Tab createQueryTab() {
+		String propType = properties.getProperty(FileWorker.DB_TYPE);
+		String propUrl = properties.getProperty(FileWorker.DB_URL);
+		String propUser = properties.getProperty(FileWorker.DB_USER);
+        
+		
+		String promptTexts[] = new String[] { "jdbc:mysql://server/nazevDB", "jdbc:oracle:thin:@server:port:nazevDB" };
+		
+		Label rdbmsLabel = new Label("Typ DB");
+		Label urlLabel = new Label("URL");
+		ComboBox<String> rdbms = new ComboBox<String>(FXCollections.observableArrayList(new String[] { "MySQL", "ORACLE" }));
+		TextField url = new TextField(propUrl == null ? "" : propUrl);
+		
+		if (propType == null) {
+			rdbms.getSelectionModel().selectFirst();
+			url.setPromptText(promptTexts[0]);
+		} else {
+			rdbms.getSelectionModel().select(propType);
+			url.setPromptText(promptTexts[rdbms.getItems().indexOf(propType)]);
+		}
+		rdbms.setOnAction(event -> {
+			url.setPromptText(promptTexts[rdbms.getSelectionModel().getSelectedIndex()]);
+		});
+		
+		
+
+		
+		Label userLabel = new Label("Uživatel");
+		Label passwordLabel = new Label("Heslo");
+		TextField user = new TextField(propUser == null ? "" : propUser);
+		PasswordField password = new PasswordField();
+		
+		VBox rdbmsLayout = new VBox();
+		rdbmsLayout.getChildren().addAll(rdbmsLabel, rdbms);
+		VBox urlLayout = new VBox();
+		urlLayout.getChildren().addAll(urlLabel, url);
+		VBox userLayout = new VBox();
+		userLayout.getChildren().addAll(userLabel, user);
+		VBox passwordLayout = new VBox();
+		passwordLayout.getChildren().addAll(passwordLabel, password);
+		
+		rdbmsLabel.setStyle("-fx-font-weight: bold;");
+		urlLabel.setStyle("-fx-font-weight: bold;");
+		userLabel.setStyle("-fx-font-weight: bold;");
+		passwordLabel.setStyle("-fx-font-weight: bold;");
+		
+		url.setMinWidth(400);
+		user.setMinWidth(100);
+		user.setPrefWidth(200);
+		user.setMaxWidth(300);
+		password.setMinWidth(100);
+		password.setPrefWidth(200);
+		password.setMaxWidth(300);
+	
+		HBox.setHgrow(urlLayout, Priority.ALWAYS);
+		
+		HBox connLayout = new HBox();
+		connLayout.setSpacing(10);
+		connLayout.getChildren().addAll(rdbmsLayout, urlLayout, userLayout, passwordLayout);
+		
+		
+		Label select = new Label("SELECT"), from = new Label("FROM"), where = new Label("WHERE"), queryEnd = new Label(";");
+		TextField column = new TextField(), table = new TextField(), cond = new TextField();
+		
+		select.setStyle("-fx-font-weight: bold;");
+		from.setStyle("-fx-font-weight: bold;");
+		where.setStyle("-fx-font-weight: bold;");
+		queryEnd.setStyle("-fx-font-weight: bold;");
+		
+		column.setPromptText("sloupec");
+		table.setPromptText("tabulka");
+		cond.setPromptText("podminka");
+		
+		HBox.setHgrow(column, Priority.ALWAYS);
+		HBox.setHgrow(table, Priority.ALWAYS);
+		HBox.setHgrow(cond, Priority.ALWAYS);
+		
+		HBox queryLayout = new HBox();
+		queryLayout.setAlignment(Pos.CENTER);
+		queryLayout.setSpacing(5.0);
+		queryLayout.getChildren().addAll(select, column, from, table, where, cond, queryEnd);
+		
+		Button setQuery = new Button("Spustit");
+		setQuery.setOnAction(event -> {
+			String urlStr = url.getText().trim();
+			String userStr = user.getText().trim();
+			properties.setProperty(FileWorker.DB_TYPE, rdbms.getValue());
+			properties.setProperty(FileWorker.DB_URL, urlStr);
+			properties.setProperty(FileWorker.DB_USER, userStr);
+			
+			String driver = rdbms.getValue().equals("MySQL") ? "com.mysql.cj.jdbc.Driver" : "oracle.jdbc.driver.OracleDriver";
+			converter.setInput(null, new DB_Messenger(driver, urlStr, userStr, password.getText().trim(),
+					table.getText().trim(), cond.getText().trim(), column.getText().trim()));
+		});
+		
+		HBox bIF = new HBox();
+		bIF.setAlignment(Pos.CENTER_RIGHT);
+		bIF.getChildren().add(setQuery);
+		
+		VBox forInput = new VBox();
+		forInput.setPadding(new Insets(10, 10, 0, 10));
+		forInput.setSpacing(5.0);
+		forInput.getChildren().addAll(connLayout, queryLayout, bIF);
+		
+		return new Tab("SQL", forInput);
+	}
+	
+	private Tab createInputFileTab() {
+		Label forInputFile = new Label("Soubor k deserializaci:");
+		Label inputFile = new Label("    Ještě nebyl vybrán žádný soubor...");
+		inputFile.setStyle("-fx-font-style: italic;");
+		inputFile.setPrefWidth(500); // Value to cut the text.
+		inputFile.setMaxWidth(Double.MAX_VALUE);
+		
+		Button setInputFile = new Button("Vstupní soubor");
+		setInputFile.setOnAction(event -> {
+			FileChooser fCh = new FileChooser();
+			fCh.setInitialDirectory(new File("."));
+			// The input can be a zip file or file without a specific extension -> file chooser without extension filters...
+			// fCh.getExtensionFilters().add(new FileChooser.ExtensionFilter("Binary Files", "*.out"));
+			File file = fCh.showOpenDialog(stage);
+			if (file != null) {
+				setOutputLayoutDisabled(true);
+				
+				inputFile.setText(file.getAbsolutePath());
+				inputFile.setStyle("-fx-font-weight: bold;");
+				
+				converter.setInput(file, null);
+			}
+		});
+		
+		HBox bIF = new HBox();
+		bIF.setAlignment(Pos.CENTER_RIGHT);
+		bIF.getChildren().add(setInputFile);
+		
+		VBox forInput = new VBox();
+		forInput.setAlignment(Pos.CENTER_LEFT);
+		forInput.setPadding(new Insets(10, 10, 0, 10));
+		forInput.setSpacing(5.0);
+		forInput.getChildren().addAll(forInputFile, inputFile, bIF);
+		
+		return new Tab("Soubor", forInput);
+	}
+	
+	private Node createMenu() {
+		Menu menu = new Menu("Aplikace");
+		
+		MenuItem fullScreen = createMenuItem(null, null, new KeyCodeCombination(KeyCode.F, KeyCombination.CONTROL_DOWN));
+		fullScreen.setOnAction(event -> {
+			stage.setFullScreen(!stage.isFullScreen());
+		});
+		this.fullScreen = (Label) fullScreen.getGraphic();
+		changeFullScreenMenuItem();
+        
+        MenuItem close = createMenuItem("Ukončit", FileWorker.getResource("/close.png"), new KeyCodeCombination(KeyCode.E, KeyCombination.CONTROL_DOWN));
+        close.setOnAction(event -> {
+			Platform.exit();
+		});
+        
+        menu.getItems().addAll(fullScreen, new SeparatorMenuItem(), close);
+        
+        MenuBar bar = new MenuBar();
+        bar.getMenus().add(menu);
+        return bar;
+	}
+	
+	private void changeFullScreenMenuItem() {
+		fullScreen.setText(stage.isFullScreen() ? "Normální zobrazení" : "Plné zobrazení");
+		fullScreen.setGraphic(new ImageView(stage.isFullScreen() ? FileWorker.getResource("/normal.png") : FileWorker.getResource("/full.png")));
+	}
+	
+	private MenuItem createMenuItem(String name, String icon, KeyCodeCombination keyCodeComb) {
+		Label label = new Label(name);
+		label.setGraphicTextGap(10);
+		label.getStyleClass().add("menu-graphics");
+		label.setMinWidth(175);
+		label.setMaxWidth(175);
+		if (icon != null)
+			label.setGraphic(new ImageView(new Image(icon)));
+		
+		MenuItem menuItem = new MenuItem();
+		menuItem.setGraphic(label);
+		menuItem.setAccelerator(keyCodeComb);
+        return menuItem;
+	}
+	
+	private void setOutputLayoutDisabled(boolean disable) {
+		outputLayout.setDisable(disable);
+	}
+	
+	@Override
+	public void loadingInputFileError() {
+		Platform.runLater(()->{
+			Report.error("Načítání souboru", null, "Při načítání souboru došlo k chybě.");
+        });
+	}
+
+	@Override
+	public void completed(String html, String json, String loaded) {
+		Platform.runLater(() -> {
+			String _html = html; String _json = json;
+			
+			boolean showData = html != null && html.length() > 0 && json != null && json.length() > 0;
+			
+			if (!showData && loaded != null && loaded.length() > 0 &&
+					Report.confirm("Výsledek deserializace", null, "Při deserializaci došlo k chybě. "
+							+ "Je ale možné, že nejde o serializovaná data. Chcete zobrazit, co bylo načteno?")) {
+				_html = loaded.trim();
+				_json = loaded.trim();
+				showData = true;
+			}
+			
+			if (showData) {
+				editor.setContent(_html, _json);
+				setOutputLayoutDisabled(false);
+			}
+        });
+	}
+	
+}
