diff options
Diffstat (limited to 'src/jcgp/gui/settings/parameters/GUIIntegerParameter.java')
-rw-r--r-- | src/jcgp/gui/settings/parameters/GUIIntegerParameter.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/jcgp/gui/settings/parameters/GUIIntegerParameter.java b/src/jcgp/gui/settings/parameters/GUIIntegerParameter.java index d36c1b3..bcfbe50 100644 --- a/src/jcgp/gui/settings/parameters/GUIIntegerParameter.java +++ b/src/jcgp/gui/settings/parameters/GUIIntegerParameter.java @@ -7,6 +7,7 @@ import javafx.scene.control.Control; import javafx.scene.control.TextField; import jcgp.backend.parameters.IntegerParameter; import jcgp.backend.parameters.ParameterStatus; +import jcgp.gui.constants.Constants; import jcgp.gui.settings.SettingsPane; /** @@ -35,7 +36,7 @@ public class GUIIntegerParameter extends GUIParameter<Number> { protected Control makeControl() { // this uses a text field textField = new TextField(String.valueOf(parameter.get())); - textField.setStyle(VALID_PARAMETER_STYLE); + textField.setStyle(Constants.VALID_PARAMETER_STYLE); textField.setAlignment(Pos.CENTER_RIGHT); textField.prefWidthProperty().bind(widthProperty().divide(2)); @@ -83,16 +84,16 @@ public class GUIIntegerParameter extends GUIParameter<Number> { protected void setValidityStyle() { // update the Control's style and tooltip based on the status of the parameter if (parameter.getStatus() == ParameterStatus.INVALID) { - textField.setStyle(BASE_TEXT_STYLE + INVALID_PARAMETER_STYLE); + textField.setStyle(Constants.BASE_TEXT_STYLE + Constants.INVALID_PARAMETER_STYLE); textField.setTooltip(tooltip); tooltip.setText(parameter.getStatus().getDetails()); } else if (parameter.getStatus() == ParameterStatus.WARNING || parameter.getStatus() == ParameterStatus.WARNING_RESET) { - textField.setStyle(BASE_TEXT_STYLE + WARNING_PARAMETER_STYLE); + textField.setStyle(Constants.BASE_TEXT_STYLE + Constants.WARNING_PARAMETER_STYLE); textField.setTooltip(tooltip); tooltip.setText(parameter.getStatus().getDetails()); } else { - textField.setStyle(BASE_TEXT_STYLE + VALID_PARAMETER_STYLE); + textField.setStyle(Constants.BASE_TEXT_STYLE + Constants.VALID_PARAMETER_STYLE); textField.setTooltip(null); } } |