@Test public void getText() { List<String> text = new ArrayList<>(); Platform.runLater(() -> { splitPane.marathon_select("[0.6]"); text.add(splitPane.getAttribute("text")); }); new Wait("Waiting for split pane text") { @Override public boolean until() { return text.size() > 0; } }; AssertJUnit.assertEquals("[0.6,0.6008064516129032]", text.get(0)); }
@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; }