aboutsummaryrefslogtreecommitdiffstats
path: root/src/jcgp/gui/population/PopulationPane.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/jcgp/gui/population/PopulationPane.java')
-rw-r--r--src/jcgp/gui/population/PopulationPane.java18
1 files changed, 15 insertions, 3 deletions
diff --git a/src/jcgp/gui/population/PopulationPane.java b/src/jcgp/gui/population/PopulationPane.java
index 51b5ba4..4b1b7f8 100644
--- a/src/jcgp/gui/population/PopulationPane.java
+++ b/src/jcgp/gui/population/PopulationPane.java
@@ -27,7 +27,7 @@ public class PopulationPane extends TabPane {
Tab tab;
ChromosomePane cp;
for (int i = 0; i < jcgp.getResources().populationSize(); i++) {
- cp = new ChromosomePane(jcgp.getPopulation().get(i));
+ cp = new ChromosomePane(jcgp.getPopulation().get(i), gui, this);
tab = new Tab("Chr " + i);
tab.setContent(cp);
getTabs().add(tab);
@@ -43,13 +43,25 @@ public class PopulationPane extends TabPane {
}
}
+ public void unlockOutputs() {
+ for (int i = 0; i < getTabs().size(); i++) {
+ ((ChromosomePane) getTabs().get(i).getContent()).unlockOutputs();
+ }
+ }
+
+ public void relockOutputs() {
+ for (int i = 0; i < getTabs().size(); i++) {
+ ((ChromosomePane) getTabs().get(i).getContent()).relockOutputs();
+ }
+ }
+
public void evaluateTestCase(TestCase<Object> testCase) {
if (gui.getExperiment().getProblem() instanceof TestCaseProblem && testCase != null) {
currentTestCase = testCase;
if (testCase.getInputs().length == gui.getExperiment().getResources().inputs()) {
evaluating = true;
for (int i = 0; i < getTabs().size(); i++) {
- //((ChromosomePane) getTabs().get(i).getContent()).setInputs(testCase.getInputs());
+ ((ChromosomePane) getTabs().get(i).getContent()).setInputs(testCase.getInputs());
}
} else {
throw new IllegalArgumentException("Test case has " + testCase.getInputs().length
@@ -61,7 +73,7 @@ public class PopulationPane extends TabPane {
public void hideValues() {
evaluating = false;
for (int i = 0; i < getTabs().size(); i++) {
- //((ChromosomePane) getTabs().get(i).getContent()).updateValues();
+ ((ChromosomePane) getTabs().get(i).getContent()).updateValues();
}
}