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 63275b603396c48543efe17704c22effc7cae052..3f23db618e375fa06f25640e54c2895aeaf6f3d1 100644 --- a/src/main/java/fr/inra/po2vocabmanager/view/dataView/ObservationOverviewController.java +++ b/src/main/java/fr/inra/po2vocabmanager/view/dataView/ObservationOverviewController.java @@ -151,6 +151,7 @@ public class ObservationOverviewController { UITools.simpleBindValue(file.getCRepet(), observationRepet); UITools.simpleBindValue(file.getCScale(), observationScale); UITools.bindComboBoxAgent(file.getAgentProperty(),file.getData().getProjectFile().getListAgent(), orgAgent); + UITools.addAutoComplete(observationScale, file.getCScale().getListConstraint()); listItem = FXCollections.observableArrayList(); 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 ac1dd94a50f15ba5800d3109e26963d6ffe2651c..168ba1665fdfaf6f7371393ce024ca6a13dd868a 100644 --- a/src/main/java/fr/inra/po2vocabmanager/view/dataView/StepOverviewController.java +++ b/src/main/java/fr/inra/po2vocabmanager/view/dataView/StepOverviewController.java @@ -60,6 +60,8 @@ public class StepOverviewController { TextField duree; @FXML ComboBox<HashMap<KeyWords, ComplexField>> orgAgent; + @FXML + TextField scale; @FXML TitledPane stepPanel; @@ -101,6 +103,9 @@ public class StepOverviewController { orgAgent.setEditable(false); orgAgent.disableProperty().bind(this.mainApp.getEditProperty().not()); + + scale.editableProperty().bind(this.mainApp.getEditProperty()); + scale.disableProperty().bind(this.mainApp.getEditProperty().not()); } public void showNodeDetails(DataNode node) { @@ -116,6 +121,8 @@ public class StepOverviewController { UITools.simpleBindValue(f.getCTime(), time); UITools.simpleBindValue(f.getCDuration(), duree); UITools.bindComboBoxAgent(f.getAgentProperty(),f.getData().getProjectFile().getListAgent(), orgAgent); + 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); @@ -239,6 +246,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/ObservationOverview.fxml b/src/main/resources/fr/inra/po2vocabmanager/view/dataView/ObservationOverview.fxml index 4e46d633c00b3ecd1be4273a1e23fd5906260e59..68b5e78f308e994900ddc3a6be2ecbab35f58f88 100644 --- a/src/main/resources/fr/inra/po2vocabmanager/view/dataView/ObservationOverview.fxml +++ b/src/main/resources/fr/inra/po2vocabmanager/view/dataView/ObservationOverview.fxml @@ -22,99 +22,99 @@ <?import javafx.scene.control.*?> <?import javafx.scene.layout.*?> <ScrollPane xmlns:fx="http://javafx.com/fxml/1" fitToHeight="true" fitToWidth="true" maxHeight="Infinity" maxWidth="Infinity" prefHeight="225.0" prefWidth="799.0" xmlns="http://javafx.com/javafx/21" fx:controller="fr.inra.po2vocabmanager.view.dataView.ObservationOverviewController"> - <content> - <VBox fx:id="boxContent" spacing="10.0"> - <children> - <TitledPane fx:id="observationPanel" prefHeight="303.0" prefWidth="797.0" text="Observation"> - <content> - <GridPane hgap="5.0"> - <columnConstraints> - <ColumnConstraints hgrow="ALWAYS" percentWidth="25.0" /> - <ColumnConstraints hgrow="ALWAYS" percentWidth="25.0" /> - <ColumnConstraints hgrow="ALWAYS" percentWidth="25.0" /> - <ColumnConstraints hgrow="ALWAYS" minWidth="10.0" percentWidth="25.0" prefWidth="100.0" /> - </columnConstraints> - <rowConstraints> - <RowConstraints minHeight="10.0" percentHeight="25.0" prefHeight="30.0" vgrow="SOMETIMES" /> - <RowConstraints percentHeight="25.0" vgrow="SOMETIMES" /> - <RowConstraints minHeight="10.0" percentHeight="25.0" prefHeight="30.0" vgrow="SOMETIMES" /> - <RowConstraints minHeight="10.0" percentHeight="25.0" prefHeight="30.0" vgrow="SOMETIMES" /> - </rowConstraints> - <children> - <VBox GridPane.rowIndex="1"> - <children> - <Label text="Start date (YYYY-MM-DD) :" /> - <TextField fx:id="observationDate" /> - </children> - </VBox> - <VBox prefWidth="171.0" GridPane.columnIndex="1" GridPane.rowIndex="2"> - <children> - <Label alignment="TOP_LEFT" text="Scale :" /> - <TextField fx:id="observationScale" alignment="TOP_LEFT" /> - </children> - </VBox> - <VBox 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 GridPane.columnSpan="2"> - <children> - <Label text="Observation type :"> - <VBox.margin> - <Insets /> - </VBox.margin> - </Label> - <TextField fx:id="observationType" editable="false"> + <content> + <VBox fx:id="boxContent" spacing="10.0"> + <children> + <TitledPane fx:id="observationPanel" text="Observation"> + <content> + <GridPane hgap="5.0" vgap="5.0"> + <columnConstraints> + <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> + <rowConstraints> + <RowConstraints maxHeight="40.0" minHeight="40.0" prefHeight="40.0" vgrow="SOMETIMES" /> + <RowConstraints maxHeight="40.0" minHeight="40.0" prefHeight="40.0" vgrow="SOMETIMES" /> + <RowConstraints maxHeight="40.0" minHeight="40.0" prefHeight="40.0" vgrow="SOMETIMES" /> + <RowConstraints maxHeight="40.0" minHeight="40.0" prefHeight="40.0" vgrow="SOMETIMES" /> + </rowConstraints> + <children> + <VBox prefHeight="200.0" prefWidth="100.0" GridPane.rowIndex="1"> + <children> + <Label text="Start date (YYYY-MM-DD) :" /> + <TextField fx:id="observationDate" /> + </children> + </VBox> + <VBox prefHeight="200.0" prefWidth="100.0" GridPane.columnIndex="1" GridPane.rowIndex="2"> + <children> + <Label alignment="TOP_LEFT" text="Scale :" /> + <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"> + <children> + <Label text="Observation type :"> + <VBox.margin> + <Insets /> + </VBox.margin> + </Label> + <TextField fx:id="observationType" editable="false"> - </TextField> - </children> - </VBox> - <VBox GridPane.columnIndex="1" /> - <VBox prefHeight="200.0" prefWidth="100.0" GridPane.columnIndex="2" GridPane.columnSpan="2"> - <children> - <Label text="Observation name :"> - <VBox.margin> - <Insets /> - </VBox.margin> - </Label> - <TextField fx:id="observationName" /> - </children> - </VBox> - <VBox prefHeight="200.0" prefWidth="100.0" GridPane.rowIndex="2"> - <children> - <Label text="Start time (hh:mm:ss) :" /> - <TextField fx:id="observationTime" /> - </children> - </VBox> - <VBox prefHeight="200.0" prefWidth="100.0" GridPane.rowIndex="3"> - <children> - <Label text="Time duration (hh:mm:ss) :" /> - <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="1"> - <children> - <Label text="Organization / Agent :" /> - <ComboBox fx:id="orgAgent" /> - </children> - </VBox> - </children> - </GridPane> - </content> + </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> + <Label text="Observation name :"> + <VBox.margin> + <Insets /> + </VBox.margin> + </Label> + <TextField fx:id="observationName" /> + </children> + </VBox> + <VBox prefHeight="200.0" prefWidth="100.0" GridPane.rowIndex="2"> + <children> + <Label text="Start time (hh:mm:ss) :" /> + <TextField fx:id="observationTime" /> + </children> + </VBox> + <VBox prefHeight="200.0" prefWidth="100.0" GridPane.rowIndex="3"> + <children> + <Label text="Time duration (hh:mm:ss) :" /> + <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="1"> + <children> + <Label text="Organization / Agent :" /> + <ComboBox fx:id="orgAgent" prefWidth="1000.0" /> + </children> + </VBox> + </children> + </GridPane> + </content> </TitledPane> - </children> - </VBox> - </content> + </children> + </VBox> + </content> </ScrollPane> 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 3871d3b54891f62a7780ad540a5e482d5ff8d857..272880f8c34f6281d1e3ceaf87ea136a3c55c778 100644 --- a/src/main/resources/fr/inra/po2vocabmanager/view/dataView/ProcessOverview.fxml +++ b/src/main/resources/fr/inra/po2vocabmanager/view/dataView/ProcessOverview.fxml @@ -34,9 +34,9 @@ <ColumnConstraints hgrow="ALWAYS" /> </columnConstraints> <rowConstraints> - <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" /> - <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" /> - <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" /> + <RowConstraints maxHeight="40.0" minHeight="40.0" prefHeight="40.0" vgrow="SOMETIMES" /> + <RowConstraints maxHeight="40.0" minHeight="40.0" prefHeight="40.0" vgrow="SOMETIMES" /> + <RowConstraints maxHeight="40.0" minHeight="40.0" prefHeight="40.0" vgrow="SOMETIMES" /> </rowConstraints> <children> <VBox GridPane.columnIndex="1"> 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 99e258cb5f29164bd2a28f9bc0258c070d48cdc0..623fa2dadd3707fe7d811f898ebedbda44673d1a 100644 --- a/src/main/resources/fr/inra/po2vocabmanager/view/dataView/ProjectOverview.fxml +++ b/src/main/resources/fr/inra/po2vocabmanager/view/dataView/ProjectOverview.fxml @@ -24,7 +24,7 @@ <children> <VBox spacing="5.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0"> <children> - <TitledPane text="Project" VBox.vgrow="SOMETIMES"> + <TitledPane text="Project" VBox.vgrow="ALWAYS"> <content> <GridPane hgap="5.0" vgap="5.0"> <columnConstraints> @@ -47,7 +47,7 @@ <VBox prefHeight="200.0" prefWidth="100.0" GridPane.rowIndex="1"> <children> <Label text="Contact" /> - <ComboBox fx:id="contactAgent" prefWidth="10000.0" /> + <ComboBox fx:id="contactAgent" prefWidth="1000.0" /> </children> </VBox> <VBox prefHeight="200.0" prefWidth="100.0" GridPane.columnIndex="1" GridPane.rowSpan="3"> @@ -65,7 +65,7 @@ <VBox prefHeight="200.0" prefWidth="100.0" GridPane.rowIndex="2"> <children> <Label text="Funding :" /> - <ComboBox fx:id="fundingAgent" prefWidth="10000.0" /> + <ComboBox fx:id="fundingAgent" prefWidth="1000.0" /> </children> </VBox> </children> 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 64483d5969beec76d3970e0b0f727afa074ea2e2..22abf3f06ac75135318cd242bb89066bec672885 100644 --- a/src/main/resources/fr/inra/po2vocabmanager/view/dataView/StepOverview.fxml +++ b/src/main/resources/fr/inra/po2vocabmanager/view/dataView/StepOverview.fxml @@ -23,79 +23,84 @@ <?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"> <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> - <TitledPane fx:id="stepPanel" prefHeight="249.0" prefWidth="961.0" text="Step"> + <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="stepPanel" text="Step"> <content> <GridPane hgap="5.0" vgap="5.0"> - <columnConstraints> - <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" percentWidth="25.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> - <rowConstraints> - <RowConstraints minHeight="10.0" percentHeight="25.0" prefHeight="30.0" vgrow="SOMETIMES" /> - <RowConstraints minHeight="10.0" percentHeight="25.0" vgrow="SOMETIMES" /> - <RowConstraints minHeight="10.0" vgrow="SOMETIMES" /> - <RowConstraints minHeight="10.0" vgrow="SOMETIMES" /> - </rowConstraints> + <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" percentWidth="25.0" prefWidth="100.0" /> + </columnConstraints> + <rowConstraints> + <RowConstraints maxHeight="40.0" minHeight="40.0" prefHeight="40.0" vgrow="SOMETIMES" /> + <RowConstraints maxHeight="40.0" minHeight="40.0" prefHeight="40.0" vgrow="SOMETIMES" /> + <RowConstraints maxHeight="40.0" minHeight="40.0" prefHeight="40.0" vgrow="SOMETIMES" /> + <RowConstraints maxHeight="40.0" minHeight="40.0" prefHeight="40.0" vgrow="SOMETIMES" /> + </rowConstraints> <children> - <VBox GridPane.columnIndex="0" GridPane.columnSpan="2"> - <children> - <Label prefWidth="300.0" text="Step type :"> - <VBox.margin> - <Insets /> - </VBox.margin> - </Label> - <TextField fx:id="stepTitle" prefWidth="400.0"> + <VBox prefHeight="200.0" prefWidth="100.0" GridPane.columnIndex="0" GridPane.columnSpan="2"> + <children> + <Label prefWidth="300.0" text="Step type :"> + <VBox.margin> + <Insets /> + </VBox.margin> + </Label> + <TextField fx:id="stepTitle" prefWidth="400.0"> - </TextField> - </children> - </VBox> - <VBox GridPane.columnIndex="2" GridPane.columnSpan="2"> - <children> - <Label fx:id="stepIdLabel" contentDisplay="RIGHT" prefWidth="300.0" text="Step name :" /> - <TextField fx:id="stepID" prefWidth="400.0" /> - </children> - </VBox> - <VBox GridPane.rowIndex="1"> + </TextField> + </children> + </VBox> + <VBox prefHeight="200.0" prefWidth="100.0" GridPane.columnIndex="2" GridPane.columnSpan="2"> + <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"> <children> <Label prefHeight="30.0" text="Start date (YYYY-MM-DD) :" /> <TextField fx:id="date" /> </children> </VBox> - <VBox GridPane.rowIndex="2"> + <VBox prefHeight="200.0" prefWidth="100.0" GridPane.rowIndex="2"> <children> <Label prefHeight="30.0" text="Start time (hh:mm:ss) :" /> <TextField fx:id="time" /> </children> </VBox> - <VBox GridPane.rowIndex="3"> + <VBox prefHeight="200.0" prefWidth="100.0" GridPane.rowIndex="3"> <children> <Label prefHeight="30.0" text="Time duration (hh:mm:ss) :" /> <TextField fx:id="duree" /> </children> </VBox> - <VBox GridPane.columnIndex="2" GridPane.columnSpan="2" GridPane.rowIndex="1" GridPane.rowSpan="3"> + <VBox prefHeight="200.0" prefWidth="100.0" GridPane.columnIndex="2" GridPane.columnSpan="2" GridPane.rowIndex="1" GridPane.rowSpan="3"> <children> <Label text="Description :" /> <TextArea fx:id="description" /> </children> </VBox> - <VBox GridPane.columnIndex="1" GridPane.rowIndex="1"> + <VBox maxWidth="200.0" prefHeight="100.0" GridPane.columnIndex="1" GridPane.rowIndex="1"> <children> <Label text="Organization / Agent :" /> - <ComboBox fx:id="orgAgent" /> + <ComboBox fx:id="orgAgent" prefWidth="1000.0" /> + </children> + </VBox> + <VBox prefHeight="200.0" prefWidth="100.0" GridPane.columnIndex="1" GridPane.rowIndex="2"> + <children> + <Label text="Scale :" /> + <TextField fx:id="scale" /> </children> </VBox> - <VBox GridPane.rowIndex="1" /> </children> </GridPane> </content> - </TitledPane> - </children> - </VBox> + </TitledPane> + </children> + </VBox> </content> </ScrollPane>