diff options
Diffstat (limited to 'src/jcgp/gui/GUI.java')
-rw-r--r-- | src/jcgp/gui/GUI.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/jcgp/gui/GUI.java b/src/jcgp/gui/GUI.java index 79678bc..d99bfbc 100644 --- a/src/jcgp/gui/GUI.java +++ b/src/jcgp/gui/GUI.java @@ -13,7 +13,6 @@ import javafx.stage.Stage; import javafx.stage.WindowEvent; import jcgp.JCGP; import jcgp.backend.modules.problem.TestCaseProblem.TestCase; -import jcgp.backend.resources.Resources; import jcgp.gui.console.ConsolePane; import jcgp.gui.dragresize.HorizontalDragResize; import jcgp.gui.dragresize.VerticalDragResize; @@ -40,7 +39,7 @@ import jcgp.gui.settings.SettingsPane; * until it is interrupted by the main JavaFX thread. * <br> * This service also handles flushing the console in a thread safe way. This - * is done by synchronising the {@code nextGeneration()} and {@code flush()} + * is done by synchronizing the {@code nextGeneration()} and {@code flush()} * method calls on a lock object. * * @author Eduardo Pedroni @@ -70,8 +69,6 @@ public class GUI extends Application { */ private final JCGP jcgp; - public static Resources resources; - /** * Start JCGP with the user interface. @@ -90,7 +87,6 @@ public class GUI extends Application { */ public GUI() { jcgp = new JCGP(); - resources = jcgp.getResources(); functionSelector = new FunctionSelector(jcgp.getResources().getFunctionSet()); /* @@ -331,10 +327,12 @@ public class GUI extends Application { if (settingsPane.isResetRequired()) { reset(); } + populationPane.unlockOutputs(); jcgp.nextGeneration(); console.flush(); populationPane.updateGenes(); + populationPane.relockOutputs(); settingsPane.revalidateParameters(); settingsPane.updateControls(false, jcgp.isFinished()); } @@ -378,11 +376,13 @@ public class GUI extends Application { */ private void runningMode(boolean value) { if (value) { + populationPane.unlockOutputs(); if (settingsPane.isResetRequired()) { reset(); } } else { populationPane.updateGenes(); + populationPane.relockOutputs(); settingsPane.revalidateParameters(); } populationPane.setDisable(value); |