diff options
Diffstat (limited to 'src/jcgp/gui/settings/parameters/GUIParameter.java')
-rw-r--r-- | src/jcgp/gui/settings/parameters/GUIParameter.java | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/jcgp/gui/settings/parameters/GUIParameter.java b/src/jcgp/gui/settings/parameters/GUIParameter.java index 159e709..7dd7231 100644 --- a/src/jcgp/gui/settings/parameters/GUIParameter.java +++ b/src/jcgp/gui/settings/parameters/GUIParameter.java @@ -7,10 +7,9 @@ import javafx.beans.value.ChangeListener; import javafx.beans.value.ObservableValue; import javafx.geometry.Pos; import javafx.scene.control.Control; +import javafx.scene.control.Label; import javafx.scene.control.Tooltip; import javafx.scene.layout.HBox; -import javafx.scene.layout.Priority; -import javafx.scene.text.Text; import jcgp.backend.resources.parameters.BooleanParameter; import jcgp.backend.resources.parameters.DoubleParameter; import jcgp.backend.resources.parameters.IntegerParameter; @@ -46,7 +45,7 @@ public abstract class GUIParameter<T> extends HBox { public static final String WARNING_PARAMETER_STYLE = "-fx-background-color: " + GUI.NEUTRAL_SELECTION_COLOUR; public static final String VALID_PARAMETER_STYLE = "-fx-background-color: " + GUI.NEUTRAL_COLOUR; - private Text name; + private Label name; private Control valueControl; protected SettingsPane settingsPane; @@ -80,9 +79,9 @@ public abstract class GUIParameter<T> extends HBox { setAlignment(Pos.CENTER_LEFT); setSpacing(5); - name = new Text(parameter.getName()); + name = new Label(parameter.getName()); // set text width to half of the total width of the GUIParameter - name.wrappingWidthProperty().bind(widthProperty().divide(2)); + name.prefWidthProperty().bind(widthProperty().divide(2)); // the tooltip is the hover-over label containing status information, when appropriate tooltip = new Tooltip(); @@ -90,7 +89,6 @@ public abstract class GUIParameter<T> extends HBox { tooltip.setSkin(null); valueControl = makeControl(); - setHgrow(valueControl, Priority.ALWAYS); // if the parameter is a monitor, it should be permanently disabled valueControl.setDisable(parameter.isMonitor()); @@ -177,7 +175,7 @@ public abstract class GUIParameter<T> extends HBox { */ public void validate() { parameter.validate(parameter.get()); - refreshValue(); + //refreshValue(); setValidityStyle(); } |