mplayer4anime/About/AboutController.java
Dmitry Isaenko fb51e2c469 v0.11
Bug fixes. A lot of things added <3
2018-11-28 07:10:35 +03:00

83 lines
2.5 KiB
Java

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 implements Initializable {
private HostServices hostServices;
void setHostServices(HostServices hs){
this.hostServices = hs;
}
@FXML
private Button buttonOk;
@FXML
private TextArea GSONLicense;
@FXML
private void buttonClickOk(){
Stage thisStage = (Stage) buttonOk.getScene().getWindow();
thisStage.close();
}
@FXML
private void gitHubUrl(){
try {
hostServices.showDocument("https://github.com/developersu/mplayer4anime");
} catch (Exception e){
e.printStackTrace();
}
}
@FXML
private void bloggerUrl(){
try {
hostServices.showDocument("https://developersu.blogspot.com/search/label/mplayer4anime");
} catch (Exception e){
e.printStackTrace();
}
}
@FXML
private void libGSON(){
try {
hostServices.showDocument("https://github.com/google/gson");
} catch (Exception e){
e.printStackTrace();
}
}
@FXML
private void iconsMaterial(){
try {
hostServices.showDocument("https://materialdesignicons.com/");
} catch (Exception e){
e.printStackTrace();
}
}
//TODO note icons meaterial design
@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.");
}
}