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.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 hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
</columnConstraints>

View File

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

View File

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

View File

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