@Test public void select2() { final JideSplitPane splitPaneNode = (JideSplitPane) ComponentUtils.findComponent(JideSplitPane.class, frame); final JSONArray initialValue = new JSONArray(splitPaneNode.getDividerLocations()); driver = new JavaAgent(); final IJavaElement splitPane = driver.findElementByCssSelector("jide-split-pane"); SwingUtilities.invokeLater(new Runnable() { @Override public void run() { splitPane.marathon_select("[238,450]"); } }); new Wait("Waiting for split pane to set divider location") { @Override public boolean until() { return initialValue.getInt(1) != new JSONArray(splitPaneNode.getDividerLocations()).getInt(1); } }; JSONArray pa = new JSONArray(splitPaneNode.getDividerLocations()); AssertJUnit.assertEquals(450, pa.getInt(1)); }
@Override public boolean marathon_select(String value) { JideSplitPane splitPane = (JideSplitPane) getComponent(); JSONArray locations = new JSONArray(value); int[] dividerLocations = new int[locations.length()]; for (int i = 0; i < locations.length(); i++) { dividerLocations[i] = locations.getInt(i); } splitPane.setDividerLocations(dividerLocations); return true; }
JideSplitPaneElement extends AbstractJavaElement { @Override public boolean marathon_select(String value) { JideSplitPane splitPane = (JideSplitPane) getComponent(); JSONArray locations = new JSONArray(value); int[] dividerLocations = new int[locations.length()]; for (int i = 0; i < locations.length(); i++) { dividerLocations[i] = locations.getInt(i); } splitPane.setDividerLocations(dividerLocations); return true; } }
JideSplitPaneElement extends AbstractJavaElement { @Override public boolean marathon_select(String value) { JideSplitPane splitPane = (JideSplitPane) getComponent(); JSONArray locations = new JSONArray(value); int[] dividerLocations = new int[locations.length()]; for (int i = 0; i < locations.length(); i++) { dividerLocations[i] = locations.getInt(i); } splitPane.setDividerLocations(dividerLocations); return true; } JideSplitPaneElement(Component component, IJavaAgent driver, JWindow window); }
JideSplitPaneElement extends AbstractJavaElement { @Override public boolean marathon_select(String value) { JideSplitPane splitPane = (JideSplitPane) getComponent(); JSONArray locations = new JSONArray(value); int[] dividerLocations = new int[locations.length()]; for (int i = 0; i < locations.length(); i++) { dividerLocations[i] = locations.getInt(i); } splitPane.setDividerLocations(dividerLocations); return true; } JideSplitPaneElement(Component component, IJavaAgent driver, JWindow window); @Override boolean marathon_select(String value); @Override String getTagName(); @Override String _getText(); }
JideSplitPaneElement extends AbstractJavaElement { @Override public boolean marathon_select(String value) { JideSplitPane splitPane = (JideSplitPane) getComponent(); JSONArray locations = new JSONArray(value); int[] dividerLocations = new int[locations.length()]; for (int i = 0; i < locations.length(); i++) { dividerLocations[i] = locations.getInt(i); } splitPane.setDividerLocations(dividerLocations); return true; } JideSplitPaneElement(Component component, IJavaAgent driver, JWindow window); @Override boolean marathon_select(String value); @Override String getTagName(); @Override String _getText();  }