Skip to content
Snippets Groups Projects
Commit 1b071f22 authored by Brage Halvorsen Kvamme's avatar Brage Halvorsen Kvamme :hammer:
Browse files

refactor(text): Refactored almost all text in all fxml files. Also refactored some panes.

parent fcefefc3
No related tags found
No related merge requests found
...@@ -40,6 +40,7 @@ ...@@ -40,6 +40,7 @@
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" /> <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
</rowConstraints> </rowConstraints>
<children> <children>
<TextField fx:id="cupNameField" maxHeight="-Infinity" maxWidth="-Infinity" prefHeight="30.0" prefWidth="300.0" promptText="cup name" GridPane.columnIndex="1" GridPane.halignment="CENTER" GridPane.valignment="CENTER" />
<Label text="Location:" GridPane.halignment="CENTER" GridPane.rowIndex="1" GridPane.valignment="CENTER"> <Label text="Location:" GridPane.halignment="CENTER" GridPane.rowIndex="1" GridPane.valignment="CENTER">
<padding> <padding>
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" /> <Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
...@@ -67,6 +68,10 @@ ...@@ -67,6 +68,10 @@
<Font name="Times New Roman" size="36.0" /> <Font name="Times New Roman" size="36.0" />
</font> </font>
</Label> </Label>
<TextField fx:id="cupLocationField" maxHeight="-Infinity" maxWidth="-Infinity" prefHeight="30.0" prefWidth="300.0" promptText="cup location" GridPane.columnIndex="1" GridPane.halignment="CENTER" GridPane.rowIndex="1" GridPane.valignment="CENTER">
<GridPane.margin>
<Insets />
</GridPane.margin></TextField>
<HBox GridPane.columnIndex="1" GridPane.halignment="CENTER" GridPane.rowIndex="2" GridPane.valignment="CENTER"> <HBox GridPane.columnIndex="1" GridPane.halignment="CENTER" GridPane.rowIndex="2" GridPane.valignment="CENTER">
<children> <children>
<DatePicker fx:id="startDateField" prefHeight="30.0" prefWidth="230.0" promptText="start date" showWeekNumbers="true" HBox.hgrow="ALWAYS"> <DatePicker fx:id="startDateField" prefHeight="30.0" prefWidth="230.0" promptText="start date" showWeekNumbers="true" HBox.hgrow="ALWAYS">
...@@ -81,34 +86,6 @@ ...@@ -81,34 +86,6 @@
</TextField> </TextField>
</children> </children>
</HBox> </HBox>
<Button fx:id="create" mnemonicParsing="false" onAction="#onCreateCup" text="Create" GridPane.columnIndex="1" GridPane.halignment="RIGHT" GridPane.rowIndex="4" GridPane.valignment="CENTER">
<font>
<Font name="Times New Roman" size="36.0" />
</font>
<graphic>
<ImageView fitHeight="20.0" fitWidth="20.0" preserveRatio="true">
<image>
<Image url="@icons/check-box.png" />
</image>
</ImageView>
</graphic>
</Button>
<TextField fx:id="cupLocationField" maxHeight="-Infinity" maxWidth="-Infinity" prefHeight="30.0" prefWidth="300.0" promptText="cup location" GridPane.columnIndex="1" GridPane.halignment="CENTER" GridPane.rowIndex="1" GridPane.valignment="CENTER">
<GridPane.margin>
<Insets />
</GridPane.margin></TextField>
<Button fx:id="cancel" mnemonicParsing="false" onAction="#cancelCreation" text="Cancel" GridPane.halignment="CENTER" GridPane.rowIndex="4" GridPane.valignment="CENTER">
<font>
<Font name="Times New Roman" size="36.0" />
</font>
<graphic>
<ImageView fitHeight="20.0" fitWidth="20.0" pickOnBounds="true" preserveRatio="true">
<image>
<Image url="@icons/cross.png" />
</image>
</ImageView>
</graphic>
</Button>
<HBox GridPane.columnIndex="1" GridPane.rowIndex="3"> <HBox GridPane.columnIndex="1" GridPane.rowIndex="3">
<children> <children>
<DatePicker fx:id="endDateField" prefHeight="30.0" prefWidth="230.0" promptText="end date" showWeekNumbers="true" HBox.hgrow="ALWAYS"> <DatePicker fx:id="endDateField" prefHeight="30.0" prefWidth="230.0" promptText="end date" showWeekNumbers="true" HBox.hgrow="ALWAYS">
...@@ -131,7 +108,30 @@ ...@@ -131,7 +108,30 @@
<Font name="Times New Roman" size="36.0" /> <Font name="Times New Roman" size="36.0" />
</font> </font>
</Label> </Label>
<TextField fx:id="cupNameField" maxHeight="-Infinity" maxWidth="-Infinity" prefHeight="30.0" prefWidth="300.0" promptText="cup name" GridPane.columnIndex="1" GridPane.halignment="CENTER" GridPane.valignment="CENTER" /> <Button fx:id="cancel" mnemonicParsing="false" onAction="#cancelCreation" text="Cancel" GridPane.halignment="CENTER" GridPane.rowIndex="4" GridPane.valignment="CENTER">
<font>
<Font name="Times New Roman" size="36.0" />
</font>
<graphic>
<ImageView fitHeight="20.0" fitWidth="20.0" pickOnBounds="true" preserveRatio="true">
<image>
<Image url="@icons/cross.png" />
</image>
</ImageView>
</graphic>
</Button>
<Button fx:id="create" mnemonicParsing="false" onAction="#onCreateCup" text="Create" GridPane.columnIndex="1" GridPane.halignment="RIGHT" GridPane.rowIndex="4" GridPane.valignment="CENTER">
<font>
<Font name="Times New Roman" size="36.0" />
</font>
<graphic>
<ImageView fitHeight="20.0" fitWidth="20.0" preserveRatio="true">
<image>
<Image url="@icons/check-box.png" />
</image>
</ImageView>
</graphic>
</Button>
</children> </children>
<BorderPane.margin> <BorderPane.margin>
<Insets bottom="200.0" left="150.0" right="150.0" top="100.0" /> <Insets bottom="200.0" left="150.0" right="150.0" top="100.0" />
......
...@@ -10,7 +10,6 @@ ...@@ -10,7 +10,6 @@
<?import javafx.scene.layout.ColumnConstraints?> <?import javafx.scene.layout.ColumnConstraints?>
<?import javafx.scene.layout.GridPane?> <?import javafx.scene.layout.GridPane?>
<?import javafx.scene.layout.RowConstraints?> <?import javafx.scene.layout.RowConstraints?>
<?import javafx.scene.shape.Line?>
<?import javafx.scene.text.Font?> <?import javafx.scene.text.Font?>
<?import javafx.scene.text.Text?> <?import javafx.scene.text.Text?>
...@@ -18,7 +17,7 @@ ...@@ -18,7 +17,7 @@
<top> <top>
<Text strokeType="OUTSIDE" strokeWidth="0.0" text="Match overview" BorderPane.alignment="CENTER"> <Text strokeType="OUTSIDE" strokeWidth="0.0" text="Match overview" BorderPane.alignment="CENTER">
<font> <font>
<Font name="Times New Roman" size="36.0" /> <Font name="Times New Roman" size="55.0" />
</font> </font>
</Text> </Text>
</top> </top>
...@@ -38,14 +37,10 @@ ...@@ -38,14 +37,10 @@
<rowConstraints> <rowConstraints>
<RowConstraints maxHeight="62.0" minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" /> <RowConstraints maxHeight="62.0" minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints maxHeight="62.0" minHeight="10.0" prefHeight="20.0" vgrow="SOMETIMES" /> <RowConstraints maxHeight="62.0" minHeight="10.0" prefHeight="20.0" vgrow="SOMETIMES" />
<RowConstraints maxHeight="64.0" minHeight="10.0" prefHeight="43.0" vgrow="SOMETIMES" />
<RowConstraints maxHeight="112.0" minHeight="0.0" prefHeight="27.0" vgrow="SOMETIMES" />
<RowConstraints maxHeight="149.0" minHeight="0.0" prefHeight="16.0" vgrow="SOMETIMES" /> <RowConstraints maxHeight="149.0" minHeight="0.0" prefHeight="16.0" vgrow="SOMETIMES" />
<RowConstraints maxHeight="149.0" minHeight="10.0" prefHeight="26.0" vgrow="SOMETIMES" />
<RowConstraints maxHeight="149.0" minHeight="10.0" prefHeight="40.0" vgrow="SOMETIMES" />
</rowConstraints> </rowConstraints>
<children> <children>
<Text strokeType="OUTSIDE" strokeWidth="0.0" text="vs." textAlignment="CENTER" GridPane.columnIndex="2" GridPane.halignment="CENTER" GridPane.valignment="CENTER"> <Text strokeType="OUTSIDE" strokeWidth="0.0" text="vs." textAlignment="CENTER" GridPane.columnIndex="2" GridPane.halignment="CENTER" GridPane.rowIndex="1" GridPane.valignment="CENTER">
<font> <font>
<Font name="Times New Roman" size="36.0" /> <Font name="Times New Roman" size="36.0" />
</font> </font>
...@@ -60,19 +55,12 @@ ...@@ -60,19 +55,12 @@
<Font name="Times New Roman" size="36.0" /> <Font name="Times New Roman" size="36.0" />
</font> </font>
</Text> </Text>
<Line endX="75.5" startX="-100.0" GridPane.columnIndex="1" GridPane.halignment="CENTER" GridPane.rowIndex="3" GridPane.valignment="TOP" /> <Text strokeType="OUTSIDE" strokeWidth="0.0" text=" Score" textAlignment="CENTER" GridPane.columnIndex="2" GridPane.halignment="CENTER" GridPane.rowIndex="2" GridPane.valignment="CENTER">
<Line endX="75.5" startX="-100.0" GridPane.columnIndex="3" GridPane.halignment="CENTER" GridPane.rowIndex="3" GridPane.valignment="TOP" />
<Text strokeType="OUTSIDE" strokeWidth="0.0" text=" Score" textAlignment="CENTER" GridPane.columnIndex="2" GridPane.halignment="CENTER" GridPane.rowIndex="1" GridPane.valignment="CENTER">
<font> <font>
<Font name="Times New Roman" size="36.0" /> <Font name="Times New Roman" size="36.0" />
</font> </font>
</Text> </Text>
<Text strokeType="OUTSIDE" strokeWidth="0.0" text="-" GridPane.columnIndex="2" GridPane.halignment="CENTER" GridPane.rowIndex="4" GridPane.valignment="CENTER"> <Button maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" mnemonicParsing="false" onAction="#teamOneScoreDecr" prefHeight="50.0" prefWidth="50.0" text="-" GridPane.columnIndex="1" GridPane.halignment="LEFT" GridPane.rowIndex="2" GridPane.valignment="CENTER">
<font>
<Font name="Times New Roman" size="14.0" />
</font>
</Text>
<Button maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" mnemonicParsing="false" onAction="#teamOneScoreDecr" prefHeight="30.0" prefWidth="30.0" text="-" GridPane.columnIndex="1" GridPane.halignment="LEFT" GridPane.rowIndex="4" GridPane.valignment="CENTER">
<GridPane.margin> <GridPane.margin>
<Insets /> <Insets />
</GridPane.margin> </GridPane.margin>
...@@ -80,8 +68,11 @@ ...@@ -80,8 +68,11 @@
<Font name="Times New Roman" size="18.0" /> <Font name="Times New Roman" size="18.0" />
</font> </font>
</Button> </Button>
<TextField fx:id="teamOneScore" alignment="CENTER" maxWidth="-Infinity" prefHeight="50.0" prefWidth="50.0" GridPane.columnIndex="1" GridPane.halignment="CENTER" GridPane.rowIndex="1" GridPane.valignment="CENTER" /> <TextField fx:id="teamOneScore" alignment="CENTER" maxWidth="-Infinity" prefHeight="50.0" prefWidth="60.0" GridPane.columnIndex="1" GridPane.halignment="CENTER" GridPane.rowIndex="2" GridPane.valignment="CENTER">
<Button maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" mnemonicParsing="false" onAction="#teamOneScoreIncr" prefHeight="50.0" prefWidth="50.0" text="+" GridPane.columnIndex="1" GridPane.halignment="RIGHT" GridPane.rowIndex="1" GridPane.valignment="CENTER"> <font>
<Font name="Times New Roman" size="18.0" />
</font></TextField>
<Button maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" mnemonicParsing="false" onAction="#teamOneScoreIncr" prefHeight="50.0" prefWidth="50.0" text="+" GridPane.columnIndex="1" GridPane.halignment="RIGHT" GridPane.rowIndex="2" GridPane.valignment="CENTER">
<opaqueInsets> <opaqueInsets>
<Insets /> <Insets />
</opaqueInsets> </opaqueInsets>
...@@ -92,7 +83,7 @@ ...@@ -92,7 +83,7 @@
<Font name="Times New Roman" size="18.0" /> <Font name="Times New Roman" size="18.0" />
</font> </font>
</Button> </Button>
<Button maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" mnemonicParsing="false" onAction="#teamTwoScoreDecr" prefHeight="50.0" prefWidth="50.0" text="-" GridPane.columnIndex="3" GridPane.halignment="LEFT" GridPane.rowIndex="1" GridPane.valignment="CENTER"> <Button maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" mnemonicParsing="false" onAction="#teamTwoScoreDecr" prefHeight="50.0" prefWidth="50.0" text="-" GridPane.columnIndex="3" GridPane.halignment="LEFT" GridPane.rowIndex="2" GridPane.valignment="CENTER">
<GridPane.margin> <GridPane.margin>
<Insets /> <Insets />
</GridPane.margin> </GridPane.margin>
...@@ -100,8 +91,11 @@ ...@@ -100,8 +91,11 @@
<Font name="Times New Roman" size="18.0" /> <Font name="Times New Roman" size="18.0" />
</font> </font>
</Button> </Button>
<TextField fx:id="teamTwoScore" alignment="CENTER" maxWidth="-Infinity" prefHeight="50.0" prefWidth="50.0" GridPane.columnIndex="3" GridPane.halignment="CENTER" GridPane.rowIndex="1" GridPane.valignment="CENTER" /> <TextField fx:id="teamTwoScore" alignment="CENTER" maxWidth="-Infinity" prefHeight="50.0" prefWidth="60.0" GridPane.columnIndex="3" GridPane.halignment="CENTER" GridPane.rowIndex="2" GridPane.valignment="CENTER">
<Button maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" mnemonicParsing="false" onAction="#teamTwoScoreIncr" prefHeight="50.0" prefWidth="50.0" text="+" GridPane.columnIndex="3" GridPane.halignment="RIGHT" GridPane.rowIndex="1" GridPane.valignment="CENTER"> <font>
<Font name="Times New Roman" size="18.0" />
</font></TextField>
<Button maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" mnemonicParsing="false" onAction="#teamTwoScoreIncr" prefHeight="50.0" prefWidth="50.0" text="+" GridPane.columnIndex="3" GridPane.halignment="RIGHT" GridPane.rowIndex="2" GridPane.valignment="CENTER">
<GridPane.margin> <GridPane.margin>
<Insets /> <Insets />
</GridPane.margin> </GridPane.margin>
...@@ -109,12 +103,12 @@ ...@@ -109,12 +103,12 @@
<Font name="Times New Roman" size="18.0" /> <Font name="Times New Roman" size="18.0" />
</font> </font>
</Button> </Button>
<Text fx:id="timeLeftText" strokeType="OUTSIDE" strokeWidth="0.0" text="Time left: 33 minutes" GridPane.columnIndex="2" GridPane.halignment="CENTER" GridPane.valignment="CENTER"> <Text fx:id="timeLeftText" strokeType="OUTSIDE" strokeWidth="0.0" text="Time left: 33 minutes" GridPane.columnIndex="2" GridPane.halignment="CENTER" GridPane.valignment="CENTER">
<GridPane.margin> <GridPane.margin>
<Insets left="30.0" right="30.0" /> <Insets left="30.0" right="30.0" />
</GridPane.margin> </GridPane.margin>
<font> <font>
<Font name="Times New Roman Italic" size="18.0" /> <Font name="Times New Roman Italic" size="36.0" />
</font> </font>
</Text> </Text>
</children> </children>
...@@ -140,27 +134,48 @@ ...@@ -140,27 +134,48 @@
<RowConstraints maxHeight="64.0" minHeight="10.0" prefHeight="49.0" vgrow="SOMETIMES" /> <RowConstraints maxHeight="64.0" minHeight="10.0" prefHeight="49.0" vgrow="SOMETIMES" />
</rowConstraints> </rowConstraints>
<children> <children>
<Text strokeType="OUTSIDE" strokeWidth="0.0" text="Start time:" GridPane.columnIndex="1" GridPane.halignment="RIGHT" GridPane.rowIndex="1" GridPane.valignment="CENTER" /> <Text strokeType="OUTSIDE" strokeWidth="0.0" text="Start time:" GridPane.columnIndex="1" GridPane.halignment="RIGHT" GridPane.rowIndex="1" GridPane.valignment="CENTER">
<Text strokeType="OUTSIDE" strokeWidth="0.0" text="Duration:" GridPane.columnIndex="1" GridPane.halignment="RIGHT" GridPane.rowIndex="2" GridPane.valignment="CENTER" /> <font>
<DatePicker fx:id="startDateField" prefHeight="25.0" promptText="start date" GridPane.columnIndex="3" GridPane.halignment="LEFT" GridPane.rowIndex="1" GridPane.valignment="CENTER" /> <Font name="Times New Roman" size="24.0" />
<TextField fx:id="startTimeField" alignment="CENTER" maxWidth="-Infinity" prefHeight="25.0" prefWidth="100.0" promptText="hh:mm" GridPane.columnIndex="5" GridPane.rowIndex="1" /> </font></Text>
<TextField fx:id="timeDurationField" alignment="CENTER" maxWidth="-Infinity" prefHeight="25.0" prefWidth="100.0" promptText="min" GridPane.columnIndex="3" GridPane.halignment="LEFT" GridPane.rowIndex="2" GridPane.valignment="CENTER" /> <Text strokeType="OUTSIDE" strokeWidth="0.0" text="Duration:" GridPane.columnIndex="1" GridPane.halignment="RIGHT" GridPane.rowIndex="2" GridPane.valignment="CENTER">
<font>
<Font name="Times New Roman" size="24.0" />
</font></Text>
<DatePicker fx:id="startDateField" prefHeight="30.0" promptText="start date" GridPane.columnIndex="3" GridPane.halignment="LEFT" GridPane.rowIndex="1" GridPane.valignment="CENTER" />
<TextField fx:id="startTimeField" alignment="CENTER" maxWidth="-Infinity" prefHeight="30.0" prefWidth="100.0" promptText="hh:mm" GridPane.columnIndex="5" GridPane.rowIndex="1">
<font>
<Font size="15.0" />
</font></TextField>
<TextField fx:id="timeDurationField" alignment="CENTER" maxWidth="-Infinity" prefHeight="30.0" prefWidth="100.0" promptText="min" GridPane.columnIndex="3" GridPane.halignment="LEFT" GridPane.rowIndex="2" GridPane.valignment="CENTER">
<font>
<Font size="15.0" />
</font></TextField>
<Text strokeType="OUTSIDE" strokeWidth="0.0" text="minutes" GridPane.columnIndex="4" GridPane.halignment="RIGHT" GridPane.rowIndex="2" GridPane.valignment="CENTER"> <Text strokeType="OUTSIDE" strokeWidth="0.0" text="minutes" GridPane.columnIndex="4" GridPane.halignment="RIGHT" GridPane.rowIndex="2" GridPane.valignment="CENTER">
<GridPane.margin> <GridPane.margin>
<Insets /> <Insets />
</GridPane.margin></Text> </GridPane.margin>
<Text strokeType="OUTSIDE" strokeWidth="0.0" text="Edit field number:" GridPane.columnIndex="1" GridPane.halignment="RIGHT" GridPane.rowIndex="3" GridPane.valignment="CENTER" /> <font>
<TextField fx:id="fieldNrField" alignment="CENTER" maxWidth="-Infinity" prefHeight="25.0" prefWidth="50.0" promptText="nr" GridPane.columnIndex="3" GridPane.rowIndex="3" /> <Font name="Times New Roman" size="24.0" />
</font></Text>
<Text strokeType="OUTSIDE" strokeWidth="0.0" text="Edit field number:" GridPane.columnIndex="1" GridPane.halignment="RIGHT" GridPane.rowIndex="3" GridPane.valignment="CENTER">
<font>
<Font name="Times New Roman" size="24.0" />
</font></Text>
<TextField fx:id="fieldNrField" alignment="CENTER" maxWidth="-Infinity" prefHeight="30.0" prefWidth="50.0" promptText="nr" GridPane.columnIndex="3" GridPane.rowIndex="3">
<font>
<Font size="15.0" />
</font></TextField>
</children> </children>
</GridPane> </GridPane>
<Button fx:id="endMatch" layoutX="660.0" layoutY="228.0" mnemonicParsing="false" onAction="#endMatchValues" prefWidth="150.0" text="End match"> <Button fx:id="endMatch" layoutX="660.0" layoutY="228.0" mnemonicParsing="false" onAction="#endMatchValues" prefHeight="44.0" prefWidth="200.0" text="End match">
<font> <font>
<Font name="Times New Roman" size="16.0" /> <Font name="Times New Roman" size="24.0" />
</font> </font>
</Button> </Button>
<Button layoutX="457.0" layoutY="228.0" mnemonicParsing="false" onAction="#updateMatchValues" prefWidth="150.0" text="Update match"> <Button layoutX="407.0" layoutY="228.0" mnemonicParsing="false" onAction="#updateMatchValues" prefHeight="44.0" prefWidth="200.0" text="Update match">
<font> <font>
<Font name="Times New Roman" size="16.0" /> <Font name="Times New Roman" size="24.0" />
</font> </font>
</Button> </Button>
</children> </children>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment