aboutsummaryrefslogtreecommitdiffstats
path: root/src/jcgp/gui/settings/testcase
diff options
context:
space:
mode:
Diffstat (limited to 'src/jcgp/gui/settings/testcase')
-rw-r--r--src/jcgp/gui/settings/testcase/TestCaseTable.java18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/jcgp/gui/settings/testcase/TestCaseTable.java b/src/jcgp/gui/settings/testcase/TestCaseTable.java
index b84f9ab..d7b2e2b 100644
--- a/src/jcgp/gui/settings/testcase/TestCaseTable.java
+++ b/src/jcgp/gui/settings/testcase/TestCaseTable.java
@@ -19,7 +19,6 @@ import jcgp.backend.modules.problem.TestCaseProblem.TestCase;
import jcgp.gui.GUI;
/**
- * Dont forget to override toString()!
*
*
* @author Eduardo Pedroni
@@ -29,17 +28,17 @@ public class TestCaseTable extends Stage {
private TableView<TestCase<Object>> table;
- public TestCaseTable(final TestCaseProblem<Object> problem, final GUI gui) {
+ public TestCaseTable(final TestCaseProblem<Object> testCaseProblem, final GUI gui) {
super();
table = new TableView<TestCase<Object>>();
- ObservableList<TestCase<Object>> testCaseList = problem.getTestCases();
+ ObservableList<TestCase<Object>> testCaseList = testCaseProblem.getTestCases();
- ArrayList<TableColumn<TestCase<Object>, String>> inputs = new ArrayList<TableColumn<TestCase<Object>, String>>(problem.getInputCount());
- ArrayList<TableColumn<TestCase<Object>, String>> outputs = new ArrayList<TableColumn<TestCase<Object>, String>>(problem.getOutputCount());
+ ArrayList<TableColumn<TestCase<Object>, String>> inputs = new ArrayList<TableColumn<TestCase<Object>, String>>(testCaseProblem.getInputCount());
+ ArrayList<TableColumn<TestCase<Object>, String>> outputs = new ArrayList<TableColumn<TestCase<Object>, String>>(testCaseProblem.getOutputCount());
TableColumn<TestCase<Object>, String> tc;
- for (int i = 0; i < problem.getInputCount(); i++) {
+ for (int i = 0; i < testCaseProblem.getInputCount(); i++) {
tc = new TableColumn<TestCase<Object>, String>("I: " + i);
inputs.add(tc);
final int index = i;
@@ -50,10 +49,10 @@ public class TestCaseTable extends Stage {
}
});
tc.setSortable(false);
- tc.prefWidthProperty().bind(table.widthProperty().divide(problem.getInputCount() + problem.getOutputCount()));
+ tc.prefWidthProperty().bind(table.widthProperty().divide(testCaseProblem.getInputCount() + testCaseProblem.getOutputCount()));
}
- for (int o = 0; o < problem.getOutputCount(); o++) {
+ for (int o = 0; o < testCaseProblem.getOutputCount(); o++) {
tc = new TableColumn<TestCase<Object>, String>("O: " + o);
outputs.add(tc);
final int index = o;
@@ -64,7 +63,7 @@ public class TestCaseTable extends Stage {
}
});
tc.setSortable(false);
- tc.prefWidthProperty().bind(table.widthProperty().divide(problem.getInputCount() + problem.getOutputCount()));
+ tc.prefWidthProperty().bind(table.widthProperty().divide(testCaseProblem.getInputCount() + testCaseProblem.getOutputCount()));
}
table.getColumns().addAll(inputs);
@@ -84,6 +83,7 @@ public class TestCaseTable extends Stage {
@Override
public void handle(WindowEvent event) {
gui.hideGeneValues();
+ table.getSelectionModel().select(null);
}
});