From 8b27ca01e8374070703a64d018197ef4e301f5e7 Mon Sep 17 00:00:00 2001 From: crissnb Date: Wed, 6 Mar 2024 13:45:47 +0100 Subject: [PATCH] variablelist fix in automaton view --- .../builder/AutomatonVariablePaneBuilder.java | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/main/java/org/gecko/view/inspector/builder/AutomatonVariablePaneBuilder.java b/src/main/java/org/gecko/view/inspector/builder/AutomatonVariablePaneBuilder.java index 80e68222..e6aaebb2 100644 --- a/src/main/java/org/gecko/view/inspector/builder/AutomatonVariablePaneBuilder.java +++ b/src/main/java/org/gecko/view/inspector/builder/AutomatonVariablePaneBuilder.java @@ -1,10 +1,14 @@ package org.gecko.view.inspector.builder; import javafx.geometry.Insets; +import javafx.scene.control.ListView; import javafx.scene.control.ScrollPane; +import javafx.scene.layout.HBox; import javafx.scene.layout.VBox; import org.gecko.actions.ActionManager; import org.gecko.model.Visibility; +import org.gecko.view.inspector.element.InspectorElement; +import org.gecko.view.inspector.element.container.InspectorVariableField; import org.gecko.view.inspector.element.container.InspectorVariableLabel; import org.gecko.view.inspector.element.list.InspectorVariableList; import org.gecko.viewmodel.SystemViewModel; @@ -12,7 +16,6 @@ public class AutomatonVariablePaneBuilder { private static final int VARIABLE_PANE_WIDTH = 320; - private static final int LIST_HEIGHT = 100; private static final int ELEMENT_SPACING = 10; private final ScrollPane scrollPane; @@ -22,14 +25,14 @@ public AutomatonVariablePaneBuilder(ActionManager actionManager, SystemViewModel scrollPane.setPrefWidth(VARIABLE_PANE_WIDTH); VBox content = new VBox(); - InspectorVariableLabel inputLabel = + InspectorElement inputLabel = new InspectorVariableLabel(actionManager, systemViewModel, Visibility.INPUT); - InspectorVariableList inputList = new InspectorVariableList(actionManager, systemViewModel, Visibility.INPUT); - InspectorVariableLabel outputLabel = + InspectorElement> inputList = + new InspectorVariableList(actionManager, systemViewModel, Visibility.INPUT); + InspectorElement outputLabel = new InspectorVariableLabel(actionManager, systemViewModel, Visibility.OUTPUT); - InspectorVariableList outputList = new InspectorVariableList(actionManager, systemViewModel, Visibility.OUTPUT); - inputList.getControl().setPrefHeight(LIST_HEIGHT); - outputList.getControl().setPrefHeight(LIST_HEIGHT); + InspectorElement> outputList = + new InspectorVariableList(actionManager, systemViewModel, Visibility.OUTPUT); content.getChildren() .addAll(inputLabel.getControl(), inputList.getControl(), outputLabel.getControl(), outputList.getControl());