Settings fxml structure cleanup & Updater supports beta channel
* the updater now supports a beta channel * the settings Pane was reorganized for better maintenance * code cleanup
This commit is contained in:
parent
5297c614d5
commit
a3efefe43f
|
@ -96,76 +96,121 @@ import kellerkinder.HomeFlix.controller.apiQuery;
|
||||||
import kellerkinder.HomeFlix.datatypes.tableData;
|
import kellerkinder.HomeFlix.datatypes.tableData;
|
||||||
|
|
||||||
public class MainWindowController {
|
public class MainWindowController {
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private AnchorPane anpane;
|
private AnchorPane mainAnchorPane;
|
||||||
@FXML
|
|
||||||
private AnchorPane settingsAnchor;
|
|
||||||
@FXML
|
@FXML
|
||||||
private AnchorPane streamingSettingsAnchor;
|
private AnchorPane streamingSettingsAnchorPane;
|
||||||
|
|
||||||
|
@FXML
|
||||||
|
private ScrollPane settingsScrollPane;
|
||||||
|
|
||||||
|
@FXML
|
||||||
|
private ScrollPane textScrollPane;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private HBox topHBox;
|
private HBox topHBox;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private VBox sideMenuVBox;
|
private VBox sideMenuVBox;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private TreeTableView<tableData> treeTableViewfilm;
|
private TreeTableView<tableData> treeTableViewfilm;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private TableView<tableData> tableViewStreamingdata;
|
private TableView<tableData> tableViewStreamingdata;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private TextFlow textFlow;
|
private TextFlow textFlow;
|
||||||
@FXML
|
|
||||||
ScrollPane scrollPane;
|
|
||||||
@FXML
|
@FXML
|
||||||
private JFXButton playbtn;
|
private JFXButton playbtn;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private JFXButton openfolderbtn;
|
private JFXButton openfolderbtn;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private JFXButton returnBtn;
|
private JFXButton returnBtn;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private JFXButton forwardBtn;
|
private JFXButton forwardBtn;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private JFXButton infoBtn;
|
private JFXButton infoBtn;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private JFXButton settingsBtn;
|
private JFXButton settingsBtn;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private JFXButton streamingSettingsBtn;
|
private JFXButton streamingSettingsBtn;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private JFXButton switchBtn;
|
private JFXButton switchBtn;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private JFXButton debugBtn;
|
private JFXButton debugBtn;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
public JFXButton updateBtn;
|
public JFXButton updateBtn;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private JFXButton directoryBtn;
|
private JFXButton directoryBtn;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private JFXButton streamingDirectoryBtn;
|
private JFXButton streamingDirectoryBtn;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private JFXHamburger menuHam;
|
private JFXHamburger menuHam;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private JFXToggleButton autoUpdateToggleBtn;
|
private JFXToggleButton autoUpdateToggleBtn;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
public JFXTextField tfPath;
|
public JFXTextField filmDirTextField;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
public JFXTextField tfStreamingPath;
|
public JFXTextField streamingPathTextField;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private JFXTextField tfsearch;
|
private JFXTextField searchTextField;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
public JFXColorPicker mainColor;
|
public JFXColorPicker colorPicker;
|
||||||
|
|
||||||
|
@FXML
|
||||||
|
public ChoiceBox<String> languageChoisBox = new ChoiceBox<>();
|
||||||
|
|
||||||
|
@FXML
|
||||||
|
public ChoiceBox<String> branchChoisBox = new ChoiceBox<>();
|
||||||
|
|
||||||
|
@FXML
|
||||||
|
public JFXSlider fontsizeSlider;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
public ChoiceBox<String> cbLocal = new ChoiceBox<>();
|
private Label homeflixSettingsLbl;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
public JFXSlider sliderFontSize;
|
private Label filmDirectoryLbl;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private Label versionLabel;
|
private Label mainColorLbl;
|
||||||
|
|
||||||
|
@FXML
|
||||||
|
private Label fontsizeLbl;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private Label fontsizeLabel;
|
private Label languageLbl;
|
||||||
@FXML
|
|
||||||
private Label autoUpdateLabel;
|
@FXML
|
||||||
@FXML
|
private Label updateLbl;
|
||||||
private Label settingsHead1Label;
|
|
||||||
@FXML
|
@FXML
|
||||||
private Label mainColorLabel;
|
private Label branchLbl;
|
||||||
@FXML
|
|
||||||
private Label localLabel;
|
@FXML
|
||||||
|
private Label versionLbl;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private ImageView image1;
|
private ImageView image1;
|
||||||
|
|
||||||
|
@ -232,7 +277,8 @@ public class MainWindowController {
|
||||||
private ResourceBundle bundle;
|
private ResourceBundle bundle;
|
||||||
|
|
||||||
private ObservableList<tableData> filterData = FXCollections.observableArrayList();
|
private ObservableList<tableData> filterData = FXCollections.observableArrayList();
|
||||||
private ObservableList<String> locals = FXCollections.observableArrayList("English (en_US)", "Deutsch (de_DE)");
|
private ObservableList<String> languages = FXCollections.observableArrayList("English (en_US)", "Deutsch (de_DE)");
|
||||||
|
private ObservableList<String> branches = FXCollections.observableArrayList("stable", "beta");
|
||||||
private ObservableList<tableData> localFilms = FXCollections.observableArrayList();
|
private ObservableList<tableData> localFilms = FXCollections.observableArrayList();
|
||||||
private ObservableList<tableData> streamingFilms = FXCollections.observableArrayList();
|
private ObservableList<tableData> streamingFilms = FXCollections.observableArrayList();
|
||||||
private ObservableList<tableData> streamingData = FXCollections.observableArrayList();
|
private ObservableList<tableData> streamingData = FXCollections.observableArrayList();
|
||||||
|
@ -364,19 +410,19 @@ public class MainWindowController {
|
||||||
menuTrue = false;
|
menuTrue = false;
|
||||||
}
|
}
|
||||||
if(settingsTrue == true){
|
if(settingsTrue == true){
|
||||||
settingsAnchor.setVisible(false);
|
settingsScrollPane.setVisible(false);
|
||||||
setPath(tfPath.getText());
|
setPath(filmDirTextField.getText());
|
||||||
saveSettings();
|
saveSettings();
|
||||||
settingsTrue = false;
|
settingsTrue = false;
|
||||||
}
|
}
|
||||||
if(streamingSettingsTrue == true){
|
if(streamingSettingsTrue == true){
|
||||||
streamingSettingsAnchor.setVisible(false);
|
streamingSettingsAnchorPane.setVisible(false);
|
||||||
streamingSettingsTrue = false;
|
streamingSettingsTrue = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
tfsearch.textProperty().addListener(new ChangeListener<String>() {
|
searchTextField.textProperty().addListener(new ChangeListener<String>() {
|
||||||
@Override
|
@Override
|
||||||
public void changed(ObservableValue<? extends String> observable,String oldValue, String newValue) {
|
public void changed(ObservableValue<? extends String> observable,String oldValue, String newValue) {
|
||||||
ObservableList<tableData> helpData;
|
ObservableList<tableData> helpData;
|
||||||
|
@ -390,7 +436,7 @@ public class MainWindowController {
|
||||||
}
|
}
|
||||||
|
|
||||||
for(int i = 0; i < helpData.size(); i++){
|
for(int i = 0; i < helpData.size(); i++){
|
||||||
if(helpData.get(i).getTitle().toLowerCase().contains(tfsearch.getText().toLowerCase())){
|
if(helpData.get(i).getTitle().toLowerCase().contains(searchTextField.getText().toLowerCase())){
|
||||||
filterData.add(helpData.get(i)); //add data from newDaten to filteredData where title contains search input
|
filterData.add(helpData.get(i)); //add data from newDaten to filteredData where title contains search input
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -398,17 +444,17 @@ public class MainWindowController {
|
||||||
for(int i = 0; i < filterData.size(); i++){
|
for(int i = 0; i < filterData.size(); i++){
|
||||||
root.getChildren().add(new TreeItem<tableData>(filterData.get(i))); //add filtered data to root node after search
|
root.getChildren().add(new TreeItem<tableData>(filterData.get(i))); //add filtered data to root node after search
|
||||||
}
|
}
|
||||||
if(tfsearch.getText().hashCode()== hashA){
|
if(searchTextField.getText().hashCode()== hashA){
|
||||||
setColor("000000");
|
setColor("000000");
|
||||||
applyColor();
|
applyColor();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
cbLocal.getSelectionModel().selectedIndexProperty().addListener(new ChangeListener<Number>() {
|
languageChoisBox.getSelectionModel().selectedIndexProperty().addListener(new ChangeListener<Number>() {
|
||||||
@Override
|
@Override
|
||||||
public void changed(ObservableValue<? extends Number> ov, Number value, Number new_value) {
|
public void changed(ObservableValue<? extends Number> ov, Number value, Number new_value) {
|
||||||
String local = cbLocal.getItems().get((int) new_value).toString();
|
String local = languageChoisBox.getItems().get((int) new_value).toString();
|
||||||
local = local.substring(local.length()-6,local.length()-1); //reading only en_US from English (en_US)
|
local = local.substring(local.length()-6,local.length()-1); //reading only en_US from English (en_US)
|
||||||
setLocal(local);
|
setLocal(local);
|
||||||
setLocalUI();
|
setLocalUI();
|
||||||
|
@ -416,10 +462,22 @@ public class MainWindowController {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
sliderFontSize.valueProperty().addListener(new ChangeListener<Number>() {
|
branchChoisBox.getSelectionModel().selectedIndexProperty().addListener(new ChangeListener<Number>() {
|
||||||
|
@Override
|
||||||
|
public void changed(ObservableValue<? extends Number> ov, Number value, Number new_value) {
|
||||||
|
if (branchChoisBox.getItems().get((int) new_value).toString() == "beta") {
|
||||||
|
setUseBeta(true);
|
||||||
|
} else {
|
||||||
|
setUseBeta(false);
|
||||||
|
}
|
||||||
|
saveSettings();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
fontsizeSlider.valueProperty().addListener(new ChangeListener<Number>() {
|
||||||
@Override
|
@Override
|
||||||
public void changed(ObservableValue<? extends Number> ov,Number old_val, Number new_val) {
|
public void changed(ObservableValue<? extends Number> ov,Number old_val, Number new_val) {
|
||||||
setSize(sliderFontSize.getValue());
|
setSize(fontsizeSlider.getValue());
|
||||||
|
|
||||||
if(name != null){
|
if(name != null){
|
||||||
dbController.readCache(datPath);
|
dbController.readCache(datPath);
|
||||||
|
@ -530,13 +588,20 @@ public class MainWindowController {
|
||||||
debugBtn.setDisable(true); // debugging button for tests
|
debugBtn.setDisable(true); // debugging button for tests
|
||||||
debugBtn.setVisible(false);
|
debugBtn.setVisible(false);
|
||||||
|
|
||||||
tfPath.setText(getPath());
|
filmDirTextField.setText(getPath());
|
||||||
sliderFontSize.setValue(getSize());
|
fontsizeSlider.setValue(getSize());
|
||||||
mainColor.setValue(Color.valueOf(getColor()));
|
colorPicker.setValue(Color.valueOf(getColor()));
|
||||||
|
|
||||||
updateBtn.setFont(Font.font("System", 12));
|
updateBtn.setFont(Font.font("System", 12));
|
||||||
autoUpdateToggleBtn.setSelected(isAutoUpdate());
|
autoUpdateToggleBtn.setSelected(isAutoUpdate());
|
||||||
cbLocal.setItems(locals);
|
languageChoisBox.setItems(languages);
|
||||||
|
branchChoisBox.setItems(branches);
|
||||||
|
|
||||||
|
if (isUseBeta()) {
|
||||||
|
branchChoisBox.getSelectionModel().select(1);
|
||||||
|
} else {
|
||||||
|
branchChoisBox.getSelectionModel().select(0);
|
||||||
|
}
|
||||||
|
|
||||||
setLocalUI();
|
setLocalUI();
|
||||||
applyColor();
|
applyColor();
|
||||||
|
@ -634,14 +699,14 @@ public class MainWindowController {
|
||||||
private void settingsBtnclicked(){
|
private void settingsBtnclicked(){
|
||||||
if(settingsTrue == false){
|
if(settingsTrue == false){
|
||||||
if(streamingSettingsTrue == true){
|
if(streamingSettingsTrue == true){
|
||||||
streamingSettingsAnchor.setVisible(false);
|
streamingSettingsAnchorPane.setVisible(false);
|
||||||
streamingSettingsTrue = false;
|
streamingSettingsTrue = false;
|
||||||
}
|
}
|
||||||
settingsAnchor.setVisible(true);
|
settingsScrollPane.setVisible(true);
|
||||||
settingsTrue = true;
|
settingsTrue = true;
|
||||||
}else{
|
}else{
|
||||||
settingsAnchor.setVisible(false);
|
settingsScrollPane.setVisible(false);
|
||||||
setPath(tfPath.getText());
|
setPath(filmDirTextField.getText());
|
||||||
saveSettings();
|
saveSettings();
|
||||||
settingsTrue = false;
|
settingsTrue = false;
|
||||||
}
|
}
|
||||||
|
@ -654,13 +719,13 @@ public class MainWindowController {
|
||||||
private void streamingSettingsBtnclicked(){
|
private void streamingSettingsBtnclicked(){
|
||||||
if(streamingSettingsTrue == false){
|
if(streamingSettingsTrue == false){
|
||||||
if(settingsTrue == true){
|
if(settingsTrue == true){
|
||||||
settingsAnchor.setVisible(false);
|
settingsScrollPane.setVisible(false);
|
||||||
settingsTrue = false;
|
settingsTrue = false;
|
||||||
}
|
}
|
||||||
streamingSettingsAnchor.setVisible(true);
|
streamingSettingsAnchorPane.setVisible(true);
|
||||||
streamingSettingsTrue = true;
|
streamingSettingsTrue = true;
|
||||||
}else{
|
}else{
|
||||||
streamingSettingsAnchor.setVisible(false);
|
streamingSettingsAnchorPane.setVisible(false);
|
||||||
streamingSettingsTrue = false;
|
streamingSettingsTrue = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -677,8 +742,8 @@ public class MainWindowController {
|
||||||
saveSettings();
|
saveSettings();
|
||||||
root.getChildren().remove(0,root.getChildren().size());
|
root.getChildren().remove(0,root.getChildren().size());
|
||||||
addDataUI();
|
addDataUI();
|
||||||
settingsAnchor.setVisible(false);
|
settingsScrollPane.setVisible(false);
|
||||||
streamingSettingsAnchor.setVisible(false);
|
streamingSettingsAnchorPane.setVisible(false);
|
||||||
sideMenuSlideOut(); //disables side-menu
|
sideMenuSlideOut(); //disables side-menu
|
||||||
menuTrue = false;
|
menuTrue = false;
|
||||||
settingsTrue = false;
|
settingsTrue = false;
|
||||||
|
@ -692,8 +757,8 @@ public class MainWindowController {
|
||||||
|
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private void tfPathAction(){
|
private void filmDirTextFieldAction(){
|
||||||
setPath(tfPath.getText());
|
setPath(filmDirTextField.getText());
|
||||||
saveSettings();
|
saveSettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -705,7 +770,7 @@ public class MainWindowController {
|
||||||
}else{
|
}else{
|
||||||
setPath(selectedFolder.getAbsolutePath());
|
setPath(selectedFolder.getAbsolutePath());
|
||||||
saveSettings();
|
saveSettings();
|
||||||
tfPath.setText(getPath());
|
filmDirTextField.setText(getPath());
|
||||||
try {
|
try {
|
||||||
Runtime.getRuntime().exec("java -jar ProjectHomeFlix.jar"); //start again
|
Runtime.getRuntime().exec("java -jar ProjectHomeFlix.jar"); //start again
|
||||||
System.exit(0); //finishes itself
|
System.exit(0); //finishes itself
|
||||||
|
@ -716,8 +781,8 @@ public class MainWindowController {
|
||||||
}
|
}
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private void mainColorAction(){
|
private void colorPickerAction(){
|
||||||
editColor(mainColor.getValue().toString());
|
editColor(colorPicker.getValue().toString());
|
||||||
applyColor();
|
applyColor();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -740,7 +805,7 @@ public class MainWindowController {
|
||||||
}
|
}
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private void tfStreamingPathAction(){
|
private void streamingPathTextFieldAction(){
|
||||||
//
|
//
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -752,7 +817,7 @@ public class MainWindowController {
|
||||||
}else{
|
}else{
|
||||||
setStreamingPath(selectedStreamingFolder.getAbsolutePath());
|
setStreamingPath(selectedStreamingFolder.getAbsolutePath());
|
||||||
saveSettings();
|
saveSettings();
|
||||||
tfStreamingPath.setText(getStreamingPath());
|
streamingPathTextField.setText(getStreamingPath());
|
||||||
try {
|
try {
|
||||||
Runtime.getRuntime().exec("java -jar ProjectHomeFlix.jar"); //start again
|
Runtime.getRuntime().exec("java -jar ProjectHomeFlix.jar"); //start again
|
||||||
System.exit(0); //finishes itself
|
System.exit(0); //finishes itself
|
||||||
|
@ -836,8 +901,8 @@ public class MainWindowController {
|
||||||
|
|
||||||
sideMenuVBox.setStyle(style);
|
sideMenuVBox.setStyle(style);
|
||||||
topHBox.setStyle(style);
|
topHBox.setStyle(style);
|
||||||
tfsearch.setFocusColor(Color.valueOf(getColor()));
|
searchTextField.setFocusColor(Color.valueOf(getColor()));
|
||||||
tfPath.setFocusColor(Color.valueOf(getColor()));
|
filmDirTextField.setFocusColor(Color.valueOf(getColor()));
|
||||||
|
|
||||||
if (icolor.compareTo(ccolor) == -1) {
|
if (icolor.compareTo(ccolor) == -1) {
|
||||||
settingsBtn.setStyle("-fx-text-fill: WHITE;");
|
settingsBtn.setStyle("-fx-text-fill: WHITE;");
|
||||||
|
@ -918,33 +983,34 @@ public class MainWindowController {
|
||||||
switch (getLocal()) {
|
switch (getLocal()) {
|
||||||
case "en_US":
|
case "en_US":
|
||||||
setBundle(ResourceBundle.getBundle("locals.HomeFlix-Local", Locale.US)); // us_English
|
setBundle(ResourceBundle.getBundle("locals.HomeFlix-Local", Locale.US)); // us_English
|
||||||
cbLocal.getSelectionModel().select(0);
|
languageChoisBox.getSelectionModel().select(0);
|
||||||
break;
|
break;
|
||||||
case "de_DE":
|
case "de_DE":
|
||||||
setBundle(ResourceBundle.getBundle("locals.HomeFlix-Local", Locale.GERMAN)); // German
|
setBundle(ResourceBundle.getBundle("locals.HomeFlix-Local", Locale.GERMAN)); // German
|
||||||
cbLocal.getSelectionModel().select(1);
|
languageChoisBox.getSelectionModel().select(1);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
setBundle(ResourceBundle.getBundle("locals.HomeFlix-Local", Locale.US)); // default local
|
setBundle(ResourceBundle.getBundle("locals.HomeFlix-Local", Locale.US)); // default local
|
||||||
cbLocal.getSelectionModel().select(0);
|
languageChoisBox.getSelectionModel().select(0);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
infoBtn.setText(getBundle().getString("info"));
|
infoBtn.setText(getBundle().getString("info"));
|
||||||
settingsBtn.setText(getBundle().getString("settings"));
|
settingsBtn.setText(getBundle().getString("settings"));
|
||||||
streamingSettingsBtn.setText(getBundle().getString("streamingSettings"));
|
streamingSettingsBtn.setText(getBundle().getString("streamingSettings"));
|
||||||
tfPath.setPromptText(getBundle().getString("tfPath"));
|
filmDirTextField.setPromptText(getBundle().getString("filmDirTextField"));
|
||||||
tfStreamingPath.setPromptText(getBundle().getString("tfPath"));
|
streamingPathTextField.setPromptText(getBundle().getString("filmDirTextField"));
|
||||||
tfsearch.setPromptText(getBundle().getString("tfSearch"));
|
searchTextField.setPromptText(getBundle().getString("tfSearch"));
|
||||||
openfolderbtn.setText(getBundle().getString("openFolder"));
|
openfolderbtn.setText(getBundle().getString("openFolder"));
|
||||||
updateBtn.setText(getBundle().getString("checkUpdates"));
|
updateBtn.setText(getBundle().getString("checkUpdates"));
|
||||||
directoryBtn.setText(getBundle().getString("chooseFolder"));
|
directoryBtn.setText(getBundle().getString("chooseFolder"));
|
||||||
streamingDirectoryBtn.setText(getBundle().getString("chooseFolder"));
|
streamingDirectoryBtn.setText(getBundle().getString("chooseFolder"));
|
||||||
settingsHead1Label.setText(getBundle().getString("settingsHead1Label"));
|
homeflixSettingsLbl.setText(getBundle().getString("homeflixSettingsLbl"));
|
||||||
mainColorLabel.setText(getBundle().getString("mainColorLabel"));
|
mainColorLbl.setText(getBundle().getString("mainColorLbl"));
|
||||||
fontsizeLabel.setText(getBundle().getString("fontsizeLabel"));
|
fontsizeLbl.setText(getBundle().getString("fontsizeLbl"));
|
||||||
localLabel.setText(getBundle().getString("localLabel"));
|
languageLbl.setText(getBundle().getString("languageLbl"));
|
||||||
autoUpdateLabel.setText(getBundle().getString("autoUpdateLabel"));
|
autoUpdateToggleBtn.setText(getBundle().getString("autoUpdate"));
|
||||||
versionLabel.setText(getBundle().getString("version") + " " + version + " (Build: " + buildNumber + ")");
|
branchLbl.setText(getBundle().getString("branchLbl"));
|
||||||
|
versionLbl.setText(getBundle().getString("version") + " " + version + " (Build: " + buildNumber + ")");
|
||||||
columnTitel.setText(getBundle().getString("columnName"));
|
columnTitel.setText(getBundle().getString("columnName"));
|
||||||
columnRating.setText(getBundle().getString("columnRating"));
|
columnRating.setText(getBundle().getString("columnRating"));
|
||||||
columnStreamUrl.setText(getBundle().getString("columnStreamUrl"));
|
columnStreamUrl.setText(getBundle().getString("columnStreamUrl"));
|
||||||
|
@ -999,6 +1065,7 @@ public class MainWindowController {
|
||||||
props.setProperty("path", getPath()); // writes path into property
|
props.setProperty("path", getPath()); // writes path into property
|
||||||
props.setProperty("color", getColor());
|
props.setProperty("color", getColor());
|
||||||
props.setProperty("autoUpdate", String.valueOf(isAutoUpdate()));
|
props.setProperty("autoUpdate", String.valueOf(isAutoUpdate()));
|
||||||
|
props.setProperty("useBeta", String.valueOf(isUseBeta()));
|
||||||
props.setProperty("size", getSize().toString());
|
props.setProperty("size", getSize().toString());
|
||||||
props.setProperty("local", getLocal());
|
props.setProperty("local", getLocal());
|
||||||
props.setProperty("streamingPath", getStreamingPath());
|
props.setProperty("streamingPath", getStreamingPath());
|
||||||
|
@ -1055,6 +1122,13 @@ public class MainWindowController {
|
||||||
LOGGER.error("cloud not load autoUpdate", e);
|
LOGGER.error("cloud not load autoUpdate", e);
|
||||||
setAutoUpdate(false);
|
setAutoUpdate(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
setUseBeta(Boolean.parseBoolean(props.getProperty("useBeta")));
|
||||||
|
} catch (Exception e) {
|
||||||
|
LOGGER.error("cloud not load autoUpdate", e);
|
||||||
|
setUseBeta(false);
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
setLocal(props.getProperty("local"));
|
setLocal(props.getProperty("local"));
|
||||||
|
@ -1159,6 +1233,14 @@ public class MainWindowController {
|
||||||
return autoUpdate;
|
return autoUpdate;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isUseBeta() {
|
||||||
|
return useBeta;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUseBeta(boolean useBeta) {
|
||||||
|
this.useBeta = useBeta;
|
||||||
|
}
|
||||||
|
|
||||||
public void setLocal(String input) {
|
public void setLocal(String input) {
|
||||||
this.local = input;
|
this.local = input;
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
<?import javafx.scene.control.ChoiceBox?>
|
<?import javafx.scene.control.ChoiceBox?>
|
||||||
<?import javafx.scene.control.Label?>
|
<?import javafx.scene.control.Label?>
|
||||||
<?import javafx.scene.control.ScrollPane?>
|
<?import javafx.scene.control.ScrollPane?>
|
||||||
|
<?import javafx.scene.control.Separator?>
|
||||||
<?import javafx.scene.control.TableView?>
|
<?import javafx.scene.control.TableView?>
|
||||||
<?import javafx.scene.control.TreeTableView?>
|
<?import javafx.scene.control.TreeTableView?>
|
||||||
<?import javafx.scene.image.Image?>
|
<?import javafx.scene.image.Image?>
|
||||||
|
@ -20,9 +21,9 @@
|
||||||
<?import javafx.scene.text.Font?>
|
<?import javafx.scene.text.Font?>
|
||||||
<?import javafx.scene.text.TextFlow?>
|
<?import javafx.scene.text.TextFlow?>
|
||||||
|
|
||||||
<AnchorPane fx:id="anpane" prefHeight="600.0" prefWidth="950.0" xmlns="http://javafx.com/javafx/9" xmlns:fx="http://javafx.com/fxml/1" fx:controller="kellerkinder.HomeFlix.application.MainWindowController">
|
<AnchorPane fx:id="mainAnchorPane" prefHeight="600.0" prefWidth="950.0" xmlns="http://javafx.com/javafx/9" xmlns:fx="http://javafx.com/fxml/1" fx:controller="kellerkinder.HomeFlix.application.MainWindowController">
|
||||||
<children>
|
<children>
|
||||||
<ScrollPane fx:id="scrollPane" fitToWidth="true" layoutX="408.0" layoutY="44.0" prefHeight="544.0" prefWidth="320.0" AnchorPane.bottomAnchor="12.0" AnchorPane.leftAnchor="408.0" AnchorPane.rightAnchor="222.0" AnchorPane.topAnchor="44.0">
|
<ScrollPane fx:id="textScrollPane" fitToWidth="true" layoutX="408.0" layoutY="44.0" prefHeight="544.0" prefWidth="320.0" AnchorPane.bottomAnchor="12.0" AnchorPane.leftAnchor="408.0" AnchorPane.rightAnchor="222.0" AnchorPane.topAnchor="44.0">
|
||||||
<content>
|
<content>
|
||||||
<TextFlow fx:id="textFlow" accessibleRole="TEXT_AREA" maxHeight="544.0" maxWidth="320.0" visible="true" />
|
<TextFlow fx:id="textFlow" accessibleRole="TEXT_AREA" maxHeight="544.0" maxWidth="320.0" visible="true" />
|
||||||
</content>
|
</content>
|
||||||
|
@ -36,7 +37,7 @@
|
||||||
<font>
|
<font>
|
||||||
<Font name="System Bold" size="14.0" />
|
<Font name="System Bold" size="14.0" />
|
||||||
</font></JFXButton>
|
</font></JFXButton>
|
||||||
<JFXTextField fx:id="tfsearch" layoutX="12.0" layoutY="44.0" maxWidth="477.0" minWidth="359.0" prefHeight="31.0" prefWidth="370.0" promptText="Suche ..." AnchorPane.leftAnchor="12.0" AnchorPane.rightAnchor="568.0" AnchorPane.topAnchor="44.0">
|
<JFXTextField fx:id="searchTextField" layoutX="12.0" layoutY="44.0" maxWidth="477.0" minWidth="359.0" prefHeight="31.0" prefWidth="370.0" promptText="search ..." AnchorPane.leftAnchor="12.0" AnchorPane.rightAnchor="568.0" AnchorPane.topAnchor="44.0">
|
||||||
<font>
|
<font>
|
||||||
<Font name="Arial" size="12.0" />
|
<Font name="Arial" size="12.0" />
|
||||||
</font></JFXTextField>
|
</font></JFXTextField>
|
||||||
|
@ -84,32 +85,105 @@
|
||||||
</JFXButton>
|
</JFXButton>
|
||||||
</children>
|
</children>
|
||||||
</VBox>
|
</VBox>
|
||||||
<AnchorPane fx:id="streamingSettingsAnchor" layoutX="138.0" layoutY="33.0" prefHeight="566.0" prefWidth="760.0" style="-fx-background-color: #FFFFFF;" visible="false" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="150.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="38.0">
|
<ScrollPane fx:id="settingsScrollPane" style="-fx-background: white;" visible="false" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="150.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="32.0">
|
||||||
|
<content>
|
||||||
|
<AnchorPane fx:id="settingsAnchorPane" style="-fx-background-color: white;">
|
||||||
|
<children>
|
||||||
|
<VBox spacing="30.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
|
||||||
|
<padding>
|
||||||
|
<Insets bottom="14.0" top="14.0" />
|
||||||
|
</padding>
|
||||||
|
<children>
|
||||||
|
<VBox prefHeight="193.0" prefWidth="797.0" spacing="25.0">
|
||||||
|
<padding>
|
||||||
|
<Insets left="24.0" />
|
||||||
|
</padding>
|
||||||
|
<children>
|
||||||
|
<VBox>
|
||||||
|
<children>
|
||||||
|
<Label fx:id="homeflixSettingsLbl" text="HomeFlix Settings">
|
||||||
|
<font>
|
||||||
|
<Font name="System Bold" size="14.0" />
|
||||||
|
</font>
|
||||||
|
</Label>
|
||||||
|
<Separator prefWidth="200.0">
|
||||||
|
<padding>
|
||||||
|
<Insets right="5.0" />
|
||||||
|
</padding>
|
||||||
|
</Separator>
|
||||||
|
</children>
|
||||||
|
<padding>
|
||||||
|
<Insets left="-14.0" />
|
||||||
|
</padding>
|
||||||
|
</VBox>
|
||||||
|
<VBox spacing="7.0">
|
||||||
|
<padding>
|
||||||
|
<Insets right="5.0" />
|
||||||
|
</padding>
|
||||||
|
<children>
|
||||||
|
<Label fx:id="filmDirectoryLbl" text="Film Directory" />
|
||||||
|
<HBox spacing="10.0">
|
||||||
|
<children>
|
||||||
|
<JFXTextField fx:id="filmDirTextField" maxWidth="305.0" minWidth="305.0" onAction="#filmDirTextFieldAction" prefHeight="32.0" prefWidth="305.0" promptText="Film Directory" />
|
||||||
|
<JFXButton fx:id="directoryBtn" onAction="#directoryBtnAction" prefHeight="32.0" text="choose directory" />
|
||||||
|
</children>
|
||||||
|
</HBox>
|
||||||
|
</children>
|
||||||
|
</VBox>
|
||||||
|
<HBox minHeight="25.0" spacing="10.0">
|
||||||
|
<children>
|
||||||
|
<Label fx:id="mainColorLbl" prefHeight="25.0" text="Main-Color" />
|
||||||
|
<JFXColorPicker fx:id="colorPicker" onAction="#colorPickerAction" />
|
||||||
|
</children>
|
||||||
|
</HBox>
|
||||||
|
<HBox spacing="10.0">
|
||||||
|
<children>
|
||||||
|
<Label fx:id="fontsizeLbl" text="Fontsize" />
|
||||||
|
<JFXSlider fx:id="fontsizeSlider" max="48.0" min="2.0" prefWidth="250.0" />
|
||||||
|
</children>
|
||||||
|
</HBox>
|
||||||
|
<HBox prefHeight="100.0" prefWidth="200.0" spacing="10.0">
|
||||||
|
<children>
|
||||||
|
<Label fx:id="languageLbl" prefHeight="25.0" text="Language" />
|
||||||
|
<ChoiceBox fx:id="languageChoisBox" prefWidth="150.0" />
|
||||||
|
</children>
|
||||||
|
</HBox>
|
||||||
|
<VBox spacing="10.0">
|
||||||
|
<children>
|
||||||
|
<Label fx:id="updateLbl" text="Updates" />
|
||||||
|
<HBox spacing="10.0">
|
||||||
|
<children>
|
||||||
|
<JFXButton fx:id="updateBtn" onAction="#updateBtnAction" text="check now" />
|
||||||
|
<Label fx:id="branchLbl" prefHeight="25.0" text="Branch">
|
||||||
|
<padding>
|
||||||
|
<Insets right="-5.0" />
|
||||||
|
</padding>
|
||||||
|
</Label>
|
||||||
|
<ChoiceBox fx:id="branchChoisBox" prefWidth="150.0" />
|
||||||
|
</children>
|
||||||
|
</HBox>
|
||||||
|
<JFXToggleButton fx:id="autoUpdateToggleBtn" onAction="#autoUpdateToggleBtnAction" text="check for updates on startup" />
|
||||||
|
</children>
|
||||||
|
</VBox>
|
||||||
|
<Label fx:id="versionLbl" text="Version" />
|
||||||
|
</children>
|
||||||
|
</VBox>
|
||||||
|
<VBox spacing="25.0">
|
||||||
|
<padding>
|
||||||
|
<Insets left="24.0" />
|
||||||
|
</padding>
|
||||||
|
</VBox>
|
||||||
|
</children>
|
||||||
|
</VBox>
|
||||||
|
</children>
|
||||||
|
</AnchorPane>
|
||||||
|
</content>
|
||||||
|
</ScrollPane>
|
||||||
|
<AnchorPane fx:id="streamingSettingsAnchorPane" layoutX="138.0" layoutY="33.0" prefHeight="566.0" prefWidth="760.0" style="-fx-background-color: #FFFFFF;" visible="false" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="150.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="38.0">
|
||||||
<children>
|
<children>
|
||||||
<JFXTextField fx:id="tfStreamingPath" layoutX="14.0" layoutY="14.0" onAction="#tfStreamingPathAction" prefWidth="250.0" AnchorPane.leftAnchor="5.0" AnchorPane.topAnchor="5.0" />
|
<JFXTextField fx:id="streamingPathTextField" layoutX="14.0" layoutY="14.0" onAction="#streamingPathTextFieldAction" prefWidth="250.0" AnchorPane.leftAnchor="5.0" AnchorPane.topAnchor="5.0" />
|
||||||
<JFXButton fx:id="streamingDirectoryBtn" layoutX="263.0" layoutY="2.0" onAction="#streamingDirectoryBtnAction" prefHeight="25.0" prefWidth="115.0" AnchorPane.leftAnchor="260.0" AnchorPane.topAnchor="5.0" />
|
<JFXButton fx:id="streamingDirectoryBtn" layoutX="263.0" layoutY="2.0" onAction="#streamingDirectoryBtnAction" prefHeight="25.0" prefWidth="115.0" AnchorPane.leftAnchor="260.0" AnchorPane.topAnchor="5.0" />
|
||||||
<TableView fx:id="tableViewStreamingdata" layoutX="14.0" layoutY="44.0" prefHeight="517.0" prefWidth="370.0" AnchorPane.bottomAnchor="5.0" AnchorPane.leftAnchor="5.0" AnchorPane.topAnchor="40.0" />
|
<TableView fx:id="tableViewStreamingdata" layoutX="14.0" layoutY="44.0" prefHeight="517.0" prefWidth="370.0" AnchorPane.bottomAnchor="5.0" AnchorPane.leftAnchor="5.0" AnchorPane.topAnchor="40.0" />
|
||||||
</children></AnchorPane>
|
</children></AnchorPane>
|
||||||
<AnchorPane fx:id="settingsAnchor" layoutX="160.0" layoutY="44.0" prefHeight="566.0" prefWidth="760.0" style="-fx-background-color: #FFFFFF;" visible="false" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="150.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="38.0">
|
|
||||||
<children>
|
|
||||||
<JFXTextField fx:id="tfPath" layoutX="14.0" layoutY="81.0" onAction="#tfPathAction" prefWidth="250.0" AnchorPane.leftAnchor="14.0" AnchorPane.topAnchor="79.0" />
|
|
||||||
<JFXButton fx:id="directoryBtn" layoutX="276.0" layoutY="82.0" onAction="#directoryBtnAction" prefHeight="25.0" AnchorPane.leftAnchor="269.0" AnchorPane.topAnchor="82.0" />
|
|
||||||
<JFXColorPicker fx:id="mainColor" layoutX="118.0" layoutY="130.0" onAction="#mainColorAction" AnchorPane.leftAnchor="118.0" AnchorPane.topAnchor="130.0" />
|
|
||||||
<Label fx:id="fontsizeLabel" layoutX="14.0" layoutY="179.0" text="Fontsize" AnchorPane.leftAnchor="14.0" AnchorPane.topAnchor="175.0" />
|
|
||||||
<JFXSlider fx:id="sliderFontSize" layoutX="118.0" layoutY="177.0" max="48.0" min="2.0" prefWidth="250.0" AnchorPane.leftAnchor="118.0" AnchorPane.topAnchor="177.0" />
|
|
||||||
<ChoiceBox fx:id="cbLocal" layoutX="118.0" layoutY="208.0" prefWidth="150.0" AnchorPane.leftAnchor="118.0" AnchorPane.topAnchor="208.0" />
|
|
||||||
<JFXButton fx:id="updateBtn" layoutX="16.0" layoutY="269.0" onAction="#updateBtnAction" AnchorPane.leftAnchor="14.0" AnchorPane.topAnchor="253.0" />
|
|
||||||
<Label fx:id="autoUpdateLabel" layoutX="14.0" layoutY="310.0" prefHeight="17.0" text="check at startup for updates:" AnchorPane.leftAnchor="14.0" AnchorPane.topAnchor="298.0" />
|
|
||||||
<JFXToggleButton fx:id="autoUpdateToggleBtn" layoutX="14.0" layoutY="336.0" onAction="#autoUpdateToggleBtnAction" AnchorPane.leftAnchor="14.0" AnchorPane.topAnchor="320.0" />
|
|
||||||
<Label fx:id="versionLabel" layoutX="14.0" layoutY="418.0" text="Label" AnchorPane.leftAnchor="14.0" AnchorPane.topAnchor="396.0" />
|
|
||||||
<Label fx:id="settingsHead1Label" layoutX="14.0" layoutY="24.0" text="HomeFlix Settings" AnchorPane.leftAnchor="14.0" AnchorPane.topAnchor="24.0">
|
|
||||||
<font>
|
|
||||||
<Font name="System Bold" size="14.0" />
|
|
||||||
</font>
|
|
||||||
</Label>
|
|
||||||
<Label fx:id="mainColorLabel" layoutX="14.0" layoutY="134.0" prefHeight="25.0" text="Main-Color" AnchorPane.leftAnchor="14.0" AnchorPane.topAnchor="130.0" />
|
|
||||||
<Label fx:id="localLabel" layoutX="14.0" layoutY="207.0" text="Local" AnchorPane.leftAnchor="14.0" AnchorPane.topAnchor="212.0" />
|
|
||||||
</children>
|
|
||||||
</AnchorPane>
|
|
||||||
</children>
|
</children>
|
||||||
</AnchorPane>
|
</AnchorPane>
|
||||||
|
|
|
@ -8,17 +8,18 @@ tfSearch = Suche...
|
||||||
openFolder = Ordner \u00F6ffnen
|
openFolder = Ordner \u00F6ffnen
|
||||||
|
|
||||||
#settings translations
|
#settings translations
|
||||||
settingsHead1Label = HomeFlix Einstellungen
|
homeflixSettingsLbl = HomeFlix Einstellungen
|
||||||
tfPath = Pfad...
|
filmDirTextField = Pfad...
|
||||||
chooseFolder = Ordner ausw\u00E4hlen
|
chooseFolder = Ordner ausw\u00E4hlen
|
||||||
mainColorLabel = Hauptfarbe:
|
mainColorLbl = Hauptfarbe:
|
||||||
fontsizeLabel = Schriftgr\u00F6\u00DFe:
|
fontsizeLbl = Schriftgr\u00F6\u00DFe:
|
||||||
localLabel = Sprache:
|
languageLbl = Sprache:
|
||||||
checkUpdates = Auf Update pr\u00FCfen
|
checkUpdates = Auf Update pr\u00FCfen
|
||||||
updateBtnChecking = Es wird nach Updates gesucht...
|
updateBtnChecking = Es wird nach Updates gesucht...
|
||||||
updateBtnUpdateAvailable = Update verf\u00FCgbar
|
updateBtnUpdateAvailable = Update verf\u00FCgbar
|
||||||
updateBtnNoUpdateAvailable = Kein Update verf\u00FCgbar
|
updateBtnNoUpdateAvailable = Kein Update verf\u00FCgbar
|
||||||
autoUpdateLabel = beim Start nach Updates suchen:
|
autoUpdate = beim Start nach Updates suchen:
|
||||||
|
branchLbl = Updatezweig
|
||||||
version = Version:
|
version = Version:
|
||||||
|
|
||||||
#column translations
|
#column translations
|
||||||
|
|
|
@ -8,17 +8,18 @@ tfSearch = Search...
|
||||||
openFolder = open Folder
|
openFolder = open Folder
|
||||||
|
|
||||||
#settings translations
|
#settings translations
|
||||||
settingsHead1Label = HomeFlix Settings
|
homeflixSettingsLbl = HomeFlix Settings
|
||||||
tfPath = Path...
|
filmDirTextField = Path...
|
||||||
chooseFolder = choose Directory
|
chooseFolder = choose Directory
|
||||||
mainColorLabel = main color:
|
mainColorLbl = main color:
|
||||||
fontsizeLabel = font size:
|
fontsizeLbl = font size:
|
||||||
localLabel = local:
|
languageLbl = local:
|
||||||
checkUpdates = check for updates
|
checkUpdates = check for updates
|
||||||
updateBtnChecking = checking for updates...
|
updateBtnChecking = checking for updates...
|
||||||
updateBtnUpdateAvailable = update available
|
updateBtnUpdateAvailable = update available
|
||||||
updateBtnNoUpdateAvailable = no update available
|
updateBtnNoUpdateAvailable = no update available
|
||||||
autoUpdateLabel = check at startup for updates:
|
autoUpdate = check at startup for updates:
|
||||||
|
branchLbl = Branch
|
||||||
version = Version:
|
version = Version:
|
||||||
|
|
||||||
#column translations
|
#column translations
|
||||||
|
|
Loading…
Reference in New Issue