From e314969236aecc033c3a992adb830fc571c246bf Mon Sep 17 00:00:00 2001 From: stephane <stephane.dervaux@inrae.fr> Date: Fri, 26 Jul 2024 12:16:47 +0200 Subject: [PATCH 1/2] add autocomplete on obs scale --- .../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 99565ee9..90ffed99 100644 --- a/src/main/java/fr/inra/po2vocabmanager/view/dataView/ObservationOverviewController.java +++ b/src/main/java/fr/inra/po2vocabmanager/view/dataView/ObservationOverviewController.java @@ -143,6 +143,7 @@ public class ObservationOverviewController { UITools.simpleBindValue(file.getCHeure(), observationTime); UITools.simpleBindValue(file.getCRepet(), observationRepet); UITools.simpleBindValue(file.getCScale(), observationScale); + UITools.addAutoComplete(observationScale, file.getCScale().getListConstraint()); listItem = FXCollections.observableArrayList(); -- GitLab From 007ffab50b3f599a46b1ba8ca1a183bd7d32d791 Mon Sep 17 00:00:00 2001 From: stephane <stephane.dervaux@inrae.fr> Date: Fri, 26 Jul 2024 16:39:26 +0200 Subject: [PATCH 2/2] add scale on step and autoComplete --- .../view/dataView/StepOverviewController.java | 8 ++++++++ .../view/dataView/StepOverview.fxml | 17 ++++++++++++----- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/src/main/java/fr/inra/po2vocabmanager/view/dataView/StepOverviewController.java b/src/main/java/fr/inra/po2vocabmanager/view/dataView/StepOverviewController.java index f726e07a..ee3cb206 100644 --- a/src/main/java/fr/inra/po2vocabmanager/view/dataView/StepOverviewController.java +++ b/src/main/java/fr/inra/po2vocabmanager/view/dataView/StepOverviewController.java @@ -55,6 +55,8 @@ public class StepOverviewController { TextField time; @FXML TextField duree; + @FXML + TextField scale; @FXML TitledPane stepPanel; @@ -93,6 +95,9 @@ public class StepOverviewController { duree.editableProperty().bind(this.mainApp.getEditProperty()); duree.disableProperty().bind(this.mainApp.getEditProperty().not()); + + scale.editableProperty().bind(this.mainApp.getEditProperty()); + scale.disableProperty().bind(this.mainApp.getEditProperty().not()); } public void showNodeDetails(DataNode node) { @@ -107,6 +112,8 @@ public class StepOverviewController { UITools.simpleBindValue(f.getCDate(), date); UITools.simpleBindValue(f.getCTime(), time); UITools.simpleBindValue(f.getCDuration(), duree); + UITools.simpleBindValue(f.getCScale(), scale); + listAutoCompletion.add(UITools.addAutoComplete(scale, f.getCScale().getListConstraint())); listAutoCompletion.add(UITools.addAutoComplete(stepTitle, f.getCType().getListConstraint())); // UITools.addPopOver(stepTitle, Ontology.Step); @@ -257,6 +264,7 @@ public class StepOverviewController { } stepID.styleProperty().unbind(); stepTitle.styleProperty().unbind(); + scale.styleProperty().unbind(); for(AutoCompletionBinding auto : listAutoCompletion) { auto.dispose(); } 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 5635ea25..e24f1bad 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/17" fx:controller="fr.inra.po2vocabmanager.view.dataView.StepOverviewController"> +<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"> <content> <VBox fx:id="boxContent" maxHeight="Infinity" maxWidth="Infinity" spacing="10.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0"> <children> @@ -65,35 +65,42 @@ <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" percentWidth="33.0" prefWidth="100.0" /> </columnConstraints> <rowConstraints> + <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" /> <RowConstraints minHeight="10.0" vgrow="SOMETIMES" /> <RowConstraints minHeight="10.0" vgrow="SOMETIMES" /> <RowConstraints minHeight="10.0" vgrow="SOMETIMES" /> </rowConstraints> <children> - <VBox> + <VBox GridPane.rowIndex="1"> <children> <Label prefHeight="30.0" text="Date (YYYY-MM-DD) :" /> <TextField fx:id="date" /> </children> </VBox> - <VBox GridPane.rowIndex="1"> + <VBox GridPane.rowIndex="2"> <children> <Label prefHeight="30.0" text="Time (hh:mm:ss) :" /> <TextField fx:id="time" /> </children> </VBox> - <VBox GridPane.rowIndex="2"> + <VBox GridPane.rowIndex="3"> <children> <Label prefHeight="30.0" text="Time duration (hh:mm:ss) :" /> <TextField fx:id="duree" /> </children> </VBox> - <VBox GridPane.columnIndex="1" GridPane.columnSpan="2" GridPane.rowSpan="3"> + <VBox GridPane.columnIndex="1" GridPane.columnSpan="2" GridPane.rowIndex="1" GridPane.rowSpan="3"> <children> <Label text="Description :" /> <TextArea fx:id="description" prefWidth="874.0" /> </children> </VBox> + <VBox> + <children> + <Label prefHeight="30.0" text="Scale" /> + <TextField fx:id="scale" /> + </children> + </VBox> </children> </GridPane> </center> -- GitLab