diff --git a/bin/application/Main.class b/bin/application/Main.class index a2798b7..7ea09ff 100644 Binary files a/bin/application/Main.class and b/bin/application/Main.class differ diff --git a/bin/application/MainWindow.fxml b/bin/application/MainWindow.fxml index 12ceeba..032c390 100644 --- a/bin/application/MainWindow.fxml +++ b/bin/application/MainWindow.fxml @@ -2,9 +2,11 @@ + + @@ -46,10 +48,14 @@ - + + + + + - + @@ -86,16 +92,23 @@ - - - - diff --git a/bin/application/MainWindowController$1.class b/bin/application/MainWindowController$1.class index bb0df82..83f39ab 100644 Binary files a/bin/application/MainWindowController$1.class and b/bin/application/MainWindowController$1.class differ diff --git a/bin/application/MainWindowController$2.class b/bin/application/MainWindowController$2.class index 21e3cf2..0598930 100644 Binary files a/bin/application/MainWindowController$2.class and b/bin/application/MainWindowController$2.class differ diff --git a/bin/application/MainWindowController$3.class b/bin/application/MainWindowController$3.class index 05dc50b..d3984f0 100644 Binary files a/bin/application/MainWindowController$3.class and b/bin/application/MainWindowController$3.class differ diff --git a/bin/application/MainWindowController$4.class b/bin/application/MainWindowController$4.class index 5859bec..805fc84 100644 Binary files a/bin/application/MainWindowController$4.class and b/bin/application/MainWindowController$4.class differ diff --git a/bin/application/MainWindowController$5.class b/bin/application/MainWindowController$5.class index 239122d..cdf339c 100644 Binary files a/bin/application/MainWindowController$5.class and b/bin/application/MainWindowController$5.class differ diff --git a/bin/application/MainWindowController$6.class b/bin/application/MainWindowController$6.class index 03e225a..e7f5c3d 100644 Binary files a/bin/application/MainWindowController$6.class and b/bin/application/MainWindowController$6.class differ diff --git a/bin/application/MainWindowController$7.class b/bin/application/MainWindowController$7.class index 770d9bc..b5e6936 100644 Binary files a/bin/application/MainWindowController$7.class and b/bin/application/MainWindowController$7.class differ diff --git a/bin/application/MainWindowController.class b/bin/application/MainWindowController.class index bb2b31c..a420cad 100644 Binary files a/bin/application/MainWindowController.class and b/bin/application/MainWindowController.class differ diff --git a/bin/application/application.css b/bin/application/application.css deleted file mode 100644 index 83d6f33..0000000 --- a/bin/application/application.css +++ /dev/null @@ -1 +0,0 @@ -/* JavaFX CSS - Leave this comment until you have at least create one rule which uses -fx-Property */ \ No newline at end of file diff --git a/src/application/Main.java b/src/application/Main.java index b853e3a..b40c599 100644 --- a/src/application/Main.java +++ b/src/application/Main.java @@ -128,7 +128,7 @@ public class Main extends Application { mainWindowController.addDataUI(); Scene scene = new Scene(pane); //create new scene, append pane to scene - + scene.getStylesheets().add(Main.class.getResource("MainWindow.css").toExternalForm()); primaryStage.setScene(scene); //append scene to stage primaryStage.show(); //show stage } catch (IOException e) { diff --git a/src/application/MainWindow.css b/src/application/MainWindow.css new file mode 100644 index 0000000..cb1165b --- /dev/null +++ b/src/application/MainWindow.css @@ -0,0 +1,4 @@ +.jfx-hamburgerW StackPane { -fx-background-color: white; + -fx-background-radius: 5px; } +.jfx-hamburgerB StackPane { -fx-background-color: black; + -fx-background-radius: 5px; } \ No newline at end of file diff --git a/src/application/MainWindow.fxml b/src/application/MainWindow.fxml index 12ceeba..032c390 100644 --- a/src/application/MainWindow.fxml +++ b/src/application/MainWindow.fxml @@ -2,9 +2,11 @@ + + @@ -46,10 +48,14 @@ - + + + + + - + @@ -86,16 +92,23 @@ - - - - diff --git a/src/application/MainWindowController.java b/src/application/MainWindowController.java index 7004377..37b237e 100644 --- a/src/application/MainWindowController.java +++ b/src/application/MainWindowController.java @@ -42,9 +42,11 @@ import java.util.Properties; import java.util.ResourceBundle; import com.jfoenix.controls.JFXButton; import com.jfoenix.controls.JFXColorPicker; +import com.jfoenix.controls.JFXHamburger; import com.jfoenix.controls.JFXSlider; import com.jfoenix.controls.JFXTextField; import com.jfoenix.controls.JFXToggleButton; +import com.jfoenix.transitions.hamburger.HamburgerBackArrowBasicTransition; import javafx.animation.FadeTransition; import javafx.animation.ParallelTransition; @@ -72,6 +74,7 @@ import javafx.scene.control.TreeTableColumn.SortType; import javafx.scene.control.TreeTableView; import javafx.scene.image.Image; import javafx.scene.image.ImageView; +import javafx.scene.input.MouseEvent; import javafx.scene.layout.AnchorPane; import javafx.scene.layout.GridPane; import javafx.scene.layout.HBox; @@ -103,8 +106,6 @@ public class MainWindowController { @FXML ScrollPane scrollPane; @FXML - private JFXButton menubtn; //TODO switch to hamburger menu - @FXML private JFXButton playbtn; @FXML private JFXButton openfolderbtn; @@ -129,6 +130,8 @@ public class MainWindowController { @FXML private JFXButton streamingDirectoryBtn; @FXML + private JFXHamburger menuHam; + @FXML private JFXToggleButton autoupdateBtn; @FXML public JFXTextField tfPath; @@ -143,13 +146,20 @@ public class MainWindowController { @FXML public JFXSlider sliderFontSize; @FXML - private Label versionlbl; + private Label versionLabel; @FXML - private Label sizelbl; + private Label fontsizeLabel; @FXML - private Label aulbl; + private Label autoUpdateLabel; + @FXML + private Label settingsHead1Label; + @FXML + private Label mainColorLabel; + @FXML + private Label localLabel; @FXML ImageView image1; + private ImageView imv1; @FXML @@ -176,14 +186,14 @@ public class MainWindowController { @FXML private TableColumn dataNameEndColumn = new TableColumn<>("Datei Name mit Endung"); - private boolean menutrue = false; //saves the position of menuBtn (opened or closed) - private boolean settingstrue = false; + private boolean menuTrue = false; //saves the position of menuBtn (opened or closed) + private boolean settingsTrue = false; private boolean streamingSettingsTrue = false; private boolean autoUpdate = false; static boolean firststart = false; private int hashA = -2055934614; private String version = "0.5.1"; - private String buildNumber = "127"; + private String buildNumber = "129"; private String versionName = "plasma cow"; private File dirWin = new File(System.getProperty("user.home") + "/Documents/HomeFlix"); private File dirLinux = new File(System.getProperty("user.home") + "/HomeFlix"); @@ -239,8 +249,6 @@ public class MainWindowController { ObservableList localFilms = FXCollections.observableArrayList(); ObservableList streamingFilms = FXCollections.observableArrayList(); ObservableList streamingData = FXCollections.observableArrayList(); - private ImageView menu_icon_black = new ImageView(new Image("resources/icons/menu_icon_black.png")); - private ImageView menu_icon_white = new ImageView(new Image("resources/icons/menu_icon_white.png")); private ImageView skip_previous_white = new ImageView(new Image("resources/icons/ic_skip_previous_white_18dp_1x.png")); private ImageView skip_previous_black = new ImageView(new Image("resources/icons/ic_skip_previous_black_18dp_1x.png")); private ImageView skip_next_white = new ImageView(new Image("resources/icons/ic_skip_next_white_18dp_1x.png")); @@ -258,30 +266,6 @@ public class MainWindowController { private apiQuery ApiQuery; DBController dbController; - /** - * TODO change value of Text-color change - */ - @FXML - private void menubtnclicked(){ - if(menutrue == false){ - sideMenuSlideIn(); - menutrue = true; - }else{ - sideMenuSlideOut(); - menutrue = false; - } - if(settingstrue == true){ - settingsAnchor.setVisible(false); - setPath(tfPath.getText()); - saveSettings(); - settingstrue = false; - } - if(streamingSettingsTrue == true){ - streamingSettingsAnchor.setVisible(false); - streamingSettingsTrue = false; - } - } - @FXML private void playbtnclicked(){ System.out.println(System.getProperty("os.name")); @@ -367,18 +351,18 @@ public class MainWindowController { @FXML private void settingsBtnclicked(){ - if(settingstrue == false){ + if(settingsTrue == false){ if(streamingSettingsTrue == true){ streamingSettingsAnchor.setVisible(false); streamingSettingsTrue = false; } settingsAnchor.setVisible(true); - settingstrue = true; + settingsTrue = true; }else{ settingsAnchor.setVisible(false); setPath(tfPath.getText()); saveSettings(); - settingstrue = false; + settingsTrue = false; } } @@ -388,9 +372,9 @@ public class MainWindowController { @FXML private void streamingSettingsBtnclicked(){ if(streamingSettingsTrue == false){ - if(settingstrue == true){ + if(settingsTrue == true){ settingsAnchor.setVisible(false); - settingstrue = false; + settingsTrue = false; } streamingSettingsAnchor.setVisible(true); streamingSettingsTrue = true; @@ -415,8 +399,8 @@ public class MainWindowController { settingsAnchor.setVisible(false); streamingSettingsAnchor.setVisible(false); sideMenuSlideOut(); //disables side-menu - menutrue = false; - settingstrue = false; + menuTrue = false; + settingsTrue = false; streamingSettingsTrue = false; } @@ -581,6 +565,32 @@ public class MainWindowController { //Initializing the actions void initActions(){ + HamburgerBackArrowBasicTransition burgerTask = new HamburgerBackArrowBasicTransition(menuHam); + menuHam.addEventHandler(MouseEvent.MOUSE_PRESSED, (e)->{ + if(menuTrue == false){ + sideMenuSlideIn(); + burgerTask.setRate(1.0); + burgerTask.play(); + menuTrue = true; + }else{ + sideMenuSlideOut(); + burgerTask.setRate(-1.0); + burgerTask.play(); + menuTrue = false; + } + if(settingsTrue == true){ + settingsAnchor.setVisible(false); + setPath(tfPath.getText()); + saveSettings(); + settingsTrue = false; + } + if(streamingSettingsTrue == true){ + streamingSettingsAnchor.setVisible(false); + streamingSettingsTrue = false; + } + + }); + tfsearch.textProperty().addListener(new ChangeListener() { @Override public void changed(ObservableValue observable,String oldValue, String newValue) { @@ -850,7 +860,7 @@ public class MainWindowController { playbtn.setGraphic(play_arrow_white); returnBtn.setGraphic(skip_previous_white); forwardBtn.setGraphic(skip_next_white); - menubtn.setGraphic(menu_icon_white); + menuHam.getStyleClass().add("jfx-hamburgerW"); }else{ settingsBtn.setStyle("-fx-text-fill: BLACK;"); streamingSettingsBtn.setStyle("-fx-text-fill: BLACK;"); @@ -867,7 +877,7 @@ public class MainWindowController { playbtn.setGraphic(play_arrow_black); returnBtn.setGraphic(skip_previous_black); forwardBtn.setGraphic(skip_next_black); - menubtn.setGraphic(menu_icon_black); + menuHam.getStyleClass().add("jfx-hamburgerB"); } if(mode.equals("local")){ @@ -934,9 +944,12 @@ public class MainWindowController { updateBtn.setText(bundle.getString("checkUpdates")); directoryBtn.setText(bundle.getString("chooseFolder")); streamingDirectoryBtn.setText(bundle.getString("chooseFolder")); - sizelbl.setText(bundle.getString("fontSize")); - aulbl.setText(bundle.getString("autoUpdate")); - versionlbl.setText(bundle.getString("version")+" "+version+" (Build: "+buildNumber+")"); + settingsHead1Label.setText(bundle.getString("settingsHead1Label")); + mainColorLabel.setText(bundle.getString("mainColorLabel")); + fontsizeLabel.setText(bundle.getString("fontsizeLabel")); + localLabel.setText(bundle.getString("localLabel")); + autoUpdateLabel.setText(bundle.getString("autoUpdateLabel")); + versionLabel.setText(bundle.getString("version")+" "+version+" (Build: "+buildNumber+")"); columnTitel.setText(bundle.getString("columnName")); columnRating.setText(bundle.getString("columnRating")); columnStreamUrl.setText(bundle.getString("columnStreamUrl")); diff --git a/src/application/application.css b/src/application/application.css deleted file mode 100644 index 83d6f33..0000000 --- a/src/application/application.css +++ /dev/null @@ -1 +0,0 @@ -/* JavaFX CSS - Leave this comment until you have at least create one rule which uses -fx-Property */ \ No newline at end of file diff --git a/src/resources/HomeFlix-Local_de_DE.properties b/src/resources/HomeFlix-Local_de_DE.properties index 24bfba5..aa9c214 100644 --- a/src/resources/HomeFlix-Local_de_DE.properties +++ b/src/resources/HomeFlix-Local_de_DE.properties @@ -1,24 +1,35 @@ -# HomeFlix-Local_de_DE.properties German Local +#HomeFlix-Local_de_DE.properties German Local + +#main window translations info = Info settings = Einstellungen streamingSettings = Stream Einst. -tfPath = Pfad... tfSearch = Suche... openFolder = Ordner \u00F6ffnen + +#settings translations +settingsHead1Label = HomeFlix Einstellungen +tfPath = Pfad... chooseFolder = Ordner ausw\u00E4hlen -fontSize = Schriftgr\u00F6\u00DFe: +mainColorLabel = Hauptfarbe: +fontsizeLabel = Schriftgr\u00F6\u00DFe: +localLabel = Sprache: checkUpdates = Auf Update pr\u00FCfen checkingUpdates = Es wird nach Updates gesucht... updateBtnavail = Update verf\u00FCgbar updateBtnNotavail = Kein Update verf\u00FCgbar -autoUpdate = beim Start nach Updates suchen: +autoUpdateLabel = beim Start nach Updates suchen: version = Version: + +#column translations columnName = Name columnRating = Bewertung columnStreamUrl = Datei Name columnResolution = Aufl\u00F6sung columnSeason = Staffel columnYear = Jahr + +#error translations errorUpdateV = Beim ausf\u00FChren des Updates ist ein Fehler aufgetreten! \nError: could not check update version (nvc)\nWeitere Hilfe erhalten sie unter www.kellerkinder.xyz \noder wenden sie sich an support@kellerkinder.xyz errorUpdateD = Beim ausf\u00FChren des Updates ist ein Fehler aufgetreten! \nError: could not download update files (ndf)\nWeitere Hilfe erhalten sie unter www.kellerkinder.xyz \noder wenden sie sich an support@kellerkinder.xyz errorPlay = Beim \u00F6ffnen der Datei ist ein Fehler aufgetreten! \nError: could not open file (nof) \nWeitere Hilfe erhalten sie unter www.kellerkinder.xyz \noder wenden sie sich an support@kellerkinder.xyz @@ -29,6 +40,8 @@ errorSave = Beim speichern der Einstellungen ist ein Fehler aufgetreten! noFilmFound = Kein Film mit diesem Titel gefunden! vlcNotInstalled = Um einen Film abspielen wird der VLC Media Player ben\u00F6tigt! infoText = \nMaintainer: seilo@kellerkinder.xyz und \nhendrik.schutter@coptersicht.de \n(c) 2016-2017 Kellerkinder www.kellerkinder.xyz + +#textFlow translations title = Titel year = Jahr rating = Einstufung @@ -45,5 +58,6 @@ awards = Auszeichnungen metascore = Metascore imdbRating = IMDB-Bewertung type = Type + firstStartHeader = Es ist kein Stammverzeichnis f\u00FCr Filme angegeben! firstStartContent = Stammverzeichniss angeben? diff --git a/src/resources/HomeFlix-Local_en_US.properties b/src/resources/HomeFlix-Local_en_US.properties index 379c88f..d166f04 100644 --- a/src/resources/HomeFlix-Local_en_US.properties +++ b/src/resources/HomeFlix-Local_en_US.properties @@ -1,24 +1,35 @@ -# HomeFlix-Local_en_US.properties US-English Local and default +#HomeFlix-Local_en_US.properties US-English Local and default + +#main window translations info = Info settings = Settings streamingSettings = Stream Settings -tfPath = Path... tfSearch = Search... openFolder = open Folder + +#settings translations +settingsHead1Label = HomeFlix Settings +tfPath = Path... chooseFolder = choose Directory -fontSize = font size: +mainColorLabel = main color: +fontsizeLabel = font size: +localLabel = local: checkUpdates = check for updates checkingUpdates = checking for updates... updateBtnavail = update available updateBtnNotavail = no update available -autoUpdate = check at startup for updates: +autoUpdateLabel = check at startup for updates: version = Version: + +#column translations columnName = Name columnRating = Rating columnStreamUrl = File Name columnResolution = Resolution columnSeason = Season columnYear = Year + +#error translations errorUpdateV = An error has occurred during update! \nError: could not check update version (nvc) \nTo get help, visit www.kellerkinder.xyz \nor contcat support@kellerkinder.xyz errorUpdateD = An error has occurred during update! \nError: could not download update files (ndf) \nTo get help, visit www.kellerkinder.xyz \nor contcat support@kellerkinder.xyz errorPlay = An error has occurred during opening the file! \nError: could not open file (nof) \nTo get help, visit www.kellerkinder.xyz \nor contcat support@kellerkinder.xyz @@ -29,6 +40,8 @@ errorSave = An error occurred while saving the settings! noFilmFound = No film with this title found! vlcNotInstalled = VLC Media Player is required to play a movie! infoText = \nMaintainer: seilo@kellerkinder.xyz and \nhendrik.schutter@coptersicht.de \n(c) 2016-2017 Kellerkinder www.kellerkinder.xyz + +#textFlow translations title = Title year = Year rating = Rating @@ -45,5 +58,6 @@ awards = Awards metascore = Metascore imdbRating = IMDB-Rating type = Type + firstStartHeader = There is no root directory for movies! firstStartContent = Specify a root directory?