diff options
Diffstat (limited to 'src/jcgp/gui/settings')
-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(); |