@Test public void select2() { SplitPane splitPaneNode = (SplitPane) getPrimaryStage().getScene().getRoot().lookup(".split-pane"); JSONArray initialValue = new JSONArray(splitPaneNode.getDividerPositions()); Platform.runLater(() -> { splitPane.marathon_select("[0.30158730158730157,0.8]"); }); new Wait("Waiting for split pane to set divider location") { @Override public boolean until() { return initialValue.getDouble(1) != new JSONArray(splitPaneNode.getDividerPositions()).getDouble(1); } }; JSONArray pa = new JSONArray(splitPaneNode.getDividerPositions()); AssertJUnit.assertEquals(0.8, pa.getDouble(1), 0.1); }
@Override public boolean marathon_select(String value) { SplitPane splitPane = (SplitPane) getComponent(); JSONArray locations = new JSONArray(value); double[] dividerLocations = new double[locations.length()]; for (int i = 0; i < locations.length(); i++) { dividerLocations[i] = locations.getDouble(i); } splitPane.setDividerPositions(dividerLocations); return true; }
JavaFXSplitPaneElement extends JavaFXElement { @Override public boolean marathon_select(String value) { SplitPane splitPane = (SplitPane) getComponent(); JSONArray locations = new JSONArray(value); double[] dividerLocations = new double[locations.length()]; for (int i = 0; i < locations.length(); i++) { dividerLocations[i] = locations.getDouble(i); } splitPane.setDividerPositions(dividerLocations); return true; } }
JavaFXSplitPaneElement extends JavaFXElement { @Override public boolean marathon_select(String value) { SplitPane splitPane = (SplitPane) getComponent(); JSONArray locations = new JSONArray(value); double[] dividerLocations = new double[locations.length()]; for (int i = 0; i < locations.length(); i++) { dividerLocations[i] = locations.getDouble(i); } splitPane.setDividerPositions(dividerLocations); return true; } JavaFXSplitPaneElement(Node component, IJavaFXAgent driver, JFXWindow window); }
JavaFXSplitPaneElement extends JavaFXElement { @Override public boolean marathon_select(String value) { SplitPane splitPane = (SplitPane) getComponent(); JSONArray locations = new JSONArray(value); double[] dividerLocations = new double[locations.length()]; for (int i = 0; i < locations.length(); i++) { dividerLocations[i] = locations.getDouble(i); } splitPane.setDividerPositions(dividerLocations); return true; } JavaFXSplitPaneElement(Node component, IJavaFXAgent driver, JFXWindow window); @Override boolean marathon_select(String value); @Override String _getText(); }
JavaFXSplitPaneElement extends JavaFXElement { @Override public boolean marathon_select(String value) { SplitPane splitPane = (SplitPane) getComponent(); JSONArray locations = new JSONArray(value); double[] dividerLocations = new double[locations.length()]; for (int i = 0; i < locations.length(); i++) { dividerLocations[i] = locations.getDouble(i); } splitPane.setDividerPositions(dividerLocations); return true; } JavaFXSplitPaneElement(Node component, IJavaFXAgent driver, JFXWindow window); @Override boolean marathon_select(String value); @Override String _getText(); static final Logger LOGGER; }