diff options
author | Eduardo Pedroni <ep625@york.ac.uk> | 2014-04-22 08:48:11 +0100 |
---|---|---|
committer | Eduardo Pedroni <ep625@york.ac.uk> | 2014-04-22 08:48:11 +0100 |
commit | 6769419bea279935c4a3a84616d45ee7d4a6345c (patch) | |
tree | 79a8c80865f0663e82eb9986f5b7c5f999e64aab /src/jcgp/gui | |
parent | efe490fec1c7a94f004b496c7c97c82083fe44ec (diff) |
Chromosome parser is buggy, need to fix that.
Diffstat (limited to 'src/jcgp/gui')
-rw-r--r-- | src/jcgp/gui/settings/SettingsPane.java | 13 | ||||
-rw-r--r-- | src/jcgp/gui/settings/parameters/GUIDoubleParameter.java | 1 | ||||
-rw-r--r-- | src/jcgp/gui/settings/parameters/GUIParameter.java | 1 |
3 files changed, 10 insertions, 5 deletions
diff --git a/src/jcgp/gui/settings/SettingsPane.java b/src/jcgp/gui/settings/SettingsPane.java index 4050a89..302e96d 100644 --- a/src/jcgp/gui/settings/SettingsPane.java +++ b/src/jcgp/gui/settings/SettingsPane.java @@ -326,12 +326,12 @@ public class SettingsPane extends AnchorPane { @Override public void handle(ActionEvent event) { FileChooser fc = new FileChooser(); - fc.setTitle("Open .chr file..."); + fc.setTitle("Load .chr file..."); fc.getExtensionFilters().add(new ExtensionFilter("CGP chromosome files", "*.chr")); fc.getExtensionFilters().add(new ExtensionFilter("All files", "*.*")); File chrFile = fc.showOpenDialog(gui.getStage()); if (chrFile != null) { - gui.getExperiment().loadChromosome(chrFile); + gui.getExperiment().loadChromosome(chrFile, 0); gui.reDraw(); } } @@ -339,7 +339,14 @@ public class SettingsPane extends AnchorPane { saveChromosome.setOnAction(new EventHandler<ActionEvent>() { @Override public void handle(ActionEvent event) { - + FileChooser fc = new FileChooser(); + fc.setTitle("Save .chr file..."); + fc.getExtensionFilters().add(new ExtensionFilter("CGP chromosome files", "*.chr")); + fc.getExtensionFilters().add(new ExtensionFilter("All files", "*.*")); + File chrFile = fc.showSaveDialog(gui.getStage()); + if (chrFile != null) { + gui.getExperiment().saveChromosome(chrFile, 0); + } } }); diff --git a/src/jcgp/gui/settings/parameters/GUIDoubleParameter.java b/src/jcgp/gui/settings/parameters/GUIDoubleParameter.java index 9a6ec4a..5331364 100644 --- a/src/jcgp/gui/settings/parameters/GUIDoubleParameter.java +++ b/src/jcgp/gui/settings/parameters/GUIDoubleParameter.java @@ -100,7 +100,6 @@ public class GUIDoubleParameter extends GUIParameter<Number> { @Override public void refreshValue() { - System.out.println("setting text to: " + parameter.get().doubleValue()); textField.setText(decimalFormat.format(parameter.get().doubleValue())); } } diff --git a/src/jcgp/gui/settings/parameters/GUIParameter.java b/src/jcgp/gui/settings/parameters/GUIParameter.java index 7dd7231..c6ac2e6 100644 --- a/src/jcgp/gui/settings/parameters/GUIParameter.java +++ b/src/jcgp/gui/settings/parameters/GUIParameter.java @@ -85,7 +85,6 @@ public abstract class GUIParameter<T> extends HBox { // the tooltip is the hover-over label containing status information, when appropriate tooltip = new Tooltip(); - tooltip.setStyle("-fx-background-color: white; -fx-border-color: black;"); tooltip.setSkin(null); valueControl = makeControl(); |