filling up a gap

This commit is contained in:
sirjonasxx 2018-11-06 22:20:18 +01:00
parent cf9d977d08
commit 982b3c3fe6
4 changed files with 93 additions and 78 deletions

View File

@ -11,7 +11,7 @@
<?import javafx.scene.layout.RowConstraints?> <?import javafx.scene.layout.RowConstraints?>
<?import javafx.scene.layout.VBox?> <?import javafx.scene.layout.VBox?>
<GridPane prefHeight="324.0" prefWidth="588.0" style="-fx-background-color: #FFFFFF;" xmlns="http://javafx.com/javafx/10.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="extensions.blockreplacepackets.BlockAndReplacePackets"> <GridPane prefHeight="324.0" prefWidth="588.0" style="-fx-background-color: #FFFFFF;" xmlns="http://javafx.com/javafx/8.0.131" xmlns:fx="http://javafx.com/fxml/1" fx:controller="extensions.blockreplacepackets.BlockAndReplacePackets">
<columnConstraints> <columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" /> <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
</columnConstraints> </columnConstraints>

View File

@ -505,4 +505,7 @@ public class HConnection {
return clientHostAndPort; return clientHostAndPort;
} }
public String getHotelVersion() {
return hotelVersion;
}
} }

View File

@ -21,6 +21,7 @@ public class Connection extends SubForm {
public TextField outHost; public TextField outHost;
public TextField outPort; public TextField outPort;
public CheckBox cbx_autodetect; public CheckBox cbx_autodetect;
public TextField txtfield_hotelversion;
private boolean isBusy = false; private boolean isBusy = false;
@ -75,6 +76,7 @@ public class Connection extends SubForm {
public void onParentSet(){ public void onParentSet(){
getHConnection().addStateChangeListener((oldState, newState) -> Platform.runLater(() -> { getHConnection().addStateChangeListener((oldState, newState) -> Platform.runLater(() -> {
txtfield_hotelversion.setText(getHConnection().getHotelVersion());
if (newState == HConnection.State.NOT_CONNECTED) { if (newState == HConnection.State.NOT_CONNECTED) {
updateInputUI(); updateInputUI();
lblState.setText("Not connected"); lblState.setText("Not connected");

View File

@ -11,9 +11,7 @@
<?import javafx.scene.layout.RowConstraints?> <?import javafx.scene.layout.RowConstraints?>
<?import javafx.scene.text.Font?> <?import javafx.scene.text.Font?>
<GridPane alignment="CENTER" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" prefHeight="262.0" <GridPane alignment="CENTER" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" prefHeight="262.0" prefWidth="565.0" xmlns="http://javafx.com/javafx/8.0.131" xmlns:fx="http://javafx.com/fxml/1" fx:controller="gearth.ui.connection.Connection">
prefWidth="565.0" xmlns="http://javafx.com/javafx/8.0.112" xmlns:fx="http://javafx.com/fxml/1"
fx:controller="gearth.ui.connection.Connection">
<columnConstraints> <columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" /> <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
</columnConstraints> </columnConstraints>
@ -48,15 +46,13 @@
<GridPane> <GridPane>
<columnConstraints> <columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" maxWidth="120.0" minWidth="10.0" prefWidth="68.0" /> <ColumnConstraints hgrow="SOMETIMES" maxWidth="120.0" minWidth="10.0" prefWidth="68.0" />
<ColumnConstraints hgrow="SOMETIMES" maxWidth="188.0" minWidth="10.0" <ColumnConstraints hgrow="SOMETIMES" maxWidth="188.0" minWidth="10.0" prefWidth="184.0" />
prefWidth="184.0"/>
</columnConstraints> </columnConstraints>
<rowConstraints> <rowConstraints>
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" /> <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
</rowConstraints> </rowConstraints>
<Label text="Port:" GridPane.halignment="CENTER" GridPane.valignment="CENTER" /> <Label text="Port:" GridPane.halignment="CENTER" GridPane.valignment="CENTER" />
<ComboBox fx:id="inpPort" disable="true" editable="true" prefWidth="183.0" <ComboBox fx:id="inpPort" disable="true" editable="true" prefWidth="183.0" GridPane.columnIndex="1">
GridPane.columnIndex="1">
<GridPane.margin> <GridPane.margin>
<Insets right="15.0" /> <Insets right="15.0" />
</GridPane.margin> </GridPane.margin>
@ -65,8 +61,7 @@
<GridPane layoutX="10.0" layoutY="10.0" GridPane.rowIndex="1"> <GridPane layoutX="10.0" layoutY="10.0" GridPane.rowIndex="1">
<columnConstraints> <columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" maxWidth="120.0" minWidth="10.0" prefWidth="68.0" /> <ColumnConstraints hgrow="SOMETIMES" maxWidth="120.0" minWidth="10.0" prefWidth="68.0" />
<ColumnConstraints hgrow="SOMETIMES" maxWidth="188.0" minWidth="10.0" <ColumnConstraints hgrow="SOMETIMES" maxWidth="188.0" minWidth="10.0" prefWidth="184.0" />
prefWidth="184.0"/>
</columnConstraints> </columnConstraints>
<rowConstraints> <rowConstraints>
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" /> <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
@ -80,8 +75,7 @@
</GridPane> </GridPane>
<GridPane GridPane.rowIndex="2"> <GridPane GridPane.rowIndex="2">
<columnConstraints> <columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" maxWidth="185.0" minWidth="10.0" <ColumnConstraints hgrow="SOMETIMES" maxWidth="185.0" minWidth="10.0" prefWidth="158.0" />
prefWidth="158.0"/>
<ColumnConstraints hgrow="SOMETIMES" maxWidth="117.0" minWidth="10.0" prefWidth="90.0" /> <ColumnConstraints hgrow="SOMETIMES" maxWidth="117.0" minWidth="10.0" prefWidth="90.0" />
</columnConstraints> </columnConstraints>
<rowConstraints> <rowConstraints>
@ -90,9 +84,7 @@
<RowConstraints /> <RowConstraints />
<RowConstraints /> <RowConstraints />
</rowConstraints> </rowConstraints>
<CheckBox fx:id="cbx_autodetect" mnemonicParsing="false" selected="true" <CheckBox fx:id="cbx_autodetect" mnemonicParsing="false" selected="true" text="Auto-detect" textFill="#000000a9" GridPane.columnIndex="1" GridPane.rowIndex="3">
text="Auto-detect" textFill="#000000a9" GridPane.columnIndex="1"
GridPane.rowIndex="3">
<GridPane.margin> <GridPane.margin>
<Insets left="-5.0" /> <Insets left="-5.0" />
</GridPane.margin> </GridPane.margin>
@ -100,9 +92,7 @@
<Font size="12.0" /> <Font size="12.0" />
</font> </font>
</CheckBox> </CheckBox>
<Button fx:id="btnConnect" alignment="CENTER" maxWidth="1.7976931348623157E308" <Button fx:id="btnConnect" alignment="CENTER" maxWidth="1.7976931348623157E308" onAction="#btnConnect_clicked" text="Connect" GridPane.halignment="CENTER" GridPane.rowIndex="3" GridPane.valignment="CENTER">
onAction="#btnConnect_clicked" text="Connect" GridPane.halignment="CENTER"
GridPane.rowIndex="3" GridPane.valignment="CENTER">
<GridPane.margin> <GridPane.margin>
<Insets left="15.0" right="15.0" /> <Insets left="15.0" right="15.0" />
</GridPane.margin> </GridPane.margin>
@ -119,6 +109,31 @@
<GridPane.margin> <GridPane.margin>
<Insets bottom="14.0" left="20.0" right="15.0" top="17.0" /> <Insets bottom="14.0" left="20.0" right="15.0" top="17.0" />
</GridPane.margin> </GridPane.margin>
<children>
<GridPane>
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
</columnConstraints>
<rowConstraints>
<RowConstraints maxHeight="83.0" minHeight="10.0" prefHeight="26.0" vgrow="SOMETIMES" />
<RowConstraints maxHeight="86.0" minHeight="10.0" prefHeight="33.0" vgrow="SOMETIMES" />
</rowConstraints>
<children>
<Label text="Hotel version:" textFill="#000000cc" />
<TextField fx:id="txtfield_hotelversion" editable="false" GridPane.rowIndex="1">
<opaqueInsets>
<Insets />
</opaqueInsets>
<GridPane.margin>
<Insets right="16.0" />
</GridPane.margin>
</TextField>
</children>
<GridPane.margin>
<Insets bottom="26.0" left="12.0" right="10.0" top="22.0" />
</GridPane.margin>
</GridPane>
</children>
</GridPane> </GridPane>
</GridPane> </GridPane>
<GridPane alignment="CENTER" GridPane.rowIndex="1"> <GridPane alignment="CENTER" GridPane.rowIndex="1">
@ -151,12 +166,7 @@
<Font size="12.0" /> <Font size="12.0" />
</font> </font>
</Label> </Label>
<Label fx:id="lblState" alignment="CENTER" maxHeight="1.7976931348623157E308" <Label fx:id="lblState" alignment="CENTER" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" style="-fx-border-color: #888888; -fx-border-radius: 5px;" text="Not connected" textAlignment="CENTER" textFill="#000000d1" GridPane.halignment="CENTER" GridPane.hgrow="ALWAYS" GridPane.rowIndex="1" GridPane.valignment="CENTER" GridPane.vgrow="ALWAYS">
maxWidth="1.7976931348623157E308"
style="-fx-border-color: #888888; -fx-border-radius: 5px;" text="Not connected"
textAlignment="CENTER" textFill="#000000d1" GridPane.halignment="CENTER"
GridPane.hgrow="ALWAYS" GridPane.rowIndex="1" GridPane.valignment="CENTER"
GridPane.vgrow="ALWAYS">
<GridPane.margin> <GridPane.margin>
<Insets /> <Insets />
</GridPane.margin> </GridPane.margin>