diff options
Diffstat (limited to 'src/jcgp/gui/settings')
-rw-r--r-- | src/jcgp/gui/settings/GUIIntegerParameter.java | 23 | ||||
-rw-r--r-- | src/jcgp/gui/settings/GUIParameter.java | 13 |
2 files changed, 36 insertions, 0 deletions
diff --git a/src/jcgp/gui/settings/GUIIntegerParameter.java b/src/jcgp/gui/settings/GUIIntegerParameter.java new file mode 100644 index 0000000..2bf5480 --- /dev/null +++ b/src/jcgp/gui/settings/GUIIntegerParameter.java @@ -0,0 +1,23 @@ +package jcgp.gui.settings; + +import javafx.scene.control.TextField; +import javafx.scene.text.Text; +import jcgp.parameters.IntegerParameter; + +public class GUIIntegerParameter extends GUIParameter { + + private TextField value; + + public GUIIntegerParameter(IntegerParameter parameter) { + this.parameter = parameter; + + name = new Text(parameter.getName()); + value = new TextField(String.valueOf((int) parameter.getValue())); + + value.setDisable(parameter.isManaged()); + + getChildren().addAll(name, value); + + } + +} diff --git a/src/jcgp/gui/settings/GUIParameter.java b/src/jcgp/gui/settings/GUIParameter.java new file mode 100644 index 0000000..d084060 --- /dev/null +++ b/src/jcgp/gui/settings/GUIParameter.java @@ -0,0 +1,13 @@ +package jcgp.gui.settings; + +import javafx.scene.layout.HBox; +import javafx.scene.text.Text; +import jcgp.parameters.Parameter; + +public abstract class GUIParameter extends HBox { + + protected Parameter parameter; + + protected Text name; + +} |