1
0
Fork 0
mirror of https://gitlab.com/kauron/jstudy synced 2024-11-13 15:43:44 +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"> <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> <center>
<TabPane fx:id="tabPane" BorderPane.alignment="CENTER"> <TabPane fx:id="tabPane" focusTraversable="false" BorderPane.alignment="CENTER">
<tabs> <tabs>
<Tab closable="false" text="Welcome"> <Tab closable="false" text="Welcome">
<content> <content>

View file

@ -5,6 +5,7 @@
<?import javafx.scene.control.Button?> <?import javafx.scene.control.Button?>
<?import javafx.scene.control.Label?> <?import javafx.scene.control.Label?>
<?import javafx.scene.control.ProgressBar?> <?import javafx.scene.control.ProgressBar?>
<?import javafx.scene.control.Separator?>
<?import javafx.scene.layout.ColumnConstraints?> <?import javafx.scene.layout.ColumnConstraints?>
<?import javafx.scene.layout.GridPane?> <?import javafx.scene.layout.GridPane?>
<?import javafx.scene.layout.HBox?> <?import javafx.scene.layout.HBox?>
@ -12,55 +13,70 @@
<?import javafx.scene.layout.VBox?> <?import javafx.scene.layout.VBox?>
<?import javafx.scene.text.Font?> <?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> <children>
<ProgressBar fx:id="progress" maxWidth="1.7976931348623157E308" progress="0.0" VBox.vgrow="ALWAYS" /> <VBox minHeight="280.0" minWidth="360.0" spacing="10.0">
<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">
<children> <children>
<Button cancelButton="true" mnemonicParsing="false" onAction="#onSkipAction" prefWidth="70.0" text="Skip" /> <Label fx:id="question" text="Question" wrapText="true" VBox.vgrow="ALWAYS">
<Button defaultButton="true" layoutX="10.0" layoutY="10.0" mnemonicParsing="false" onAction="#onNextAction" prefWidth="70.0" text="Next" /> <font>
</children> <Font size="30.0" />
</HBox> </font>
<HBox fx:id="feedback" alignment="BOTTOM_CENTER" VBox.vgrow="ALWAYS"> </Label>
<children> <JFXTextField fx:id="answer" labelFloat="true" promptText="Answer">
<GridPane hgap="10.0" HBox.hgrow="NEVER"> <VBox.margin>
<columnConstraints> <Insets top="5.0" />
<ColumnConstraints fillWidth="false" halignment="RIGHT" hgrow="NEVER" /> </VBox.margin>
<ColumnConstraints fillWidth="false" hgrow="NEVER" maxWidth="1.7976931348623157E308" /> </JFXTextField>
</columnConstraints> <Separator />
<rowConstraints> <HBox fx:id="feedback" alignment="BOTTOM_CENTER" VBox.vgrow="ALWAYS">
<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> <children>
<Label text="Previous question" /> <GridPane hgap="10.0" HBox.hgrow="NEVER">
<Label fx:id="prevQuestion" text="question" GridPane.columnIndex="1" /> <columnConstraints>
<Label text="Previous answer" GridPane.rowIndex="1" /> <ColumnConstraints fillWidth="false" halignment="RIGHT" hgrow="NEVER" />
<Label fx:id="prevAnswer" text="answer" GridPane.columnIndex="1" GridPane.rowIndex="1" /> <ColumnConstraints fillWidth="false" hgrow="NEVER" maxWidth="1.7976931348623157E308" />
<Label fx:id="correctLabel" text="Correct answer" GridPane.rowIndex="2" /> </columnConstraints>
<Label fx:id="correctAnswer" text="correct answer" GridPane.columnIndex="1" GridPane.rowIndex="2" /> <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> </children>
</GridPane> </HBox>
</children> </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> </children>
<padding> <padding>
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0" /> <Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
</padding> </padding>
</VBox> </GridPane>