diff --git a/bin/application/MainWindowController$1.class b/bin/application/MainWindowController$1.class index 08c339d..623fd0b 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 2dd013e..7a59800 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 baa0a99..3f7fc00 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 b4114d4..020dc36 100644 Binary files a/bin/application/MainWindowController$4.class and b/bin/application/MainWindowController$4.class differ diff --git a/bin/application/MainWindowController.class b/bin/application/MainWindowController.class index e66b3f0..af10609 100644 Binary files a/bin/application/MainWindowController.class and b/bin/application/MainWindowController.class differ diff --git a/bin/application/streamUiData.class b/bin/application/streamUiData.class index 00cacde..d0821f1 100644 Binary files a/bin/application/streamUiData.class and b/bin/application/streamUiData.class differ diff --git a/src/application/MainWindowController.java b/src/application/MainWindowController.java index 1cbd1dc..1f9b3e1 100644 --- a/src/application/MainWindowController.java +++ b/src/application/MainWindowController.java @@ -57,6 +57,9 @@ import com.jfoenix.controls.JFXTextField; import com.jfoenix.controls.JFXToggleButton; +import javafx.animation.FadeTransition; +import javafx.animation.ParallelTransition; +import javafx.animation.TranslateTransition; import javafx.beans.property.ReadOnlyObjectWrapper; import javafx.beans.property.ReadOnlyStringWrapper; import javafx.beans.value.ChangeListener; @@ -82,6 +85,7 @@ import javafx.scene.paint.Color; import javafx.scene.text.Font; import javafx.stage.DirectoryChooser; +import javafx.util.Duration; public class MainWindowController { @FXML @@ -152,7 +156,7 @@ public class MainWindowController { private ImageView image1; @FXML - TreeItem root = new TreeItem<>(new streamUiData(1, 1, 5.0,"1", "filme","1")); + TreeItem root = new TreeItem<>(new streamUiData(1, 1, 1, 5.0,"1", "filme","1")); @FXML TreeTableColumn columnRating = new TreeTableColumn<>("Bewertung"); @FXML @@ -165,9 +169,11 @@ public class MainWindowController { TreeTableColumn columnYear = new TreeTableColumn<>("Jahr"); @FXML TreeTableColumn columnSeason = new TreeTableColumn<>("Staffel"); + @FXML + TreeTableColumn columnEpisode = new TreeTableColumn<>("Episode"); @FXML - private TreeItem streamingRoot =new TreeItem<>(new streamUiData(1 ,1 ,1.0 ,"1" ,"filme" ,"1")); + private TreeItem streamingRoot =new TreeItem<>(new streamUiData(1 ,1 ,1 ,1.0 ,"1" ,"filme" ,"1")); @FXML private TableColumn dataNameColumn = new TableColumn<>("Datei Name"); @FXML @@ -177,7 +183,8 @@ public class MainWindowController { private boolean menutrue = false; //merker für menubtn (öffnen oder schließen) private boolean settingstrue = false; private boolean streamingSettingsTrue = false; - private String version = "0.3.7"; + private String version = "0.3.8"; + private String versionName = "half glowing bucket"; private String versionURL = "https://raw.githubusercontent.com/Seil0/Project-HomeFlix/master/updates/version.txt"; private String downloadLink = "https://raw.githubusercontent.com/Seil0/Project-HomeFlix/master/updates/downloadLink.txt"; private File dir = new File(System.getProperty("user.home") + "/Documents/HomeFlix"); @@ -222,15 +229,14 @@ public class MainWindowController { //wenn menubtn clicked /** * TODO change value of Text-color change - * TODO animation of side menu */ @FXML private void menubtnclicked(){ if(menutrue == false){ - sideMenuVBox.setVisible(true); + sideMenuSlideIn(); menutrue = true; }else{ - sideMenuVBox.setVisible(false); + sideMenuSlideOut(); menutrue = false; } if(settingstrue == true){ @@ -400,7 +406,7 @@ private void switchBtnclicked(){ addDataUI(); settingsAnchor.setVisible(false); streamingSettingsAnchor.setVisible(false); - sideMenuVBox.setVisible(false); //disables sidemenu + sideMenuSlideOut(); //disables sidemenu menutrue = false; settingstrue = false; streamingSettingsTrue = false; @@ -550,8 +556,11 @@ private void initTabel(){ columnSeason.setCellValueFactory((CellDataFeatures p) -> new ReadOnlyObjectWrapper(p.getValue().getValue().getSeason())); + + columnEpisode.setCellValueFactory((CellDataFeatures p) -> + new ReadOnlyObjectWrapper(p.getValue().getValue().getEpisode())); - treeTableViewfilm.getColumns().addAll(columnTitel, columnRating, columnStreamUrl, columnResolution, columnYear, columnSeason); + treeTableViewfilm.getColumns().addAll(columnTitel, columnRating, columnStreamUrl, columnResolution, columnYear, columnSeason, columnEpisode); treeTableViewfilm.getColumns().get(2).setVisible(false); //blendet die Column mit den Dateinamen aus (wichtig um sie abzuspielen) //Changelistener für TreeTable @@ -685,7 +694,7 @@ public void loadData(){ for(int i = 0; i < entries.length; i++){ String titel = ohneEndung(entries[i]); String data = entries[i]; - newDaten.add(new streamUiData(1, 1, 5.0, "1", titel, data)); + newDaten.add(new streamUiData(1, 1, 1, 5.0, "1", titel, data)); } } @@ -694,6 +703,7 @@ public void loadData(){ String resolution = null; String streamUrl = null; int season; + int episode; int year; double rating = 5.0; if(getStreamingPath().equals("")||getStreamingPath().equals(null)){ @@ -708,10 +718,11 @@ public void loadData(){ for (JsonValue item : items) { titel = item.asObject().getString("titel",""); season = item.asObject().getInt("season", 0); + episode = item.asObject().getInt("episode", 0); year = item.asObject().getInt("year", 0); resolution = item.asObject().getString("resolution", ""); streamUrl = item.asObject().getString("streamUrl", ""); - streamData.add(new streamUiData(year, season, rating, resolution, titel, streamUrl)); + streamData.add(new streamUiData(year, season, episode, rating, resolution, titel, streamUrl)); } } catch (IOException e) { @@ -732,6 +743,7 @@ public void addDataUI(){ treeTableViewfilm.getColumns().get(3).setVisible(false); treeTableViewfilm.getColumns().get(4).setVisible(false); treeTableViewfilm.getColumns().get(5).setVisible(false); + treeTableViewfilm.getColumns().get(6).setVisible(false); }else if(mode.equals("streaming")){ for(int i = 0; i < streamData.size(); i++){ root.getChildren().add(new TreeItem(streamData.get(i))); //fügt daten zur Rootnode hinzu @@ -741,9 +753,11 @@ public void addDataUI(){ columnRating.setMaxWidth(52.5); columnYear.setMaxWidth(40); columnSeason.setMaxWidth(52.5); + columnEpisode.setMaxWidth(0); //disabled for ui size reasons treeTableViewfilm.getColumns().get(3).setVisible(true); treeTableViewfilm.getColumns().get(4).setVisible(true); treeTableViewfilm.getColumns().get(5).setVisible(true); + treeTableViewfilm.getColumns().get(6).setVisible(true); } } @@ -756,7 +770,7 @@ public void loadStreamingSettings(){ if(entries[i].endsWith(".json")){ String titel = ohneEndung(entries[i]); String data = entries[i]; - streamingData.add(new streamUiData(1,1,5.0,"1",titel ,data)); + streamingData.add(new streamUiData(1,1,1,5.0,"1",titel ,data)); } } for(int i = 0; i < streamingData.size(); i++){ @@ -823,7 +837,37 @@ public void applyColor(){ } } + private void sideMenuSlideIn(){ + sideMenuVBox.setVisible(true); + //einblenden von 40% nach 100% deckkraft in 400ms + FadeTransition fadeTransition = new FadeTransition(Duration.millis(400), sideMenuVBox); + fadeTransition.setFromValue(0.4); + fadeTransition.setToValue(1.0); + //einfahren des side munes in 400ms + TranslateTransition translateTransition = new TranslateTransition(Duration.millis(400), sideMenuVBox); + translateTransition.setFromX(-150); + translateTransition.setToX(0); + //falls beides verwendet werden soll + ParallelTransition parallelTransition = new ParallelTransition(); + parallelTransition.getChildren().addAll(translateTransition);//(fadeTransition, translateTransition); + parallelTransition.play(); + } + private void sideMenuSlideOut(){ +// sideMenuVBox.setVisible(false); + //ausblenden von 100% nach 40% deckkraft in 400ms + FadeTransition fadeTransition = new FadeTransition(Duration.millis(400), sideMenuVBox); + fadeTransition.setFromValue(1.0); + fadeTransition.setToValue(0.4); + //ausfahren des side munes in 400ms + TranslateTransition translateTransition = new TranslateTransition(Duration.millis(400), sideMenuVBox); + translateTransition.setFromX(0); + translateTransition.setToX(-150); + //falls beides verwendet werden soll + ParallelTransition parallelTransition = new ParallelTransition(); + parallelTransition.getChildren().addAll(translateTransition);//(fadeTransition, translateTransition); + parallelTransition.play(); + } public void setLoaclUI(int local){ switch(local){ @@ -858,7 +902,7 @@ public void setLoaclUI(int local){ errorPlay = bundle.getString("errorPlay"); errorOpenStream = bundle.getString("errorOpenStream"); errorMode = bundle.getString("errorMode"); - infoText = bundle.getString("version")+" "+version+" plasma bucket"+bundle.getString("infoText"); + infoText = bundle.getString("version")+" "+version+" "+versionName+bundle.getString("infoText"); linuxBugText = bundle.getString("linuxBug"); vlcNotInstalled = bundle.getString("vlcNotInstalled"); } diff --git a/src/application/streamUiData.java b/src/application/streamUiData.java index 413e598..429d246 100644 --- a/src/application/streamUiData.java +++ b/src/application/streamUiData.java @@ -11,15 +11,17 @@ public class streamUiData { private IntegerProperty year = new SimpleIntegerProperty(); private IntegerProperty season = new SimpleIntegerProperty(); + private IntegerProperty episode = new SimpleIntegerProperty(); private DoubleProperty rating = new SimpleDoubleProperty(); private StringProperty resolution = new SimpleStringProperty(); private StringProperty titel = new SimpleStringProperty(); private StringProperty streamUrl = new SimpleStringProperty(); //uiData ist der Typ der Daten in der TreeTabelView - public streamUiData (final int year, final int season, final double rating, final String resolution, final String titel, final String streamUrl) { + public streamUiData (final int year, final int season, final int episode, final double rating, final String resolution, final String titel, final String streamUrl) { this.year.set(year); this.season.set(season); + this.episode.set(episode); this.rating.set(rating); this.resolution.set(resolution); this.titel.set(titel); @@ -34,6 +36,10 @@ public int getSeason() { return season.get(); } + public int getEpisode() { + return episode.get(); + } + public double getRating() { return rating.get(); } @@ -59,6 +65,10 @@ public void setSeason(int season) { this.season.set(season); } + public void setEpisode(int season) { + this.episode.set(season); + } + public void setRating(int rating) { this.rating.set(rating); } @@ -83,6 +93,10 @@ public IntegerProperty seasonProperty(){ return season; } + public IntegerProperty episodeProperty(){ + return episode; + } + public DoubleProperty ratingProperty(){ return rating; } diff --git a/updates/ProjectHomeFlix.jar b/updates/ProjectHomeFlix.jar index 19cbaf6..c7337b6 100644 Binary files a/updates/ProjectHomeFlix.jar and b/updates/ProjectHomeFlix.jar differ diff --git a/updates/version.txt b/updates/version.txt index ce4f5af..4209dba 100644 --- a/updates/version.txt +++ b/updates/version.txt @@ -1 +1 @@ -0.3.7 \ No newline at end of file +0.3.8 \ No newline at end of file