From 81089149f146eff0fb62165be4a10bd127f4717e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Dervaux?= <stephane.dervaux@inrae.fr> Date: Wed, 13 Mar 2024 14:56:50 +0100 Subject: [PATCH] remove all tab for composition description in composition view --- .../view/dataView/StepOverviewController.java | 67 +------------------ 1 file changed, 1 insertion(+), 66 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 c39323b2..f726e07a 100644 --- a/src/main/java/fr/inra/po2vocabmanager/view/dataView/StepOverviewController.java +++ b/src/main/java/fr/inra/po2vocabmanager/view/dataView/StepOverviewController.java @@ -22,7 +22,6 @@ import fr.inra.po2vocabmanager.MainApp; import fr.inra.po2vocabmanager.model.DataNode; import fr.inra.po2vocabmanager.utils.UITools; import fr.inrae.po2engine.model.dataModel.CompositionFile; -import fr.inrae.po2engine.model.dataModel.ConduiteFile; import fr.inrae.po2engine.model.dataModel.StepFile; import javafx.fxml.FXML; import javafx.fxml.FXMLLoader; @@ -30,7 +29,6 @@ import javafx.geometry.Insets; import javafx.geometry.Pos; import javafx.scene.control.*; import javafx.scene.image.ImageView; -import javafx.scene.layout.BorderPane; import javafx.scene.layout.HBox; import javafx.scene.layout.Priority; import javafx.scene.layout.VBox; @@ -170,10 +168,10 @@ public class StepOverviewController { for(Map.Entry<CompositionFile, Boolean> entry : f.getCompositionFile().entrySet()) { CompositionFile compoFile = entry.getKey(); Boolean isInput = entry.getValue(); - ConduiteFile condFile = compoFile.getConduiteFile(); TitledPane mixturePane = new TitledPane(); mixturePane.setExpanded(false); + mixturePane.setCollapsible(false); ComboBox<String> comboType = new ComboBox<>(); comboType.getItems().addAll("Input", "Output"); @@ -191,8 +189,6 @@ public class StepOverviewController { Label l = new Label(" Composition --- "); l.setContentDisplay(ContentDisplay.RIGHT); - l.setGraphic(new ImageView(UITools.getImage("resources/images/help_16.png"))); - l.setTooltip(new Tooltip("list of ingredients and associated quantity for inputs and outputs of the step")); Label lc = new Label(" Composition type : "); Label ln = new Label(" Composition name : "); Label lt = new Label(" Type : "); @@ -245,67 +241,6 @@ public class StepOverviewController { bb.minWidthProperty().bind(mixturePane.widthProperty().subtract(25)); mixturePane.setGraphic(bb); - TabPane compoTabPane = new TabPane(); - compoTabPane.setMaxHeight(250.0); - - Tab tabCompo = new Tab("Composition"); - tabCompo.setClosable(false); - BorderPane bc = new BorderPane(); - FXMLLoader loadercompo = UITools.getFXMLLoader("view/dataView/MaterialMethodLinkOverview.fxml"); - SplitPane matmetCompoOverview = null; - try { - matmetCompoOverview = (SplitPane) loadercompo.load(); - } catch (IOException e) { - e.printStackTrace(); - } - MaterialMethodLinkOverviewController matmetCompoController = loadercompo.getController(); - matmetCompoController.setMainApp(this.mainApp, null); - matmetCompoOverview.setPrefHeight(130); -// bc.setTop(matmetCompoOverview); - - - TableView compoTable = new TableView(); - compoTable.setDisable(true); - tabCompo.setContent(bc); - bc.setCenter(compoTable); - compoTabPane.getTabs().add(tabCompo); - - if (compoFile != null) { - // on ajoute les consignes -// matmetCompoController.setListConsign(compoFile.getListConsign()); -// matmetCompoController.showItem(compoFile.getMaterialMethodPart()); -// matmetCompoController.showItem(compoFile.getListMaterialMethod()); - UITools.bindTable(compoFile.getContentPart().getTable(), compoTable); - } - - Tab tabConduite = new Tab("Guideline"); - tabConduite.setClosable(false); - BorderPane bco = new BorderPane(); - FXMLLoader loadercond = UITools.getFXMLLoader("view/dataView/MaterialMethodLinkOverview.fxml"); - SplitPane matmetCondOverview = null; - try { - matmetCondOverview = (SplitPane) loadercond.load(); - } catch (IOException e) { - e.printStackTrace(); - } - MaterialMethodLinkOverviewController matmetCondController = loadercond.getController(); - matmetCondController.setMainApp(this.mainApp, null); - matmetCondOverview.setPrefHeight(130); -// bco.setTop(matmetCondOverview); - - TableView condTable = new TableView(); - condTable.setDisable(true); - tabConduite.setContent(bco); - bco.setCenter(condTable); - compoTabPane.getTabs().add(tabConduite); - if (condFile != null) { -// matmetCondController.setListConsign(condFile.getListConsign()); -// matmetCondController.showItem(condFile.getListMaterialMethod()); - UITools.bindTable(condFile.getContentPart().getTable(), condTable); -// condFile.bindData(condTable); - } - - mixturePane.setContent(compoTabPane); VBox.setVgrow(mixturePane, Priority.ALWAYS); if(isInput) { boxContent.getChildren().add(2, mixturePane); -- GitLab