From 1cad86cff6706fc7c4634fb495bf790c72166b42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Dervaux?= <stephane.dervaux@inrae.fr> Date: Tue, 21 Nov 2023 11:56:36 +0100 Subject: [PATCH 1/2] change anchor pane for a scrollPane for observationOverview --- .../view/dataView/DataOverviewController.java | 2 +- .../view/dataView/ObservationOverview.fxml | 178 +++++++++--------- 2 files changed, 90 insertions(+), 90 deletions(-) diff --git a/src/main/java/fr/inra/po2vocabmanager/view/dataView/DataOverviewController.java b/src/main/java/fr/inra/po2vocabmanager/view/dataView/DataOverviewController.java index e63e2f5a..66a48362 100644 --- a/src/main/java/fr/inra/po2vocabmanager/view/dataView/DataOverviewController.java +++ b/src/main/java/fr/inra/po2vocabmanager/view/dataView/DataOverviewController.java @@ -81,7 +81,7 @@ public class DataOverviewController { ProcessOverviewController processControler; ScrollPane stepOverview; StepOverviewController stepControler; - AnchorPane observationOverview; + ScrollPane observationOverview; ObservationOverviewController observationControler; AnchorPane itineraryOverview; ItineraryOverviewController itineraryControler; diff --git a/src/main/resources/fr/inra/po2vocabmanager/view/dataView/ObservationOverview.fxml b/src/main/resources/fr/inra/po2vocabmanager/view/dataView/ObservationOverview.fxml index 8f847c5b..cbc47628 100644 --- a/src/main/resources/fr/inra/po2vocabmanager/view/dataView/ObservationOverview.fxml +++ b/src/main/resources/fr/inra/po2vocabmanager/view/dataView/ObservationOverview.fxml @@ -21,94 +21,94 @@ <?import javafx.geometry.Insets?> <?import javafx.scene.control.*?> <?import javafx.scene.layout.*?> -<AnchorPane xmlns:fx="http://javafx.com/fxml/1" maxHeight="Infinity" maxWidth="Infinity" xmlns="http://javafx.com/javafx/19" fx:controller="fr.inra.po2vocabmanager.view.dataView.ObservationOverviewController"> - <children> - <VBox fx:id="boxContent" spacing="10.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0"> - <children> - <TitledPane fx:id="observationPanel" text="Observation"> - <content> - <BorderPane> - <center> - <GridPane hgap="5.0" BorderPane.alignment="TOP_LEFT"> - <columnConstraints> - <ColumnConstraints hgrow="ALWAYS" percentWidth="33.3" /> - <ColumnConstraints hgrow="ALWAYS" percentWidth="33.3" /> - <ColumnConstraints hgrow="ALWAYS" percentWidth="33.3" /> - </columnConstraints> - <rowConstraints> - <RowConstraints vgrow="SOMETIMES" /> - </rowConstraints> - <children> - <VBox> - <children> - <Label text="Date (YYYY-MM-DD) :" /> - <TextField fx:id="observationDate" /> - <Label text="Time (hh:mm:ss) :" /> - <TextField fx:id="observationTime" /> - <Label text="Time duration (hh:mm:ss) :" /> - <TextField fx:id="observationTimeD" /> - </children> - </VBox> - <VBox prefWidth="171.0" GridPane.columnIndex="1"> - <children> - <Label alignment="TOP_LEFT" text="Scale :" /> - <TextField fx:id="observationScale" alignment="TOP_LEFT" /> - <Label text="Repetition :" /> - <TextField fx:id="observationRepet" /> - </children> - </VBox> - <VBox GridPane.columnIndex="2"> - <children> - <Label text="Objects observed :" /> - <ListView fx:id="listObjectObserved" prefHeight="111.0" prefWidth="171.0" /> - </children> - </VBox> - </children> - </GridPane> - </center> - <top> - <GridPane hgap="5.0" BorderPane.alignment="TOP_LEFT"> - <columnConstraints> - <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" /> - <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" /> - </columnConstraints> - <rowConstraints> - <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="ALWAYS" /> - </rowConstraints> - <children> - <VBox> - <children> - <Label text="Observation type :"> - <VBox.margin> - <Insets /> - </VBox.margin> - </Label> - <TextField fx:id="observationType" editable="false"> +<ScrollPane xmlns:fx="http://javafx.com/fxml/1" fitToHeight="true" fitToWidth="true" maxHeight="Infinity" maxWidth="Infinity" prefHeight="222.0" prefWidth="799.0" xmlns="http://javafx.com/javafx/21.0.1" fx:controller="fr.inra.po2vocabmanager.view.dataView.ObservationOverviewController"> + <content> + <VBox fx:id="boxContent" spacing="10.0"> + <children> + <TitledPane fx:id="observationPanel" text="Observation"> + <content> + <BorderPane> + <center> + <GridPane hgap="5.0" BorderPane.alignment="TOP_LEFT"> + <columnConstraints> + <ColumnConstraints hgrow="ALWAYS" percentWidth="33.3" /> + <ColumnConstraints hgrow="ALWAYS" percentWidth="33.3" /> + <ColumnConstraints hgrow="ALWAYS" percentWidth="33.3" /> + </columnConstraints> + <rowConstraints> + <RowConstraints vgrow="SOMETIMES" /> + </rowConstraints> + <children> + <VBox> + <children> + <Label text="Date (YYYY-MM-DD) :" /> + <TextField fx:id="observationDate" /> + <Label text="Time (hh:mm:ss) :" /> + <TextField fx:id="observationTime" /> + <Label text="Time duration (hh:mm:ss) :" /> + <TextField fx:id="observationTimeD" /> + </children> + </VBox> + <VBox prefWidth="171.0" GridPane.columnIndex="1"> + <children> + <Label alignment="TOP_LEFT" text="Scale :" /> + <TextField fx:id="observationScale" alignment="TOP_LEFT" /> + <Label text="Repetition :" /> + <TextField fx:id="observationRepet" /> + </children> + </VBox> + <VBox GridPane.columnIndex="2"> + <children> + <Label text="Objects observed :" /> + <ListView fx:id="listObjectObserved" prefHeight="111.0" prefWidth="171.0" /> + </children> + </VBox> + </children> + </GridPane> + </center> + <top> + <GridPane hgap="5.0" BorderPane.alignment="TOP_LEFT"> + <columnConstraints> + <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" /> + <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" /> + </columnConstraints> + <rowConstraints> + <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="ALWAYS" /> + </rowConstraints> + <children> + <VBox> + <children> + <Label text="Observation type :"> + <VBox.margin> + <Insets /> + </VBox.margin> + </Label> + <TextField fx:id="observationType" editable="false"> - </TextField> - </children> - </VBox> - <VBox GridPane.columnIndex="1"> - <children> - <Label text="Observation name :"> - <VBox.margin> - <Insets /> - </VBox.margin> - </Label> - <TextField fx:id="observationName" /> - </children> - </VBox> - </children> - <padding> - <Insets bottom="10.0" /> - </padding> - </GridPane> - </top> - </BorderPane> - </content> + </TextField> + </children> + </VBox> + <VBox GridPane.columnIndex="1"> + <children> + <Label text="Observation name :"> + <VBox.margin> + <Insets /> + </VBox.margin> + </Label> + <TextField fx:id="observationName" /> + </children> + </VBox> + </children> + <padding> + <Insets bottom="10.0" /> + </padding> + </GridPane> + </top> + </BorderPane> + </content> - </TitledPane> - </children> - </VBox> - </children> -</AnchorPane> + </TitledPane> + </children> + </VBox> + </content> +</ScrollPane> -- GitLab From fb45f985001ad5046715801597e3c460077c1451 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Dervaux?= <stephane.dervaux@inrae.fr> Date: Tue, 21 Nov 2023 11:57:04 +0100 Subject: [PATCH 2/2] add a min height for observation data --- .../view/dataView/ObservationOverviewController.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/fr/inra/po2vocabmanager/view/dataView/ObservationOverviewController.java b/src/main/java/fr/inra/po2vocabmanager/view/dataView/ObservationOverviewController.java index a2dce260..bd7535e2 100644 --- a/src/main/java/fr/inra/po2vocabmanager/view/dataView/ObservationOverviewController.java +++ b/src/main/java/fr/inra/po2vocabmanager/view/dataView/ObservationOverviewController.java @@ -261,6 +261,7 @@ public class ObservationOverviewController { TitledPane tablePane = new TitledPane(); TableView table = new TableView(); + table.setMinHeight(200); table.editableProperty().bind(this.mainApp.getEditProperty()); UITools.bindTable(tablePart.getTable(), table); tablePane.setContent(table); -- GitLab