From efe490fec1c7a94f004b496c7c97c82083fe44ec Mon Sep 17 00:00:00 2001 From: Eduardo Pedroni Date: Mon, 21 Apr 2014 00:09:55 +0100 Subject: Tooltips are looking strange, checking on a different machine --- src/jcgp/gui/settings/testcase/TestCaseTable.java | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/jcgp/gui/settings/testcase') 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> table; - public TestCaseTable(final TestCaseProblem problem, final GUI gui) { + public TestCaseTable(final TestCaseProblem testCaseProblem, final GUI gui) { super(); table = new TableView>(); - ObservableList> testCaseList = problem.getTestCases(); + ObservableList> testCaseList = testCaseProblem.getTestCases(); - ArrayList, String>> inputs = new ArrayList, String>>(problem.getInputCount()); - ArrayList, String>> outputs = new ArrayList, String>>(problem.getOutputCount()); + ArrayList, String>> inputs = new ArrayList, String>>(testCaseProblem.getInputCount()); + ArrayList, String>> outputs = new ArrayList, String>>(testCaseProblem.getOutputCount()); TableColumn, String> tc; - for (int i = 0; i < problem.getInputCount(); i++) { + for (int i = 0; i < testCaseProblem.getInputCount(); i++) { tc = new TableColumn, 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, 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); } }); -- cgit v1.2.3