aboutsummaryrefslogtreecommitdiffstats
path: root/src/jcgp/gui/settings
diff options
context:
space:
mode:
authorEduardo Pedroni <ep625@york.ac.uk>2014-04-22 08:48:11 +0100
committerEduardo Pedroni <ep625@york.ac.uk>2014-04-22 08:48:11 +0100
commit6769419bea279935c4a3a84616d45ee7d4a6345c (patch)
tree79a8c80865f0663e82eb9986f5b7c5f999e64aab /src/jcgp/gui/settings
parentefe490fec1c7a94f004b496c7c97c82083fe44ec (diff)
Chromosome parser is buggy, need to fix that.
Diffstat (limited to 'src/jcgp/gui/settings')
-rw-r--r--src/jcgp/gui/settings/SettingsPane.java13
-rw-r--r--src/jcgp/gui/settings/parameters/GUIDoubleParameter.java1
-rw-r--r--src/jcgp/gui/settings/parameters/GUIParameter.java1
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();