implemented functionality to activate treeview

This commit is contained in:
schrom01
2022-05-11 16:21:38 +02:00
parent b51a585167
commit 7f723fd763
4 changed files with 37 additions and 20 deletions
@@ -1,35 +1,43 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.ChoiceBox?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.TextField?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.VBox?>
<VBox alignment="CENTER" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="150.0" style="-fx-border-color: black; -fx-border-insets: 2; -fx-border-width: 3;" xmlns="http://javafx.com/javafx/18" xmlns:fx="http://javafx.com/fxml/1" fx:controller="ch.zhaw.projekt2.turnierverwaltung.main.gameScheduleView.GameController">
<VBox alignment="CENTER" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="90.0" prefWidth="450.0" style="-fx-border-color: black; -fx-border-insets: 2; -fx-border-width: 3;" xmlns="http://javafx.com/javafx/18" xmlns:fx="http://javafx.com/fxml/1" fx:controller="ch.zhaw.projekt2.turnierverwaltung.main.gameScheduleView.GameController">
<children>
<VBox fx:id="mainVBox" alignment="CENTER" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" prefHeight="150.0">
<VBox fx:id="mainVBox" alignment="CENTER" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" prefHeight="90.0">
<children>
<HBox alignment="CENTER" prefHeight="100.0" prefWidth="200.0">
<children>
<Label fx:id="participantNameOne" text="Participant One">
<Label fx:id="participantNameOne" style="-fx-font-weight: bold;" text="Participant One">
<HBox.margin>
<Insets right="20.0" />
</HBox.margin>
</Label>
<TextField fx:id="pointsTeamOne" prefHeight="25.0" prefWidth="50.0" />
</children>
</HBox>
<HBox alignment="CENTER" prefHeight="100.0" prefWidth="200.0">
<children>
<Label fx:id="participantNameTwo" text="Participant Two">
<TextField fx:id="pointsTeamOne" alignment="CENTER" onKeyTyped="#saveGameResult" prefHeight="25.0" prefWidth="50.0">
<HBox.margin>
<Insets right="20.0" />
</HBox.margin>
</TextField>
<Label text=":">
<HBox.margin>
<Insets right="20.0" />
</HBox.margin>
</Label>
<TextField fx:id="pointsTeamTwo" alignment="CENTER" onKeyTyped="#saveGameResult" prefHeight="25.0" prefWidth="50.0">
<HBox.margin>
<Insets right="20.0" />
</HBox.margin>
</TextField>
<Label fx:id="participantNameTwo" style="-fx-font-weight: bold;" text="Participant Two">
<HBox.margin>
<Insets right="20.0" />
</HBox.margin>
</Label>
<TextField fx:id="pointsTeamTwo" prefHeight="25.0" prefWidth="50.0" />
</children>
</HBox>
<HBox alignment="CENTER" prefHeight="100.0" prefWidth="200.0">
@@ -45,11 +53,6 @@
<Insets top="10.0" />
</VBox.margin>
</HBox>
<Button mnemonicParsing="false" onAction="#saveGamerResult" text="Speichern">
<VBox.margin>
<Insets bottom="10.0" top="10.0" />
</VBox.margin>
</Button>
</children>
</VBox>
</children>
@@ -8,6 +8,7 @@
<top>
<HBox alignment="TOP_RIGHT" prefHeight="100.0" prefWidth="200.0" BorderPane.alignment="CENTER">
<children>
<CheckBox fx:id="treeView" mnemonicParsing="false" onAction="#changeView" selected="true" text="Baumansicht" />
<Button fx:id="createScheduleBtn" mnemonicParsing="false" onAction="#createNewSchedule" text="Create New Game Schedule">
<HBox.margin>
<Insets right="20.0" />