1
0
Fork 0
mirror of https://gitlab.com/kauron/jstudy synced 2024-12-22 00:13:33 +01:00

Layout changes

This commit is contained in:
Carlos Galindo 2016-06-12 13:48:52 +02:00
parent f61c0a40ba
commit 6611d5f526
Signed by: kauron
GPG key ID: 83E68706DEE119A3
2 changed files with 60 additions and 44 deletions

View file

@ -13,7 +13,7 @@
<BorderPane fx:id="root" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/8.0.76-ea" xmlns:fx="http://javafx.com/fxml/1" fx:controller="es.kauron.jstudy.controller.Controller">
<center>
<TabPane fx:id="tabPane" BorderPane.alignment="CENTER">
<TabPane fx:id="tabPane" focusTraversable="false" BorderPane.alignment="CENTER">
<tabs>
<Tab closable="false" text="Welcome">
<content>

View file

@ -5,6 +5,7 @@
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.ProgressBar?>
<?import javafx.scene.control.Separator?>
<?import javafx.scene.layout.ColumnConstraints?>
<?import javafx.scene.layout.GridPane?>
<?import javafx.scene.layout.HBox?>
@ -12,55 +13,70 @@
<?import javafx.scene.layout.VBox?>
<?import javafx.scene.text.Font?>
<VBox minHeight="280.0" minWidth="360.0" spacing="10.0" xmlns="http://javafx.com/javafx/8.0.76-ea" xmlns:fx="http://javafx.com/fxml/1" fx:controller="es.kauron.jstudy.controller.TestController">
<GridPane xmlns="http://javafx.com/javafx/8.0.76-ea" xmlns:fx="http://javafx.com/fxml/1" fx:controller="es.kauron.jstudy.controller.TestController">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" />
</columnConstraints>
<rowConstraints>
<RowConstraints minHeight="10.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" vgrow="SOMETIMES" />
</rowConstraints>
<children>
<ProgressBar fx:id="progress" maxWidth="1.7976931348623157E308" progress="0.0" VBox.vgrow="ALWAYS" />
<Label fx:id="progressLabel" alignment="CENTER" contentDisplay="TOP" maxWidth="1.7976931348623157E308" text="1/40">
<VBox.margin>
<Insets top="-8.0" />
</VBox.margin>
</Label>
<Label fx:id="question" text="Question">
<font>
<Font size="30.0" />
</font>
</Label>
<JFXTextField fx:id="answer" labelFloat="true" promptText="Answer">
<VBox.margin>
<Insets top="5.0" />
</VBox.margin>
</JFXTextField>
<HBox alignment="CENTER_RIGHT" spacing="10.0">
<VBox minHeight="280.0" minWidth="360.0" spacing="10.0">
<children>
<Button cancelButton="true" mnemonicParsing="false" onAction="#onSkipAction" prefWidth="70.0" text="Skip" />
<Button defaultButton="true" layoutX="10.0" layoutY="10.0" mnemonicParsing="false" onAction="#onNextAction" prefWidth="70.0" text="Next" />
</children>
</HBox>
<HBox fx:id="feedback" alignment="BOTTOM_CENTER" VBox.vgrow="ALWAYS">
<children>
<GridPane hgap="10.0" HBox.hgrow="NEVER">
<columnConstraints>
<ColumnConstraints fillWidth="false" halignment="RIGHT" hgrow="NEVER" />
<ColumnConstraints fillWidth="false" hgrow="NEVER" maxWidth="1.7976931348623157E308" />
</columnConstraints>
<rowConstraints>
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
</rowConstraints>
<Label fx:id="question" text="Question" wrapText="true" VBox.vgrow="ALWAYS">
<font>
<Font size="30.0" />
</font>
</Label>
<JFXTextField fx:id="answer" labelFloat="true" promptText="Answer">
<VBox.margin>
<Insets top="5.0" />
</VBox.margin>
</JFXTextField>
<Separator />
<HBox fx:id="feedback" alignment="BOTTOM_CENTER" VBox.vgrow="ALWAYS">
<children>
<Label text="Previous question" />
<Label fx:id="prevQuestion" text="question" GridPane.columnIndex="1" />
<Label text="Previous answer" GridPane.rowIndex="1" />
<Label fx:id="prevAnswer" text="answer" GridPane.columnIndex="1" GridPane.rowIndex="1" />
<Label fx:id="correctLabel" text="Correct answer" GridPane.rowIndex="2" />
<Label fx:id="correctAnswer" text="correct answer" GridPane.columnIndex="1" GridPane.rowIndex="2" />
<GridPane hgap="10.0" HBox.hgrow="NEVER">
<columnConstraints>
<ColumnConstraints fillWidth="false" halignment="RIGHT" hgrow="NEVER" />
<ColumnConstraints fillWidth="false" hgrow="NEVER" maxWidth="1.7976931348623157E308" />
</columnConstraints>
<rowConstraints>
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
</rowConstraints>
<children>
<Label text="Previous question" />
<Label fx:id="prevQuestion" text="question" GridPane.columnIndex="1" />
<Label text="Previous answer" GridPane.rowIndex="1" />
<Label fx:id="prevAnswer" text="answer" GridPane.columnIndex="1" GridPane.rowIndex="1" />
<Label fx:id="correctLabel" text="Correct answer" GridPane.rowIndex="2" />
<Label fx:id="correctAnswer" text="correct answer" GridPane.columnIndex="1" GridPane.rowIndex="2" />
</children>
</GridPane>
</children>
</GridPane>
</HBox>
</children>
</HBox>
</VBox>
<VBox spacing="10.0" GridPane.columnIndex="1">
<children>
<Button defaultButton="true" focusTraversable="false" mnemonicParsing="false" onAction="#onNextAction" prefWidth="70.0" text="Next" />
<Button cancelButton="true" focusTraversable="false" mnemonicParsing="false" onAction="#onSkipAction" prefWidth="70.0" text="Skip" />
</children>
</VBox>
<VBox alignment="CENTER" GridPane.columnSpan="2147483647" GridPane.rowIndex="1">
<children>
<Separator prefWidth="200.0" />
<Label fx:id="progressLabel" alignment="CENTER" contentDisplay="TOP" maxWidth="1.7976931348623157E308" text="1/40" />
<ProgressBar fx:id="progress" maxWidth="1.7976931348623157E308" progress="0.0" />
</children>
</VBox>
</children>
<padding>
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
</padding>
</VBox>
</GridPane>