Package org.netbeans.jemmy

Examples of org.netbeans.jemmy.ComponentChooser


     * Wait for a page to exist.
     * @param chooser page searching criteria
     * @return a page index.
     */
    public int waitPage(final TabPageChooser chooser) {
  waitState(new ComponentChooser() {
                public boolean checkComponent(Component comp) {
                    return(findPage(chooser) > -1);
                }
                public String getDescription() {
                    return("Tabbed with " + chooser.getDescription() + " page.");
View Full Code Here


  getOutput().printLine("Wait " + Integer.toString(pageIndex) + "'th page to be " +
            " selected in component \n    : "+
            toStringSource());
  getOutput().printGolden("Wait " + Integer.toString(pageIndex) + "'th page to be " +
        " selected");
  waitState(new ComponentChooser() {
    public boolean checkComponent(Component comp) {
        return(getSelectedIndex() == pageIndex);
    }
    public String getDescription() {
        return(Integer.toString(pageIndex) + "'th page has been selected");
View Full Code Here

    /**
     * Closes all expanded submenus.
     */
    public void closeSubmenus() {
        JMenu menu = (JMenu)findSubComponent(new ComponentChooser() {
                public boolean checkComponent(Component comp) {
                    return(comp instanceof JMenu &&
                           ((JMenu)comp).isPopupMenuVisible());
                }
                public String getDescription() {
View Full Code Here

    private void initOperators() {
  if(minButtOperator != null &&
     maxButtOperator != null) {
      return;
  }
  ComponentChooser chooser = new ComponentChooser() {
      public boolean checkComponent(Component comp) {
    return(comp instanceof JButton);
      }
      public String getDescription() {
    return("");
View Full Code Here

    /**
     * Searches JButton inside component.
     * @return JButton which is used to expand this JComboBox.
     */
    public JButton findJButton() {
  return((JButton)waitSubComponent(new ComponentChooser() {
    public boolean checkComponent(Component comp) {
        return(comp instanceof JButton);
    }
    public String getDescription() {
        return("Button for combobox popup menu opening");
View Full Code Here

    /**
     * Searches JTextField inside component.
     * @return JTextField if JComboBox is editable, null otherwise.
     */
    public JTextField findJTextField() {
  return((JTextField)waitSubComponent(new ComponentChooser() {
    public boolean checkComponent(Component comp) {
        return(comp instanceof JTextField);
    }
    public String getDescription() {
        return("ComboBox's text field");
View Full Code Here

     */
    public int waitItem(final String item, final StringComparator comparator) {
  getOutput().printLine("Wait item \"" + item + "\" available in combo box \n    : "+
            toStringSource());
  getOutput().printGolden("Wait item \"" + item + "\" available in combo box.");
  waitState(new ComponentChooser() {
    public boolean checkComponent(Component comp) {
                    return findItemIndex(item, comparator) > -1;
    }
    public String getDescription() {
                    return "Item \"" + item + "\" available in combo box.";
View Full Code Here

     */
    public int waitItem(final int itemIndex) {
  getOutput().printLine("Wait item of index \"" + itemIndex + "\" available in combo box \n    : "+
            toStringSource());
  getOutput().printGolden("Wait item of index \"" + itemIndex + "\" available in combo box.");
  waitState(new ComponentChooser() {
    public boolean checkComponent(Component comp) {
                    // given itemIndex is within size of combo box
                    return getModel().getSize() > itemIndex;
    }
    public String getDescription() {
View Full Code Here

  getOutput().printLine("Wait " + Integer.toString(index) +
            "'th item to be selected in component \n    : "+
            toStringSource());
  getOutput().printGolden("Wait " + Integer.toString(index) +
        "'th item to be selected");
  waitState(new ComponentChooser() {
    public boolean checkComponent(Component comp) {
        return(getSelectedIndex() == index);
    }
    public String getDescription() {
        return("Has " + Integer.toString(index) + "'th item selected");
View Full Code Here

    private class ListWater extends Waiter {
  ComponentChooser cChooser;
  ComponentChooser pChooser;
  public ListWater() {
      super();
      cChooser = new ComponentChooser() {
    public boolean checkComponent(Component comp) {
        if(comp instanceof JList) {
      Container cont = (Container)comp;
      while((cont = cont.getParent()) != null) {
          if(cont instanceof ComboPopup) {
View Full Code Here

TOP

Related Classes of org.netbeans.jemmy.ComponentChooser

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.