aboutsummaryrefslogtreecommitdiffstats
path: root/src/jcgp/gui/settings/parameters/GUIDoubleParameter.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/jcgp/gui/settings/parameters/GUIDoubleParameter.java')
-rw-r--r--src/jcgp/gui/settings/parameters/GUIDoubleParameter.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/jcgp/gui/settings/parameters/GUIDoubleParameter.java b/src/jcgp/gui/settings/parameters/GUIDoubleParameter.java
index 9f4ea28..feee34c 100644
--- a/src/jcgp/gui/settings/parameters/GUIDoubleParameter.java
+++ b/src/jcgp/gui/settings/parameters/GUIDoubleParameter.java
@@ -9,6 +9,7 @@ import javafx.scene.control.Control;
import javafx.scene.control.TextField;
import jcgp.backend.parameters.DoubleParameter;
import jcgp.backend.parameters.ParameterStatus;
+import jcgp.gui.constants.Constants;
import jcgp.gui.settings.SettingsPane;
/**
@@ -40,7 +41,7 @@ public class GUIDoubleParameter extends GUIParameter<Number> {
decimalFormat = new DecimalFormat();
decimalFormat.setMaximumFractionDigits(10);
textField = new TextField(decimalFormat.format(parameter.get().doubleValue()));
- textField.setStyle(VALID_PARAMETER_STYLE);
+ textField.setStyle(Constants.VALID_PARAMETER_STYLE);
textField.setAlignment(Pos.CENTER_RIGHT);
textField.prefWidthProperty().bind(widthProperty().divide(2));
return textField;
@@ -87,15 +88,15 @@ public class GUIDoubleParameter 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);
}
}