From 321bfeb2d1fac1aa3b5421c574201c7cc1d4a90e Mon Sep 17 00:00:00 2001 From: stephane <stephane.dervaux@inrae.fr> Date: Thu, 12 Sep 2024 11:53:49 +0200 Subject: [PATCH 1/3] add description in obervation --- .../ObservationOverviewController.java | 6 +-- .../view/dataView/ObservationOverview.fxml | 41 +++++++++---------- .../view/dataView/ProcessOverview.fxml | 10 ++--- .../view/dataView/ProjectOverview.fxml | 4 +- .../view/dataView/StepOverview.fxml | 21 +++++----- 5 files changed, 40 insertions(+), 42 deletions(-) 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 3f23db61..297a6a5f 100644 --- a/src/main/java/fr/inra/po2vocabmanager/view/dataView/ObservationOverviewController.java +++ b/src/main/java/fr/inra/po2vocabmanager/view/dataView/ObservationOverviewController.java @@ -64,7 +64,7 @@ public class ObservationOverviewController { @FXML TextField observationTimeD; @FXML - TextField observationRepet; + TextArea observationDesc; @FXML TextField observationScale; @FXML @@ -92,7 +92,7 @@ public class ObservationOverviewController { observationDate.editableProperty().bind(mainApp.getEditProperty()); observationTime.editableProperty().bind(mainApp.getEditProperty()); observationTimeD.editableProperty().bind(mainApp.getEditProperty()); - observationRepet.editableProperty().bind(mainApp.getEditProperty()); + observationDesc.editableProperty().bind(mainApp.getEditProperty()); observationScale.editableProperty().bind(mainApp.getEditProperty()); // listObjectObserved.disableProperty().bind(mainApp.getEditProperty().not()); @@ -148,7 +148,7 @@ public class ObservationOverviewController { UITools.simpleBindValue(file.getCDate(), observationDate); UITools.simpleBindValue(file.getCDuree(), observationTimeD); UITools.simpleBindValue(file.getCHeure(), observationTime); - UITools.simpleBindValue(file.getCRepet(), observationRepet); + UITools.simpleBindValue(file.getCDescrition(), observationDesc); UITools.simpleBindValue(file.getCScale(), observationScale); UITools.bindComboBoxAgent(file.getAgentProperty(),file.getData().getProjectFile().getListAgent(), orgAgent); UITools.addAutoComplete(observationScale, file.getCScale().getListConstraint()); 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 68b5e78f..02221c0c 100644 --- a/src/main/resources/fr/inra/po2vocabmanager/view/dataView/ObservationOverview.fxml +++ b/src/main/resources/fr/inra/po2vocabmanager/view/dataView/ObservationOverview.fxml @@ -32,7 +32,7 @@ <ColumnConstraints hgrow="ALWAYS" percentWidth="25.0" /> <ColumnConstraints hgrow="ALWAYS" percentWidth="25.0" /> <ColumnConstraints hgrow="ALWAYS" percentWidth="25.0" /> - <ColumnConstraints hgrow="ALWAYS" percentWidth="25.0" /> + <ColumnConstraints hgrow="ALWAYS" /> </columnConstraints> <rowConstraints> <RowConstraints maxHeight="40.0" minHeight="40.0" prefHeight="40.0" vgrow="SOMETIMES" /> @@ -53,13 +53,8 @@ <TextField fx:id="observationScale" alignment="TOP_LEFT" /> </children> </VBox> - <VBox prefHeight="200.0" prefWidth="100.0" GridPane.columnIndex="2" GridPane.columnSpan="2" GridPane.rowIndex="1" GridPane.rowSpan="3"> - <children> - <Label text="Objects observed :" /> - <ListView fx:id="listObjectObserved" prefHeight="111.0" prefWidth="171.0" /> - </children> - </VBox> - <VBox prefHeight="200.0" prefWidth="100.0" GridPane.columnSpan="2"> + <VBox prefHeight="200.0" prefWidth="100.0" GridPane.columnIndex="2" GridPane.rowIndex="1" GridPane.rowSpan="3" /> + <VBox prefHeight="200.0" prefWidth="100.0"> <children> <Label text="Observation type :"> <VBox.margin> @@ -71,16 +66,20 @@ </TextField> </children> </VBox> - <VBox prefHeight="200.0" prefWidth="100.0" GridPane.columnIndex="1" /> - <VBox prefHeight="200.0" prefWidth="100.0" GridPane.columnIndex="2" GridPane.columnSpan="2"> - <children> + <VBox prefHeight="200.0" prefWidth="100.0" GridPane.columnIndex="1"> + <children> <Label text="Observation name :"> <VBox.margin> <Insets /> </VBox.margin> </Label> <TextField fx:id="observationName" /> - </children> + </children></VBox> + <VBox prefHeight="200.0" prefWidth="100.0" GridPane.columnIndex="2" GridPane.rowSpan="4"> + <children> + <Label text="Objects observed :" /> + <ListView fx:id="listObjectObserved" /> + </children> </VBox> <VBox prefHeight="200.0" prefWidth="100.0" GridPane.rowIndex="2"> <children> @@ -94,21 +93,21 @@ <TextField fx:id="observationTimeD" /> </children> </VBox> - <VBox prefHeight="200.0" prefWidth="100.0" /> - <VBox prefHeight="200.0" prefWidth="100.0" GridPane.columnIndex="1" GridPane.rowIndex="3"> - <children> - <Label text="Repetition :" /> - <TextField fx:id="observationRepet" /> - </children> - </VBox> - <VBox prefHeight="200.0" prefWidth="100.0" GridPane.columnIndex="2" GridPane.rowIndex="2" /> - <VBox prefHeight="200.0" prefWidth="100.0" GridPane.columnIndex="2" GridPane.rowIndex="3" /> + <VBox prefHeight="200.0" prefWidth="100.0" GridPane.columnIndex="1" GridPane.rowIndex="3" /> + <VBox prefHeight="200.0" prefWidth="100.0" GridPane.columnIndex="2" GridPane.rowIndex="2" GridPane.rowSpan="2" /> <VBox prefHeight="200.0" prefWidth="100.0" GridPane.columnIndex="1" GridPane.rowIndex="1"> <children> <Label text="Organization / Agent :" /> <ComboBox fx:id="orgAgent" prefWidth="1000.0" /> </children> </VBox> + <VBox prefHeight="200.0" prefWidth="100.0" GridPane.columnIndex="3" GridPane.rowIndex="1" /> + <VBox prefHeight="200.0" prefWidth="100.0" GridPane.columnIndex="3" GridPane.rowSpan="4"> + <children> + <Label text="Description :" /> + <TextArea fx:id="observationDesc" prefHeight="200.0" prefWidth="200.0" /> + </children> + </VBox> </children> </GridPane> </content> diff --git a/src/main/resources/fr/inra/po2vocabmanager/view/dataView/ProcessOverview.fxml b/src/main/resources/fr/inra/po2vocabmanager/view/dataView/ProcessOverview.fxml index 272880f8..e3ec97e7 100644 --- a/src/main/resources/fr/inra/po2vocabmanager/view/dataView/ProcessOverview.fxml +++ b/src/main/resources/fr/inra/po2vocabmanager/view/dataView/ProcessOverview.fxml @@ -25,7 +25,7 @@ <children> <VBox spacing="10.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0"> <children> - <TitledPane prefHeight="210.0" text="Process"> + <TitledPane text="Process"> <content> <GridPane hgap="5.0" vgap="5.0"> <columnConstraints> @@ -60,8 +60,8 @@ </VBox> <VBox GridPane.columnIndex="1" GridPane.rowIndex="1" GridPane.rowSpan="2"> <children> - <Label text="Description : " /> - <TextArea fx:id="description" /> + <Label fx:id="linksLabel" text="External Links :" /> + <ListView fx:id="listExternalLinks" prefHeight="200.0" prefWidth="200.0" /> </children> </VBox> <VBox GridPane.rowIndex="1"> @@ -81,8 +81,8 @@ </children></VBox> <VBox prefHeight="200.0" prefWidth="100.0" GridPane.columnIndex="2" GridPane.rowSpan="3"> <children> - <Label fx:id="linksLabel" text="External Links :" /> - <ListView fx:id="listExternalLinks" prefHeight="200.0" prefWidth="200.0" /> + <Label text="Description : " /> + <TextArea fx:id="description" /> </children> </VBox> </children> diff --git a/src/main/resources/fr/inra/po2vocabmanager/view/dataView/ProjectOverview.fxml b/src/main/resources/fr/inra/po2vocabmanager/view/dataView/ProjectOverview.fxml index 623fa2da..c6b732f7 100644 --- a/src/main/resources/fr/inra/po2vocabmanager/view/dataView/ProjectOverview.fxml +++ b/src/main/resources/fr/inra/po2vocabmanager/view/dataView/ProjectOverview.fxml @@ -50,13 +50,13 @@ <ComboBox fx:id="contactAgent" prefWidth="1000.0" /> </children> </VBox> - <VBox prefHeight="200.0" prefWidth="100.0" GridPane.columnIndex="1" GridPane.rowSpan="3"> + <VBox prefHeight="200.0" prefWidth="100.0" GridPane.columnIndex="2" GridPane.rowSpan="3"> <children> <Label text="Description :" /> <TextArea fx:id="description" prefHeight="200.0" prefWidth="200.0" /> </children> </VBox> - <VBox prefHeight="200.0" prefWidth="100.0" GridPane.columnIndex="2" GridPane.rowSpan="3"> + <VBox prefHeight="200.0" prefWidth="100.0" GridPane.columnIndex="1" GridPane.rowSpan="3"> <children> <Label fx:id="linksLabel" contentDisplay="RIGHT" text="External links :" /> <ListView fx:id="listExternalLinks" /> diff --git a/src/main/resources/fr/inra/po2vocabmanager/view/dataView/StepOverview.fxml b/src/main/resources/fr/inra/po2vocabmanager/view/dataView/StepOverview.fxml index 22abf3f0..1607f5cd 100644 --- a/src/main/resources/fr/inra/po2vocabmanager/view/dataView/StepOverview.fxml +++ b/src/main/resources/fr/inra/po2vocabmanager/view/dataView/StepOverview.fxml @@ -21,7 +21,7 @@ <?import javafx.geometry.Insets?> <?import javafx.scene.control.*?> <?import javafx.scene.layout.*?> -<ScrollPane xmlns:fx="http://javafx.com/fxml/1" fitToWidth="true" hbarPolicy="NEVER" style="-fx-background-color: grey;" xmlns="http://javafx.com/javafx/21" fx:controller="fr.inra.po2vocabmanager.view.dataView.StepOverviewController"> +<ScrollPane xmlns:fx="http://javafx.com/fxml/1" fitToWidth="true" hbarPolicy="NEVER" prefHeight="224.0" prefWidth="600.0" style="-fx-background-color: grey;" xmlns="http://javafx.com/javafx/21" fx:controller="fr.inra.po2vocabmanager.view.dataView.StepOverviewController"> <content> <VBox fx:id="boxContent" spacing="10.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0"> <children> @@ -29,10 +29,9 @@ <content> <GridPane hgap="5.0" vgap="5.0"> <columnConstraints> - <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" percentWidth="25.0" /> - <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" percentWidth="25.0" prefWidth="100.0" /> - <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" percentWidth="25.0" prefWidth="100.0" /> - <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" percentWidth="25.0" prefWidth="100.0" /> + <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" percentWidth="33.0" /> + <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" percentWidth="33.0" /> + <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" percentWidth="-1.0" /> </columnConstraints> <rowConstraints> <RowConstraints maxHeight="40.0" minHeight="40.0" prefHeight="40.0" vgrow="SOMETIMES" /> @@ -41,7 +40,7 @@ <RowConstraints maxHeight="40.0" minHeight="40.0" prefHeight="40.0" vgrow="SOMETIMES" /> </rowConstraints> <children> - <VBox prefHeight="200.0" prefWidth="100.0" GridPane.columnIndex="0" GridPane.columnSpan="2"> + <VBox prefHeight="200.0" prefWidth="100.0" GridPane.columnIndex="0" GridPane.columnSpan="1"> <children> <Label prefWidth="300.0" text="Step type :"> <VBox.margin> @@ -53,31 +52,31 @@ </TextField> </children> </VBox> - <VBox prefHeight="200.0" prefWidth="100.0" GridPane.columnIndex="2" GridPane.columnSpan="2"> + <VBox prefHeight="200.0" prefWidth="100.0" GridPane.columnIndex="1"> <children> <Label fx:id="stepIdLabel" contentDisplay="RIGHT" prefWidth="300.0" text="Step name :" /> <TextField fx:id="stepID" prefWidth="400.0" /> </children> </VBox> - <VBox prefHeight="200.0" prefWidth="100.0" GridPane.rowIndex="1"> + <VBox prefHeight="200.0" prefWidth="100.0" GridPane.columnIndex="0" GridPane.rowIndex="1"> <children> <Label prefHeight="30.0" text="Start date (YYYY-MM-DD) :" /> <TextField fx:id="date" /> </children> </VBox> - <VBox prefHeight="200.0" prefWidth="100.0" GridPane.rowIndex="2"> + <VBox prefHeight="200.0" prefWidth="100.0" GridPane.columnIndex="0" GridPane.rowIndex="2"> <children> <Label prefHeight="30.0" text="Start time (hh:mm:ss) :" /> <TextField fx:id="time" /> </children> </VBox> - <VBox prefHeight="200.0" prefWidth="100.0" GridPane.rowIndex="3"> + <VBox prefHeight="200.0" prefWidth="100.0" GridPane.columnIndex="0" GridPane.rowIndex="3"> <children> <Label prefHeight="30.0" text="Time duration (hh:mm:ss) :" /> <TextField fx:id="duree" /> </children> </VBox> - <VBox prefHeight="200.0" prefWidth="100.0" GridPane.columnIndex="2" GridPane.columnSpan="2" GridPane.rowIndex="1" GridPane.rowSpan="3"> + <VBox prefHeight="200.0" prefWidth="100.0" GridPane.columnIndex="2" GridPane.columnSpan="1" GridPane.rowSpan="4"> <children> <Label text="Description :" /> <TextArea fx:id="description" /> -- GitLab From 0cec65b82f6bf2a20681c7e18f5098c006944a79 Mon Sep 17 00:00:00 2001 From: stephane <stephane.dervaux@inrae.fr> Date: Thu, 12 Sep 2024 15:05:34 +0200 Subject: [PATCH 2/3] add wrap text in description --- .../inra/po2vocabmanager/view/dataView/ObservationOverview.fxml | 2 +- .../fr/inra/po2vocabmanager/view/dataView/ProcessOverview.fxml | 2 +- .../fr/inra/po2vocabmanager/view/dataView/ProjectOverview.fxml | 2 +- .../fr/inra/po2vocabmanager/view/dataView/StepOverview.fxml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) 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 02221c0c..6c62b76d 100644 --- a/src/main/resources/fr/inra/po2vocabmanager/view/dataView/ObservationOverview.fxml +++ b/src/main/resources/fr/inra/po2vocabmanager/view/dataView/ObservationOverview.fxml @@ -105,7 +105,7 @@ <VBox prefHeight="200.0" prefWidth="100.0" GridPane.columnIndex="3" GridPane.rowSpan="4"> <children> <Label text="Description :" /> - <TextArea fx:id="observationDesc" prefHeight="200.0" prefWidth="200.0" /> + <TextArea fx:id="observationDesc" prefHeight="200.0" prefWidth="200.0" wrapText="true" /> </children> </VBox> </children> diff --git a/src/main/resources/fr/inra/po2vocabmanager/view/dataView/ProcessOverview.fxml b/src/main/resources/fr/inra/po2vocabmanager/view/dataView/ProcessOverview.fxml index e3ec97e7..ef01250e 100644 --- a/src/main/resources/fr/inra/po2vocabmanager/view/dataView/ProcessOverview.fxml +++ b/src/main/resources/fr/inra/po2vocabmanager/view/dataView/ProcessOverview.fxml @@ -82,7 +82,7 @@ <VBox prefHeight="200.0" prefWidth="100.0" GridPane.columnIndex="2" GridPane.rowSpan="3"> <children> <Label text="Description : " /> - <TextArea fx:id="description" /> + <TextArea fx:id="description" wrapText="true" /> </children> </VBox> </children> diff --git a/src/main/resources/fr/inra/po2vocabmanager/view/dataView/ProjectOverview.fxml b/src/main/resources/fr/inra/po2vocabmanager/view/dataView/ProjectOverview.fxml index c6b732f7..2c0e8c70 100644 --- a/src/main/resources/fr/inra/po2vocabmanager/view/dataView/ProjectOverview.fxml +++ b/src/main/resources/fr/inra/po2vocabmanager/view/dataView/ProjectOverview.fxml @@ -53,7 +53,7 @@ <VBox prefHeight="200.0" prefWidth="100.0" GridPane.columnIndex="2" GridPane.rowSpan="3"> <children> <Label text="Description :" /> - <TextArea fx:id="description" prefHeight="200.0" prefWidth="200.0" /> + <TextArea fx:id="description" prefHeight="200.0" prefWidth="200.0" wrapText="true" /> </children> </VBox> <VBox prefHeight="200.0" prefWidth="100.0" GridPane.columnIndex="1" GridPane.rowSpan="3"> diff --git a/src/main/resources/fr/inra/po2vocabmanager/view/dataView/StepOverview.fxml b/src/main/resources/fr/inra/po2vocabmanager/view/dataView/StepOverview.fxml index 1607f5cd..ea0edc6a 100644 --- a/src/main/resources/fr/inra/po2vocabmanager/view/dataView/StepOverview.fxml +++ b/src/main/resources/fr/inra/po2vocabmanager/view/dataView/StepOverview.fxml @@ -79,7 +79,7 @@ <VBox prefHeight="200.0" prefWidth="100.0" GridPane.columnIndex="2" GridPane.columnSpan="1" GridPane.rowSpan="4"> <children> <Label text="Description :" /> - <TextArea fx:id="description" /> + <TextArea fx:id="description" wrapText="true" /> </children> </VBox> <VBox maxWidth="200.0" prefHeight="100.0" GridPane.columnIndex="1" GridPane.rowIndex="1"> -- GitLab From 5694b1d4ebe5448fc53270b2658facde9ba56784 Mon Sep 17 00:00:00 2001 From: stephane <stephane.dervaux@inrae.fr> Date: Thu, 12 Sep 2024 17:25:34 +0200 Subject: [PATCH 3/3] bug fix --- .../po2vocabmanager/view/dataView/StepOverview.fxml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/resources/fr/inra/po2vocabmanager/view/dataView/StepOverview.fxml b/src/main/resources/fr/inra/po2vocabmanager/view/dataView/StepOverview.fxml index ea0edc6a..b4b348b7 100644 --- a/src/main/resources/fr/inra/po2vocabmanager/view/dataView/StepOverview.fxml +++ b/src/main/resources/fr/inra/po2vocabmanager/view/dataView/StepOverview.fxml @@ -21,7 +21,7 @@ <?import javafx.geometry.Insets?> <?import javafx.scene.control.*?> <?import javafx.scene.layout.*?> -<ScrollPane xmlns:fx="http://javafx.com/fxml/1" fitToWidth="true" hbarPolicy="NEVER" prefHeight="224.0" prefWidth="600.0" style="-fx-background-color: grey;" xmlns="http://javafx.com/javafx/21" fx:controller="fr.inra.po2vocabmanager.view.dataView.StepOverviewController"> +<ScrollPane xmlns:fx="http://javafx.com/fxml/1" fitToWidth="true" hbarPolicy="NEVER" prefHeight="224.0" prefWidth="1071.0" style="-fx-background-color: grey;" xmlns="http://javafx.com/javafx/21" fx:controller="fr.inra.po2vocabmanager.view.dataView.StepOverviewController"> <content> <VBox fx:id="boxContent" spacing="10.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0"> <children> @@ -40,7 +40,7 @@ <RowConstraints maxHeight="40.0" minHeight="40.0" prefHeight="40.0" vgrow="SOMETIMES" /> </rowConstraints> <children> - <VBox prefHeight="200.0" prefWidth="100.0" GridPane.columnIndex="0" GridPane.columnSpan="1"> + <VBox GridPane.columnIndex="0" GridPane.columnSpan="1"> <children> <Label prefWidth="300.0" text="Step type :"> <VBox.margin> @@ -52,7 +52,7 @@ </TextField> </children> </VBox> - <VBox prefHeight="200.0" prefWidth="100.0" GridPane.columnIndex="1"> + <VBox GridPane.columnIndex="1"> <children> <Label fx:id="stepIdLabel" contentDisplay="RIGHT" prefWidth="300.0" text="Step name :" /> <TextField fx:id="stepID" prefWidth="400.0" /> @@ -82,10 +82,10 @@ <TextArea fx:id="description" wrapText="true" /> </children> </VBox> - <VBox maxWidth="200.0" prefHeight="100.0" GridPane.columnIndex="1" GridPane.rowIndex="1"> + <VBox GridPane.columnIndex="1" GridPane.rowIndex="1"> <children> <Label text="Organization / Agent :" /> - <ComboBox fx:id="orgAgent" prefWidth="1000.0" /> + <ComboBox fx:id="orgAgent" prefWidth="10000.0" /> </children> </VBox> <VBox prefHeight="200.0" prefWidth="100.0" GridPane.columnIndex="1" GridPane.rowIndex="2"> -- GitLab