corefx - moved background configuration to session menu, added icon path configuration to preferences
This commit is contained in:
parent
7e93b607c4
commit
6f0e22cc28
3 changed files with 10 additions and 6 deletions
|
@ -16,10 +16,11 @@ import java.io.IOException;
|
|||
|
||||
public class GuiPreferencesDialog extends StageDialog {
|
||||
private static final Logger logger = LogManager.getLogger();
|
||||
private @FXML JFXTextField xmlFilePathTextField;
|
||||
private @FXML JFXTextField mobilityFilePathTextField;
|
||||
private @FXML JFXTextField shellCommandTextField;
|
||||
private @FXML JFXButton saveButton;
|
||||
@FXML private JFXTextField xmlFilePathTextField;
|
||||
@FXML private JFXTextField mobilityFilePathTextField;
|
||||
@FXML private JFXTextField shellCommandTextField;
|
||||
@FXML private JFXTextField iconPathTextField;
|
||||
@FXML private JFXButton saveButton;
|
||||
|
||||
public GuiPreferencesDialog(Controller controller) {
|
||||
super(controller, "/fxml/gui_preferences.fxml");
|
||||
|
@ -34,6 +35,7 @@ public class GuiPreferencesDialog extends StageDialog {
|
|||
configuration.setXmlPath(xmlFilePathTextField.getText());
|
||||
configuration.setMobilityPath(mobilityFilePathTextField.getText());
|
||||
configuration.setShellCommand(shellCommandTextField.getText());
|
||||
configuration.setIconPath(iconPathTextField.getText());
|
||||
try {
|
||||
ConfigUtils.save(configuration);
|
||||
Toast.success("Updated preferences");
|
||||
|
@ -48,6 +50,7 @@ public class GuiPreferencesDialog extends StageDialog {
|
|||
xmlFilePathTextField.setText(configuration.getXmlPath());
|
||||
mobilityFilePathTextField.setText(configuration.getMobilityPath());
|
||||
shellCommandTextField.setText(configuration.getShellCommand());
|
||||
iconPathTextField.setText(configuration.getIconPath());
|
||||
show();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
<?import javafx.scene.control.TitledPane?>
|
||||
<?import javafx.scene.layout.VBox?>
|
||||
|
||||
|
||||
<VBox maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" spacing="10.0" xmlns="http://javafx.com/javafx/8.0.171" xmlns:fx="http://javafx.com/fxml/1">
|
||||
<children>
|
||||
<TitledPane animated="false" collapsible="false" text="File Paths">
|
||||
|
@ -16,6 +15,8 @@
|
|||
<JFXTextField fx:id="xmlFilePathTextField" />
|
||||
<Label text="Mobility Files" />
|
||||
<JFXTextField fx:id="mobilityFilePathTextField" />
|
||||
<Label text="Icon Path" />
|
||||
<JFXTextField fx:id="iconPathTextField" />
|
||||
</children>
|
||||
</VBox>
|
||||
</content>
|
||||
|
|
|
@ -28,7 +28,6 @@
|
|||
</items>
|
||||
</Menu>
|
||||
<MenuItem mnemonicParsing="false" onAction="#onOptionsMenuNodeTypes" text="Nodes" />
|
||||
<MenuItem mnemonicParsing="false" onAction="#onOptionsMenuBackground" text="Background" />
|
||||
<MenuItem mnemonicParsing="false" onAction="#onOptionsMenuPreferences" text="Preferences" />
|
||||
</items>
|
||||
</Menu>
|
||||
|
@ -37,6 +36,7 @@
|
|||
<MenuItem mnemonicParsing="false" onAction="#onJoinSessionMenu" text="Join" />
|
||||
<MenuItem mnemonicParsing="false" onAction="#onSessionHooksMenu" text="Hooks" />
|
||||
<MenuItem mnemonicParsing="false" onAction="#onOptionsMenuLocation" text="Location" />
|
||||
<MenuItem mnemonicParsing="false" onAction="#onOptionsMenuBackground" text="Background" />
|
||||
<MenuItem mnemonicParsing="false" onAction="#onSessionOptionsMenu" text="Options" />
|
||||
</items>
|
||||
</Menu>
|
||||
|
|
Loading…
Reference in a new issue