Package org.netbeans.jemmy

Examples of org.netbeans.jemmy.ComponentChooser


    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


    /**
     * 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

  output.printLine("Wait \"" + value +
       "\" value in progressbar\n    : " +
       toStringSource());
  output.printGolden("Wait \"" + value +
       "\" value in progressbar");
  waitState(new ComponentChooser() {
    public boolean checkComponent(Component comp) {
        return(((JProgressBar)comp).getValue() >= value);
    }
    public String getDescription() {
        return("greater then " + Integer.toString(value));
View Full Code Here

  output.printLine("Wait \"" + value +
       "\" string in progressbar\n    : " +
       toStringSource());
  output.printGolden("Wait \"" + value +
       "\" string in progressbar");
  waitState(new ComponentChooser() {
    public boolean checkComponent(Component comp) {
        return(getComparator().equals(((JProgressBar)comp).getString(), value));
    }
    public String getDescription() {
        return("'" + value + "' string");
View Full Code Here

            " state \n    : "+
            toStringSource());
  getOutput().printGolden("Wait frame to have " +
                                Integer.toString(state) +
                                " state");
  waitState(new ComponentChooser() {
    public boolean checkComponent(Component comp) {
                    return(((Frame)comp).getState() == state);
    }
    public String getDescription() {
        return(Integer.toString(state) + " state");
View Full Code Here

     * Searhs for modal dialog currently staying on top.
     * @return dialog or null if no modal dialog is currently
     * displayed.
     */
    public static Dialog getTopModalDialog() {
  return(DialogWaiter.getDialog(new ComponentChooser() {
    public boolean checkComponent(Component comp) {
        if(comp instanceof Dialog) {
      Dialog dialog = (Dialog)comp;
      if(dialog.isModal()) {
          Window[] ow = dialog.getOwnedWindows();
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

  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

     * Returns cancel button.
     * @return a cancel button.
     */
    public JButton getCancelButton() {
  return((JButton)innerSearcher.
         findComponent(new ComponentChooser() {
           public boolean checkComponent(Component comp) {
         return(comp != null &&
                                  comp instanceof JButton &&
                                  comp.getParent() != null &&
          !(comp.getParent() instanceof JComboBox) &&
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.