Fixed scalling with MatchTheMeaning

This commit is contained in:
osp1 2020-05-01 10:44:22 +01:00
parent 2e942e0619
commit 64ae98b86d

View file

@ -2,21 +2,24 @@
<?import java.lang.String?>
<?import javafx.collections.FXCollections?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.ComboBox?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.image.ImageView?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.BorderPane?>
<?import javafx.scene.layout.ColumnConstraints?>
<?import javafx.scene.layout.GridPane?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.Pane?>
<?import javafx.scene.layout.RowConstraints?>
<?import javafx.scene.layout.StackPane?>
<?import javafx.scene.layout.VBox?>
<?import javafx.scene.shape.Rectangle?>
<?import javafx.scene.text.Font?>
<?import javafx.scene.text.Text?>
<BorderPane fx:id="container" minHeight="550" minWidth="450" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="uk.ac.aber.cs221.group20.javafx.MatchTheMeaningController">
<BorderPane fx:id="container" minHeight="550" minWidth="450" xmlns="http://javafx.com/javafx/8.0.171" xmlns:fx="http://javafx.com/fxml/1" fx:controller="uk.ac.aber.cs221.group20.javafx.MatchTheMeaningController">
<left>
@ -121,124 +124,211 @@
<center>
<Pane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" BorderPane.alignment="CENTER">
<children>
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="400.0" prefWidth="600.0">
<Button fx:id="ConfirmButton" layoutX="271.0" layoutY="321.0" mnemonicParsing="false" onAction="#checkAnswers" text="Confirm" />
<ComboBox fx:id="word1" layoutX="493.0" layoutY="124.0" prefHeight="25.0" prefWidth="33.0" value="1">
<items>
<FXCollections fx:factory="observableArrayList">
<String fx:value="1" />
<String fx:value="2" />
<String fx:value="3" />
<String fx:value="4" />
</FXCollections>
</items>
</ComboBox>
<ComboBox fx:id="word2" layoutX="492.0" layoutY="159.0" prefHeight="25.0" prefWidth="51.0" value="1">
<items>
<FXCollections fx:factory="observableArrayList">
<String fx:value="1" />
<String fx:value="2" />
<String fx:value="3" />
<String fx:value="4" />
</FXCollections>
</items>
</ComboBox>
<ComboBox fx:id="word3" layoutX="492.0" layoutY="194.0" prefHeight="25.0" prefWidth="51.0" value="1">
<items>
<FXCollections fx:factory="observableArrayList">
<String fx:value="1" />
<String fx:value="2" />
<String fx:value="3" />
<String fx:value="4" />
</FXCollections>
</items>
</ComboBox>
<ComboBox fx:id="word4" layoutX="492.0" layoutY="229.0" prefHeight="25.0" prefWidth="51.0" value="1">
<items>
<FXCollections fx:factory="observableArrayList">
<String fx:value="1" />
<String fx:value="2" />
<String fx:value="3" />
<String fx:value="4" />
</FXCollections>
</items>
</ComboBox>
<Label fx:id="RightWord1" layoutX="319.0" layoutY="126.0" text="Welsh word#3" wrapText="true">
<VBox alignment="CENTER" prefHeight="200.0" prefWidth="583.0">
<children>
<HBox alignment="TOP_RIGHT" prefHeight="0.0" prefWidth="583.0">
<children>
<Label text="Correct answers:">
<font>
<Font size="17.0" />
</font>
</Label>
<Label fx:id="CorrectAnswer" text="0">
<font>
<Font size="17.0" />
</font>
</Label>
</children>
</HBox>
<HBox alignment="TOP_RIGHT" layoutX="10.0" layoutY="33.0" prefHeight="1.0" prefWidth="583.0">
<children>
<Label text="Total answers:">
<font>
<Font size="17.0" />
</font>
</Label>
<Label fx:id="WrongAnswer" text="0">
<font>
<Font size="17.0" />
</font>
</Label>
</children>
</HBox>
<GridPane alignment="CENTER" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="150.0" prefWidth="400.0" VBox.vgrow="ALWAYS">
<columnConstraints>
<ColumnConstraints halignment="LEFT" hgrow="ALWAYS" maxWidth="275.0" minWidth="146.0" prefWidth="146.0" />
<ColumnConstraints halignment="CENTER" hgrow="ALWAYS" maxWidth="437.0" minWidth="146.0" prefWidth="146.0" />
</columnConstraints>
<rowConstraints>
<RowConstraints maxHeight="38.0" minHeight="10.0" prefHeight="38.0" vgrow="SOMETIMES" />
<RowConstraints maxHeight="38.0" minHeight="10.0" prefHeight="38.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
</rowConstraints>
<children>
<HBox alignment="CENTER_LEFT" prefHeight="38.0" GridPane.halignment="CENTER" GridPane.valignment="CENTER">
<children>
<Label text="1.">
<font>
<Font size="14.0" />
</font>
</Label>
<Label fx:id="LeftWord1" text="English Word #1" wrapText="true">
<font>
<Font size="14.0" />
</font>
</Label>
</children>
</HBox>
<HBox alignment="CENTER_RIGHT" prefHeight="126.0" GridPane.columnIndex="1" GridPane.halignment="CENTER" GridPane.valignment="CENTER">
<children>
<Label fx:id="RightWord1" text="Welsh word#3" wrapText="true">
<font>
<Font size="14.0" />
</font>
</Label>
<ComboBox fx:id="word1" prefHeight="25.0" value="1">
<items>
<FXCollections fx:factory="observableArrayList">
<String fx:value="1" />
<String fx:value="2" />
<String fx:value="3" />
<String fx:value="4" />
</FXCollections>
</items>
<HBox.margin>
<Insets left="10.0" />
</HBox.margin>
</ComboBox>
</children>
</HBox>
<HBox alignment="CENTER_LEFT" prefHeight="38.0" GridPane.halignment="CENTER" GridPane.rowIndex="1" GridPane.valignment="CENTER">
<children>
<Label text="2.">
<font>
<Font size="14.0" />
</font>
</Label>
<Label fx:id="LeftWord2" text="English Word #2" wrapText="true">
<font>
<Font size="14.0" />
</font>
</Label>
</children>
</HBox>
<HBox alignment="CENTER_RIGHT" prefHeight="100.0" GridPane.columnIndex="1" GridPane.halignment="CENTER" GridPane.rowIndex="1" GridPane.valignment="CENTER">
<children>
<Label fx:id="RightWord2" text="Welsh word#2" wrapText="true">
<font>
<Font size="14.0" />
</font>
</Label>
<ComboBox fx:id="word2" prefHeight="25.0" value="1">
<items>
<FXCollections fx:factory="observableArrayList">
<String fx:value="1" />
<String fx:value="2" />
<String fx:value="3" />
<String fx:value="4" />
</FXCollections>
</items>
<HBox.margin>
<Insets left="10.0" />
</HBox.margin>
</ComboBox>
</children>
</HBox>
<HBox alignment="CENTER_LEFT" prefHeight="37.0" GridPane.halignment="CENTER" GridPane.rowIndex="2" GridPane.valignment="CENTER">
<children>
<Label text="3.">
<font>
<Font size="14.0" />
</font>
</Label>
<Label fx:id="LeftWord3" text="English Word #3" wrapText="true">
<font>
<Font size="14.0" />
</font>
</Label>
</children>
</HBox>
<HBox alignment="CENTER_RIGHT" prefHeight="100.0" GridPane.columnIndex="1" GridPane.halignment="CENTER" GridPane.rowIndex="2" GridPane.valignment="CENTER">
<children>
<Label fx:id="RightWord3" text="Welsh word#1" wrapText="true">
<font>
<Font size="14.0" />
</font>
</Label>
<ComboBox fx:id="word3" prefHeight="25.0" value="1">
<items>
<FXCollections fx:factory="observableArrayList">
<String fx:value="1" />
<String fx:value="2" />
<String fx:value="3" />
<String fx:value="4" />
</FXCollections>
</items>
<HBox.margin>
<Insets left="10.0" />
</HBox.margin>
</ComboBox>
</children>
</HBox>
<HBox alignment="CENTER_LEFT" prefHeight="37.0" GridPane.halignment="CENTER" GridPane.rowIndex="3" GridPane.valignment="CENTER">
<children>
<Label text="4.">
<font>
<Font size="14.0" />
</font>
</Label>
<Label fx:id="LeftWord4" text="English Word #4" wrapText="true">
<font>
<Font size="14.0" />
</font>
</Label>
</children>
</HBox>
<HBox alignment="CENTER_RIGHT" layoutX="10.0" layoutY="73.0" prefHeight="100.0" GridPane.columnIndex="1" GridPane.halignment="CENTER" GridPane.rowIndex="3" GridPane.valignment="CENTER">
<children>
<Label fx:id="RightWord4" text="Welsh word#4" wrapText="true">
<font>
<Font size="14.0" />
</font>
</Label>
<ComboBox fx:id="word4" prefHeight="25.0" value="1">
<items>
<FXCollections fx:factory="observableArrayList">
<String fx:value="1" />
<String fx:value="2" />
<String fx:value="3" />
<String fx:value="4" />
</FXCollections>
</items>
<HBox.margin>
<Insets left="10.0" />
</HBox.margin>
</ComboBox>
</children>
</HBox>
</children>
<VBox.margin>
<Insets top="20.0" />
</VBox.margin>
</GridPane>
<Button fx:id="ConfirmButton" mnemonicParsing="false" onAction="#checkAnswers" text="Confirm">
<VBox.margin>
<Insets top="10.0" />
</VBox.margin></Button>
<Text fill="#8d8d8d" strokeType="OUTSIDE" strokeWidth="0.0" text="Match The Meaning">
<font>
<Font size="14.0" />
<Font name="System Italic" size="24.0" />
</font>
</Label>
<Label fx:id="RightWord2" layoutX="319.0" layoutY="161.0" text="Welsh word#2" wrapText="true">
<font>
<Font size="14.0" />
</font>
</Label>
<Label fx:id="RightWord3" layoutX="319.0" layoutY="196.0" text="Welsh word#1" wrapText="true">
<font>
<Font size="14.0" />
</font></Label>
<Label fx:id="RightWord4" layoutX="319.0" layoutY="231.0" text="Welsh word#4" wrapText="true">
<font>
<Font size="14.0" />
</font></Label>
<Label fx:id="LeftWord1" layoutX="104.0" layoutY="126.0" text="English Word #1" wrapText="true">
<font>
<Font size="14.0" />
</font></Label>
<Label fx:id="LeftWord2" layoutX="104.0" layoutY="161.0" text="English Word #2" wrapText="true">
<font>
<Font size="14.0" />
</font></Label>
<Label fx:id="LeftWord3" layoutX="104.0" layoutY="196.0" text="English Word #3" wrapText="true">
<font>
<Font size="14.0" />
</font></Label>
<Label fx:id="LeftWord4" layoutX="104.0" layoutY="231.0" text="English Word #4" wrapText="true">
<font>
<Font size="14.0" />
</font></Label>
<Label layoutX="87.0" layoutY="126.0" text="1.">
<font>
<Font size="14.0" />
</font></Label>
<Label layoutX="87.0" layoutY="161.0" text="2.">
<font>
<Font size="14.0" />
</font></Label>
<Label layoutX="87.0" layoutY="196.0" text="3.">
<font>
<Font size="14.0" />
</font></Label>
<Label layoutX="87.0" layoutY="231.0" text="4.">
<font>
<Font size="14.0" />
</font></Label>
<Label layoutX="334.0" layoutY="19.0" text="Correct answers:">
<font>
<Font size="17.0" />
</font>
</Label>
<Label layoutX="350.0" layoutY="53.0" text="Total answers:">
<font>
<Font size="17.0" />
</font>
</Label>
<Label fx:id="CorrectAnswer" layoutX="472.0" layoutY="19.0" text="0">
<font>
<Font size="17.0" />
</font>
</Label>
<Label fx:id="WrongAnswer" layoutX="472.0" layoutY="53.0" text="0">
<font>
<Font size="17.0" />
</font>
</Label>
<Text fill="#8d8d8d" layoutX="197.0" layoutY="379.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Match The Meaning">
<font>
<Font name="System Italic" size="24.0" />
</font>
</Text>
</AnchorPane>
<VBox.margin>
<Insets top="10.0" />
</VBox.margin>
</Text>
</children>
</VBox>
</children>
</Pane>
</center>