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 @@ + + + + + + +