diff options
author | Eduardo Pedroni <ep625@york.ac.uk> | 2014-05-22 07:44:52 +0100 |
---|---|---|
committer | Eduardo Pedroni <ep625@york.ac.uk> | 2014-05-22 07:44:52 +0100 |
commit | 2b571f08d091dc062cedbb9816c29dcf0cbd4f12 (patch) | |
tree | 98505fe5fbd433eafe74a188f833b71a4627e08f /src/jcgp/gui | |
parent | 9aac9892b5c827e70c4598e0e052d10aad40a2d9 (diff) |
Final commit, will release later today.
Diffstat (limited to 'src/jcgp/gui')
-rw-r--r-- | src/jcgp/gui/console/ConsolePane.java | 1 | ||||
-rw-r--r-- | src/jcgp/gui/population/ChromosomePane.java | 11 | ||||
-rw-r--r-- | src/jcgp/gui/population/FunctionSelector.java | 8 | ||||
-rw-r--r-- | src/jcgp/gui/settings/SettingsPane.java | 16 |
4 files changed, 26 insertions, 10 deletions
diff --git a/src/jcgp/gui/console/ConsolePane.java b/src/jcgp/gui/console/ConsolePane.java index c4cfc21..1e07b7d 100644 --- a/src/jcgp/gui/console/ConsolePane.java +++ b/src/jcgp/gui/console/ConsolePane.java @@ -37,7 +37,6 @@ public class ConsolePane extends AnchorPane implements Console { public ConsolePane() { super(); textArea.setEditable(false); - /* * This nasty hack is needed because the default TextArea ContextMenu is not * in the public API, making it impossible to override it with a custom one. diff --git a/src/jcgp/gui/population/ChromosomePane.java b/src/jcgp/gui/population/ChromosomePane.java index d9154fc..1e04c37 100644 --- a/src/jcgp/gui/population/ChromosomePane.java +++ b/src/jcgp/gui/population/ChromosomePane.java @@ -12,6 +12,15 @@ import jcgp.backend.population.Node; import jcgp.backend.resources.Resources; import jcgp.gui.GUI; +/** + * This extension of {@code ScrollPane} contains a series of + * nodes, inputs and outputs spread across a grid. It also contains + * all of the connection lines overlaid over the nodes, inputs and outputs. + * + * + * @author Eduardo Pedroni + * + */ public class ChromosomePane extends ScrollPane { private GUINode[][] guiNodes; @@ -169,7 +178,7 @@ public class ChromosomePane extends ScrollPane { } /** - * @return the evaluating + * @return the evaluating attribute. */ public boolean isEvaluating() { return parent.isEvaluating(); diff --git a/src/jcgp/gui/population/FunctionSelector.java b/src/jcgp/gui/population/FunctionSelector.java index 69d0d31..0e6c6bb 100644 --- a/src/jcgp/gui/population/FunctionSelector.java +++ b/src/jcgp/gui/population/FunctionSelector.java @@ -7,6 +7,14 @@ import javafx.scene.layout.VBox; import jcgp.backend.function.FunctionSet; import jcgp.gui.GUI; +/** + * A menu class, exposes all of the allowed functions + * when called by a node, so that the node function can be changed. + * + * + * @author Eduardo Pedroni + * + */ public class FunctionSelector extends VBox { private GUINode target; diff --git a/src/jcgp/gui/settings/SettingsPane.java b/src/jcgp/gui/settings/SettingsPane.java index c0939e9..c59244b 100644 --- a/src/jcgp/gui/settings/SettingsPane.java +++ b/src/jcgp/gui/settings/SettingsPane.java @@ -157,25 +157,25 @@ public class SettingsPane extends AnchorPane { header.setFont(Font.font("Arial", 14)); header.setUnderline(true); - final ComboBox<EvolutionaryStrategy> eaCBox = new ComboBox<EvolutionaryStrategy>(); - eaCBox.getItems().addAll(jcgp.getEvolutionaryStrategies()); - eaCBox.getSelectionModel().select(jcgp.getEvolutionaryStrategy()); - eaCBox.prefWidthProperty().bind(mainContainer.widthProperty()); + final ComboBox<EvolutionaryStrategy> esCBox = new ComboBox<EvolutionaryStrategy>(); + esCBox.getItems().addAll(jcgp.getEvolutionaryStrategies()); + esCBox.getSelectionModel().select(jcgp.getEvolutionaryStrategy()); + esCBox.prefWidthProperty().bind(mainContainer.widthProperty()); final VBox eaParameters = new VBox(2); refreshParameters(jcgp.getEvolutionaryStrategy().getLocalParameters(), eaParameters); - eaCBox.setOnAction(new EventHandler<ActionEvent>() { + esCBox.setOnAction(new EventHandler<ActionEvent>() { @Override public void handle(ActionEvent event) { - jcgp.setEvolutionaryStrategy(eaCBox.getSelectionModel().getSelectedIndex()); - refreshParameters(eaCBox.getSelectionModel().getSelectedItem().getLocalParameters(), eaParameters); + jcgp.setEvolutionaryStrategy(esCBox.getSelectionModel().getSelectedIndex()); + refreshParameters(esCBox.getSelectionModel().getSelectedItem().getLocalParameters(), eaParameters); gui.flushConsole(); } }); - eaPane.getChildren().addAll(header, eaCBox, eaParameters); + eaPane.getChildren().addAll(header, esCBox, eaParameters); mainContainer.getChildren().add(eaPane); } |