184 lines
11 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.CheckBox?>
<?import javafx.scene.control.DatePicker?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.ListView?>
<?import javafx.scene.control.PasswordField?>
<?import javafx.scene.control.RadioButton?>
<?import javafx.scene.control.ScrollPane?>
<?import javafx.scene.control.Separator?>
<?import javafx.scene.control.Spinner?>
<?import javafx.scene.control.TextField?>
<?import javafx.scene.control.ToggleGroup?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.FlowPane?>
<?import javafx.scene.layout.VBox?>
<?import javafx.scene.text.Font?>
<AnchorPane prefHeight="700.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/23.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="name.nathanmcrae.numbersstation.MainSettingsController">
<children>
<ScrollPane fitToWidth="true" hbarPolicy="NEVER" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="700.0" prefWidth="600.0" AnchorPane.bottomAnchor="40.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
<content>
<VBox prefHeight="679.0" prefWidth="598.0">
<children>
<FlowPane alignment="CENTER_LEFT" prefHeight="41.0" prefWidth="640.0">
<children>
<Label prefHeight="17.0" prefWidth="49.0" text="Station: " />
<TextField fx:id="stationNameField" style="-fx-border-color: #AAAAAA;" text="My Station">
<FlowPane.margin>
<Insets right="10.0" />
</FlowPane.margin>
</TextField>
</children>
<VBox.margin>
<Insets bottom="10.0" />
</VBox.margin>
</FlowPane>
<Separator prefWidth="200.0" />
<AnchorPane prefHeight="77.0" prefWidth="578.0">
<children>
<FlowPane alignment="CENTER_LEFT" layoutX="8.0" layoutY="7.0" prefHeight="63.0" prefWidth="216.0">
<children>
<Label prefHeight="38.0" prefWidth="103.0" text="Digit group size: (only for display)" textAlignment="RIGHT" textOverrun="CLIP" wrapText="true">
<FlowPane.margin>
<Insets right="10.0" />
</FlowPane.margin>
</Label>
<Spinner fx:id="digitsPerGroupSpinner" editable="true" prefHeight="25.0" prefWidth="96.0" />
</children>
</FlowPane>
<FlowPane alignment="CENTER_LEFT" layoutX="233.0" layoutY="7.0" prefHeight="63.0" prefWidth="216.0">
<children>
<Label prefHeight="38.0" prefWidth="109.0" text="Message length:" textAlignment="RIGHT" textOverrun="CLIP">
<FlowPane.margin>
<Insets right="10.0" />
</FlowPane.margin>
</Label>
<Spinner fx:id="messageLengthSpinner" editable="true" prefHeight="25.0" prefWidth="96.0" />
</children>
</FlowPane>
</children>
</AnchorPane>
<Separator prefWidth="200.0" />
<AnchorPane prefHeight="170.0" prefWidth="578.0">
<children>
<Label layoutY="6.0" text="Send messages via:">
<font>
<Font size="14.0" />
</font>
</Label>
<Label layoutX="170.0" layoutY="9.0" text="Numbers station address:" />
<TextField fx:id="stationAddressField" layoutX="188.0" layoutY="33.0" prefHeight="25.0" prefWidth="390.0" AnchorPane.leftAnchor="188.0" AnchorPane.rightAnchor="0.0" />
<RadioButton fx:id="ftpRadioButton" layoutX="16.0" layoutY="44.0" mnemonicParsing="false" text="FTP">
<toggleGroup>
<ToggleGroup fx:id="messageMethodGroup" />
</toggleGroup>
</RadioButton>
<RadioButton fx:id="sftpRadioButton" layoutX="16.0" layoutY="74.0" mnemonicParsing="false" text="SFTP">
<toggleGroup>
<fx:reference source="messageMethodGroup" />
</toggleGroup>
</RadioButton>
<RadioButton fx:id="scpRadioButton" layoutX="16.0" layoutY="104.0" mnemonicParsing="false" text="SCP">
<toggleGroup>
<fx:reference source="messageMethodGroup" />
</toggleGroup>
</RadioButton>
<RadioButton fx:id="externalProgramRadioButton" layoutX="16.0" layoutY="134.0" mnemonicParsing="false" text="External program:">
<toggleGroup>
<fx:reference source="messageMethodGroup" />
</toggleGroup>
</RadioButton>
<Label layoutX="380.0" layoutY="69.0" text="Username:" AnchorPane.rightAnchor="142.0" />
<Label layoutX="380.0" layoutY="99.0" text="Password:" AnchorPane.rightAnchor="142.0" />
<TextField fx:id="usernameField" layoutX="444.0" layoutY="65.0" prefHeight="25.0" prefWidth="135.0" AnchorPane.rightAnchor="0.0" />
<PasswordField fx:id="passwordField" layoutX="444.0" layoutY="95.0" prefHeight="25.0" prefWidth="135.0" AnchorPane.rightAnchor="0.0" />
<TextField fx:id="externalProgramCommandField" layoutX="140.0" layoutY="131.0" prefHeight="25.0" prefWidth="438.0" AnchorPane.leftAnchor="140.0" AnchorPane.rightAnchor="0.0" />
<Button layoutX="188.0" layoutY="65.0" mnemonicParsing="false" onMousePressed="#handleTestConnectionButtonPress" text="Test connection" />
</children>
<VBox.margin>
<Insets bottom="10.0" />
</VBox.margin>
</AnchorPane>
<Separator prefWidth="200.0" />
<AnchorPane prefHeight="33.0" prefWidth="578.0">
<children>
<Label layoutX="8.0" layoutY="6.0" text="Prefixes" AnchorPane.leftAnchor="8.0">
<font>
<Font size="14.0" />
</font>
</Label>
<Button layoutX="520.5" layoutY="4.0" mnemonicParsing="false" onMousePressed="#handleAddPrefixButtonPress" text="+" AnchorPane.rightAnchor="33.0" />
<Button layoutX="552.0" layoutY="4.0" mnemonicParsing="false" onMousePressed="#handleRemovePrefixButtonPress" prefHeight="25.0" prefWidth="25.0" text="-" AnchorPane.rightAnchor="1.0" />
</children>
<VBox.margin>
<Insets bottom="10.0" />
</VBox.margin>
</AnchorPane>
<ListView fx:id="prefixListView" prefHeight="103.0" prefWidth="578.0" />
<Separator prefWidth="200.0">
<VBox.margin>
<Insets bottom="10.0" top="10.0" />
</VBox.margin>
</Separator>
<Label text="Message Schedule">
<font>
<Font size="14.0" />
</font>
</Label>
<AnchorPane prefHeight="152.0" prefWidth="578.0">
<children>
<CheckBox fx:id="manageScheduleExternallyCheckBox" layoutX="395.0" mnemonicParsing="false" text="Manage schedule externally" AnchorPane.rightAnchor="14.5" />
<RadioButton fx:id="dailyRadioButton" layoutX="14.0" layoutY="8.0" mnemonicParsing="false" text="Daily" disable="${manageScheduleExternallyCheckBox.selected}">
<toggleGroup>
<ToggleGroup fx:id="messagePeriodGroup" />
</toggleGroup>
</RadioButton>
<RadioButton fx:id="weeklyRadioButton" layoutX="14.0" layoutY="38.0" mnemonicParsing="false" text="Weekly" disable="${manageScheduleExternallyCheckBox.selected}">
<toggleGroup>
<fx:reference source="messagePeriodGroup" />
</toggleGroup>
</RadioButton>
<RadioButton fx:id="monthlyRadioButton" layoutX="14.0" layoutY="68.0" mnemonicParsing="false" text="Monthly" disable="${manageScheduleExternallyCheckBox.selected}">
<toggleGroup>
<fx:reference source="messagePeriodGroup" />
</toggleGroup>
</RadioButton>
<DatePicker fx:id="scheduleStartDatePicker" layoutX="115.0" layoutY="34.0" disable="${manageScheduleExternallyCheckBox.selected}" />
<Label layoutX="115.0" layoutY="8.0" text="Starting from:" />
<TextField fx:id="scheduleStartTimeField" layoutX="115.0" layoutY="64.0" text="23:24:49" disable="${manageScheduleExternallyCheckBox.selected}" />
<Label layoutX="48.0" layoutY="102.0" text="TODO: Jitter" />
</children>
</AnchorPane>
</children>
<padding>
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
</padding>
</VBox>
</content>
</ScrollPane>
<FlowPane alignment="CENTER_RIGHT" prefHeight="40.0" prefWidth="600.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0">
<children>
<Button mnemonicParsing="false" onMousePressed="#handleSaveButtonPress" text="Save" textAlignment="RIGHT">
<FlowPane.margin>
<Insets right="10.0" />
</FlowPane.margin>
</Button>
<Button mnemonicParsing="false" onMousePressed="#handleCancelButtonPress" text="Cancel">
<opaqueInsets>
<Insets />
</opaqueInsets>
</Button>
</children>
<padding>
<Insets right="10.0" />
</padding>
</FlowPane>
</children>
</AnchorPane>