From de088915fa688f134bda8e9e7cd56c33c0c4a65d Mon Sep 17 00:00:00 2001 From: tornhale <hannes.lt.tornberg@student.jyu.fi> Date: Thu, 6 Feb 2025 13:21:10 +0200 Subject: [PATCH] =?UTF-8?q?muokkausikkunaan=20lis=C3=A4tty=20poistonappi?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/fxKirjalista/LisaaView.fxml | 44 +++++++++++++++++-------------- src/fxKirjalista/MuokkaaView.fxml | 41 ++++++++++++++++++---------- 2 files changed, 51 insertions(+), 34 deletions(-) diff --git a/src/fxKirjalista/LisaaView.fxml b/src/fxKirjalista/LisaaView.fxml index 16a65f9..d717644 100644 --- a/src/fxKirjalista/LisaaView.fxml +++ b/src/fxKirjalista/LisaaView.fxml @@ -1,22 +1,19 @@ <?xml version="1.0" encoding="UTF-8"?> +<?import fi.jyu.mit.fxgui.ComboBoxChooser?> <?import javafx.geometry.Insets?> <?import javafx.scene.control.Button?> <?import javafx.scene.control.Label?> <?import javafx.scene.control.TextField?> <?import javafx.scene.layout.ColumnConstraints?> <?import javafx.scene.layout.GridPane?> +<?import javafx.scene.layout.HBox?> <?import javafx.scene.layout.RowConstraints?> <?import javafx.scene.layout.VBox?> - -<VBox maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="338.0" prefWidth="243.0" xmlns="http://javafx.com/javafx/23.0.1" xmlns:fx="http://javafx.com/fxml/1"> +<VBox maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="343.0" prefWidth="255.0" xmlns="http://javafx.com/javafx/23.0.1" xmlns:fx="http://javafx.com/fxml/1"> <children> - <Label text="Lisää"> - <VBox.margin> - <Insets bottom="7.0" left="7.0" right="7.0" top="7.0" /> - </VBox.margin> - </Label> + <Label text="Lisää" /> <GridPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="272.0" prefWidth="241.0"> <columnConstraints> <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" /> @@ -71,11 +68,6 @@ <Insets left="7.0" right="7.0" /> </GridPane.margin> </TextField> - <TextField GridPane.columnIndex="1" GridPane.rowIndex="3"> - <GridPane.margin> - <Insets left="7.0" right="7.0" /> - </GridPane.margin> - </TextField> <TextField GridPane.columnIndex="1" GridPane.rowIndex="4"> <GridPane.margin> <Insets left="7.0" right="7.0" /> @@ -91,15 +83,27 @@ <Insets left="7.0" right="7.0" /> </GridPane.margin> </TextField> + <ComboBoxChooser prefHeight="25.0" prefWidth="106.0" rivit="Valitse Sci-fi Fantasia Komedia Tietokirja" GridPane.columnIndex="1" GridPane.rowIndex="3"> + <GridPane.margin> + <Insets bottom="7.0" left="7.0" right="7.0" /> + </GridPane.margin> + </ComboBoxChooser> </children> </GridPane> - <Button contentDisplay="CENTER" mnemonicParsing="false" text="OK"> - <padding> - <Insets bottom="5.0" left="20.0" right="20.0" top="5.0" /> - </padding> - <VBox.margin> - <Insets left="7.0" right="7.0" /> - </VBox.margin> - </Button> + <HBox alignment="CENTER_RIGHT" prefHeight="100.0" prefWidth="200.0"> + <children> + <Button contentDisplay="CENTER" mnemonicParsing="false" text="OK"> + <padding> + <Insets bottom="5.0" left="20.0" right="20.0" top="5.0" /> + </padding> + <HBox.margin> + <Insets bottom="7.0" left="7.0" right="7.0" top="7.0" /> + </HBox.margin> + </Button> + </children> + </HBox> </children> + <padding> + <Insets bottom="7.0" left="7.0" right="7.0" top="7.0" /> + </padding> </VBox> diff --git a/src/fxKirjalista/MuokkaaView.fxml b/src/fxKirjalista/MuokkaaView.fxml index 3466c3f..3eabb47 100644 --- a/src/fxKirjalista/MuokkaaView.fxml +++ b/src/fxKirjalista/MuokkaaView.fxml @@ -1,15 +1,16 @@ <?xml version="1.0" encoding="UTF-8"?> +<?import fi.jyu.mit.fxgui.ComboBoxChooser?> <?import javafx.geometry.Insets?> <?import javafx.scene.control.Button?> <?import javafx.scene.control.Label?> <?import javafx.scene.control.TextField?> <?import javafx.scene.layout.ColumnConstraints?> <?import javafx.scene.layout.GridPane?> +<?import javafx.scene.layout.HBox?> <?import javafx.scene.layout.RowConstraints?> <?import javafx.scene.layout.VBox?> - <VBox maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="343.0" prefWidth="255.0" xmlns="http://javafx.com/javafx/23.0.1" xmlns:fx="http://javafx.com/fxml/1"> <children> <Label text="Muokkaa" /> @@ -67,11 +68,6 @@ <Insets left="7.0" right="7.0" /> </GridPane.margin> </TextField> - <TextField GridPane.columnIndex="1" GridPane.rowIndex="3"> - <GridPane.margin> - <Insets left="7.0" right="7.0" /> - </GridPane.margin> - </TextField> <TextField GridPane.columnIndex="1" GridPane.rowIndex="4"> <GridPane.margin> <Insets left="7.0" right="7.0" /> @@ -87,16 +83,33 @@ <Insets left="7.0" right="7.0" /> </GridPane.margin> </TextField> + <ComboBoxChooser prefHeight="25.0" prefWidth="106.0" rivit="Valitse Sci-fi Fantasia Komedia Tietokirja" GridPane.columnIndex="1" GridPane.rowIndex="3"> + <GridPane.margin> + <Insets bottom="7.0" left="7.0" right="7.0" /> + </GridPane.margin> + </ComboBoxChooser> </children> </GridPane> - <Button contentDisplay="CENTER" mnemonicParsing="false" text="OK"> - <VBox.margin> - <Insets bottom="7.0" left="7.0" right="7.0" top="7.0" /> - </VBox.margin> - <padding> - <Insets bottom="5.0" left="20.0" right="20.0" top="5.0" /> - </padding> - </Button> + <HBox alignment="CENTER_RIGHT" prefHeight="100.0" prefWidth="200.0"> + <children> + <Button contentDisplay="CENTER" mnemonicParsing="false" text="Poista"> + <padding> + <Insets bottom="5.0" left="20.0" right="20.0" top="5.0" /> + </padding> + <HBox.margin> + <Insets bottom="7.0" left="7.0" right="7.0" top="7.0" /> + </HBox.margin> + </Button> + <Button contentDisplay="CENTER" mnemonicParsing="false" text="OK"> + <padding> + <Insets bottom="5.0" left="20.0" right="20.0" top="5.0" /> + </padding> + <HBox.margin> + <Insets bottom="7.0" left="7.0" right="7.0" top="7.0" /> + </HBox.margin> + </Button> + </children> + </HBox> </children> <padding> <Insets bottom="7.0" left="7.0" right="7.0" top="7.0" /> -- GitLab