diff options
Diffstat (limited to 'src/jcgp/gui/settings/parameters')
4 files changed, 21 insertions, 19 deletions
diff --git a/src/jcgp/gui/settings/parameters/GUIBooleanParameter.java b/src/jcgp/gui/settings/parameters/GUIBooleanParameter.java index cc7113d..eb669bb 100644 --- a/src/jcgp/gui/settings/parameters/GUIBooleanParameter.java +++ b/src/jcgp/gui/settings/parameters/GUIBooleanParameter.java @@ -4,8 +4,8 @@ import javafx.beans.value.ChangeListener; import javafx.beans.value.ObservableValue; import javafx.scene.control.CheckBox; import javafx.scene.control.Control; -import jcgp.backend.resources.parameters.BooleanParameter; -import jcgp.backend.resources.parameters.ParameterStatus; +import jcgp.backend.parameters.BooleanParameter; +import jcgp.backend.parameters.ParameterStatus; import jcgp.gui.settings.SettingsPane; /** diff --git a/src/jcgp/gui/settings/parameters/GUIDoubleParameter.java b/src/jcgp/gui/settings/parameters/GUIDoubleParameter.java index 777e739..16a4cd4 100644 --- a/src/jcgp/gui/settings/parameters/GUIDoubleParameter.java +++ b/src/jcgp/gui/settings/parameters/GUIDoubleParameter.java @@ -7,8 +7,8 @@ import javafx.beans.value.ObservableValue; import javafx.geometry.Pos; import javafx.scene.control.Control; import javafx.scene.control.TextField; -import jcgp.backend.resources.parameters.Parameter; -import jcgp.backend.resources.parameters.ParameterStatus; +import jcgp.backend.parameters.Parameter; +import jcgp.backend.parameters.ParameterStatus; import jcgp.gui.settings.SettingsPane; /** diff --git a/src/jcgp/gui/settings/parameters/GUIIntegerParameter.java b/src/jcgp/gui/settings/parameters/GUIIntegerParameter.java index 6e8b3f1..e8a9183 100644 --- a/src/jcgp/gui/settings/parameters/GUIIntegerParameter.java +++ b/src/jcgp/gui/settings/parameters/GUIIntegerParameter.java @@ -5,8 +5,8 @@ import javafx.beans.value.ObservableValue; import javafx.geometry.Pos; import javafx.scene.control.Control; import javafx.scene.control.TextField; -import jcgp.backend.resources.parameters.Parameter; -import jcgp.backend.resources.parameters.ParameterStatus; +import jcgp.backend.parameters.Parameter; +import jcgp.backend.parameters.ParameterStatus; import jcgp.gui.settings.SettingsPane; /** diff --git a/src/jcgp/gui/settings/parameters/GUIParameter.java b/src/jcgp/gui/settings/parameters/GUIParameter.java index b675fb5..0a9149f 100644 --- a/src/jcgp/gui/settings/parameters/GUIParameter.java +++ b/src/jcgp/gui/settings/parameters/GUIParameter.java @@ -10,11 +10,11 @@ import javafx.scene.control.Control; import javafx.scene.control.Label; import javafx.scene.control.Tooltip; import javafx.scene.layout.HBox; -import jcgp.backend.resources.parameters.BooleanParameter; -import jcgp.backend.resources.parameters.DoubleParameter; -import jcgp.backend.resources.parameters.IntegerParameter; -import jcgp.backend.resources.parameters.Parameter; -import jcgp.backend.resources.parameters.ParameterStatus; +import jcgp.backend.parameters.BooleanParameter; +import jcgp.backend.parameters.DoubleParameter; +import jcgp.backend.parameters.IntegerParameter; +import jcgp.backend.parameters.Parameter; +import jcgp.backend.parameters.ParameterStatus; import jcgp.gui.GUI; import jcgp.gui.settings.SettingsPane; @@ -63,11 +63,13 @@ public abstract class GUIParameter<T> extends HBox { private T referenceValue; /** - * This protected constructor contains the common elements to all GUIParameters - * and should be invoked by any subclasses using super(). + * This protected template constructor contains the common elements to all + * GUIParameters and should be invoked by any subclasses using super(). It + * defers the creation of the parameter {@code Control} object to the subclass + * currently being built (which in turn is defined by the factory method). * - * @param parameter a Parameter for which to generate a GUIParameter - * @param sp a reference to the SettingsPane + * @param parameter a Parameter for which to generate a GUIParameter. + * @param sp a reference to the SettingsPane. */ protected GUIParameter(Parameter<T> parameter, final SettingsPane settingsPane) { this.parameter = parameter; @@ -78,7 +80,7 @@ public abstract class GUIParameter<T> extends HBox { setAlignment(Pos.CENTER_LEFT); setSpacing(5); - name = new Label(parameter.getName()); + name = new Label(parameter.toString()); // set text width to half of the total width of the GUIParameter name.prefWidthProperty().bind(widthProperty().divide(2)); @@ -107,9 +109,9 @@ public abstract class GUIParameter<T> extends HBox { * Use this to create an appropriate GUIParameter from any instance of Parameter, * rather than manually downcasting the Parameter object every time. * - * @param parameter a Parameter for which to generate a GUIParameter - * @param sp a reference to the SettingsPane - * @return an appropriate instance of GUIParameter + * @param parameter a Parameter for which to generate a GUIParameter. + * @param sp a reference to the SettingsPane. + * @return an appropriate instance of GUIParameter. */ public static GUIParameter<?> create(Parameter<?> parameter, SettingsPane sp) { if (parameter instanceof IntegerParameter) { |