From a17b54c87bb6eeeeab4bfa81c42061183e770e85 Mon Sep 17 00:00:00 2001 From: Dmitry Isaenko Date: Sun, 25 Nov 2018 18:13:09 +0300 Subject: [PATCH] v0.10 Playlists added UI changed Code refactored --- About/AboutController.java | 36 +++- About/AboutLayout.fxml | 10 ++ About/AboutWindow.java | 4 +- AppPreferences.java | 64 ++++--- Controller.java | 281 ++++++++++++++++++------------ Main.java | 16 +- Playlists/JsonStorage.java | 28 +++ Playlists/Playlists.java | 119 +++++++++++++ ServiceWindow.java | 16 ++ Settings/SettingsController.java | 4 +- Settings/SettingsLayout.fxml | 2 +- appPanes/ControllerPane.java | 77 ++++++-- appPanes/ControllerSUB.java | 84 ++++++++- appPanes/subPane.fxml | 2 +- landingPage.fxml | 61 +++++-- lib/gson-2.8.5.jar | Bin 0 -> 241622 bytes localization/locale_en.properties | 28 ++- localization/locale_ru.properties | 27 ++- res/landing.css | 21 +-- 19 files changed, 663 insertions(+), 217 deletions(-) create mode 100644 Playlists/JsonStorage.java create mode 100644 Playlists/Playlists.java create mode 100644 ServiceWindow.java create mode 100644 lib/gson-2.8.5.jar diff --git a/About/AboutController.java b/About/AboutController.java index be1778f..38a47ad 100644 --- a/About/AboutController.java +++ b/About/AboutController.java @@ -2,20 +2,27 @@ package mplayer4anime.About; import javafx.application.HostServices; import javafx.fxml.FXML; +import javafx.fxml.Initializable; import javafx.scene.control.Button; +import javafx.scene.control.TextArea; import javafx.stage.Stage; +import java.net.URL; +import java.util.ResourceBundle; -public class AboutController { + +public class AboutController implements Initializable { private HostServices hostServices; - public void setHostServices(HostServices hs){ + void setHostServices(HostServices hs){ this.hostServices = hs; } @FXML private Button buttonOk; + @FXML + private TextArea GSONLicense; @FXML private void buttonClickOk(){ @@ -38,6 +45,29 @@ public class AboutController { e.printStackTrace(); } } + @FXML + private void libGSON(){ + try { + hostServices.showDocument("https://github.com/google/gson"); + } catch (Exception e){ + e.printStackTrace(); + } + } - + @Override + public void initialize(URL url, ResourceBundle resourceBundle) { + GSONLicense.setText("Copyright 2008 Google Inc.\n" + + "\n" + + "Licensed under the Apache License, Version 2.0 (the \"License\");\n" + + "you may not use this file except in compliance with the License.\n" + + "You may obtain a copy of the License at\n" + + "\n" + + " http://www.apache.org/licenses/LICENSE-2.0\n" + + "\n" + + "Unless required by applicable law or agreed to in writing, software\n" + + "distributed under the License is distributed on an \"AS IS\" BASIS,\n" + + "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n" + + "See the License for the specific language governing permissions and\n" + + "limitations under the License."); + } } diff --git a/About/AboutLayout.fxml b/About/AboutLayout.fxml index 5723966..55da844 100644 --- a/About/AboutLayout.fxml +++ b/About/AboutLayout.fxml @@ -4,6 +4,7 @@ + @@ -42,6 +43,15 @@ + + + + + + +