Package org.netbeans.jemmy

Examples of org.netbeans.jemmy.ComponentChooser


    /**
     * Waits for a file to be displayed in the file list.
     * @param fileName a file to wait.
     */
    public void waitFileDisplayed(final String fileName) {
  waitState(new ComponentChooser() {
    public boolean checkComponent(Component comp) {
        return(checkFileDisplayed(fileName));
    }
    public String getDescription() {
        return("\"" + fileName + "\"file to be displayed");
View Full Code Here


    }


    private JComboBox getCombo(int index) {
  return((JComboBox)innerSearcher.
         findComponent(new ComponentChooser() {
           public boolean checkComponent(Component comp) {
         return(comp != null &&
                                  comp instanceof JComboBox);
           }
           public String getDescription() {
View Full Code Here

       }, index));
    }

    private JButton getNoTextButton(int index) {
  return((JButton)innerSearcher.
         findComponent(new ComponentChooser() {
           public boolean checkComponent(Component comp) {
         return(comp != null &&
                                  comp instanceof JButton &&
          !(comp.getParent() instanceof JComboBox) &&
                                  (((JButton)comp).getText() == null ||
View Full Code Here

       }, index));
    }

    private JToggleButton getToggleButton(int index) {
  return((JToggleButton)innerSearcher.
         findComponent(new ComponentChooser() {
           public boolean checkComponent(Component comp) {
         return(comp != null &&
                                  comp instanceof JToggleButton);
           }
           public String getDescription() {
View Full Code Here

  getOutput().printLine("Wait \"" + text + "\" text starting from " +
            Integer.toString(position) + " position in component \n    : "+
            toStringSource());
  getOutput().printGolden("Wait \"" + text + "\" text starting from " +
        Integer.toString(position) + " position");
  waitState(new ComponentChooser() {
    public boolean checkComponent(Component comp) {
        String alltext = getDisplayedText();
        if(position >= 0) {
      if(position + text.length() <= alltext.length()) {
          return(alltext.substring(position, position + text.length()).
View Full Code Here

  getOutput().printLine("Wait caret to be at \"" + Integer.toString(position) +
            " position in component \n    : "+
            toStringSource());
  getOutput().printGolden("Wait caret to be at \"" + Integer.toString(position) +
        " position");
  waitState(new ComponentChooser() {
    public boolean checkComponent(Component comp) {
        return(getCaretPosition() == position);
    }
    public String getDescription() {
        return("Has caret at " + Integer.toString(position) + " position");
View Full Code Here

  getOutput().printLine("Wait items to be " +
            (selected ? "" : "un") + "selected in component \n    : "+
            toStringSource());
  getOutput().printGolden("Wait items to be " +
        (selected ? "" : "un") + "selected");
  waitState(new ComponentChooser() {
    public boolean checkComponent(Component comp) {
                    int[] indices = getSelectedIndexes();
                    for(int i = 0; i < indices.length; i++) {
                        if(indices[i] < from ||
                           indices[i] > to) {
View Full Code Here

    /**
     * Searches divider inside split pane.
     * @return an operator for the divider.
     */
    public BasicSplitPaneDivider findDivider() {
  return((BasicSplitPaneDivider)waitSubComponent(new ComponentChooser() {
    public boolean checkComponent(Component comp) {
        return(comp instanceof BasicSplitPaneDivider);
    }
    public String getDescription() {
        return("");
View Full Code Here

    public ContainerOperator getWindowContainerOperator() {
        Component resultComp;
        if(getSource() instanceof Window) {
            resultComp = getSource();
        } else {
            resultComp = getContainer(new ComponentChooser() {
                    public boolean checkComponent(Component comp) {
                        return(comp instanceof Window ||
                               comp instanceof JInternalFrame);
                    }
                    public String getDescription() {
View Full Code Here

    }

    class JToolTipWindowFinder implements ComponentChooser {
        ComponentChooser ppFinder;
  public JToolTipWindowFinder() {
            ppFinder = new ComponentChooser() {
                    public boolean checkComponent(Component comp) {
                        return(comp.isShowing() &&
                               comp.isVisible() &&
                               comp instanceof JToolTip);
                    }
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.