Package net.sf.swtbot.matcher

Examples of net.sf.swtbot.matcher.ClassMatcher


   * @return a wrapper around a Text widget matching the specified criteria.
   * @throws WidgetNotFoundException if the widget is not found.
   * @since 1.0
   */
  public SWTBotText text(String text, int index) throws WidgetNotFoundException {
    List findControls = finder.findControls(new DecoratingAndMatcher(new ClassMatcher(Text.class), new TextMatcher(text)));
    if (findControls.isEmpty())
      throw new WidgetNotFoundException("Could not find any text widget");
    return new SWTBotText((Text) findControls.get(index));
  }
View Full Code Here


   * @param index the index of the table
   * @return a wrapper around the table widget.
   * @throws WidgetNotFoundException if the widget is not found.
   */
  public SWTBotTable table(int index) throws WidgetNotFoundException {
    List findControls = finder.findControls(new ClassMatcher(Table.class));
    if (findControls.isEmpty())
      throw new WidgetNotFoundException("Could not find any table");
    return new SWTBotTable((Table) findControls.get(index));
  }
View Full Code Here

   * @param shell the shell containing a table.
   * @return a wrapper around the table widget.
   * @throws WidgetNotFoundException if the table is not found.
   */
  public SWTBotTable table(SWTBotShell shell) throws WidgetNotFoundException {
    List findControls = finder.findControls(shell.widget, new ClassMatcher(Table.class), true);
    if (findControls.isEmpty())
      throw new WidgetNotFoundException("Could not find any table");
    return new SWTBotTable((Table) findControls.get(0));
  }
View Full Code Here

   * @return a wrapper around the list widget.
   * @throws WidgetNotFoundException if the widget is not found.
   * @since 1.0
   */
  public SWTBotList list(int index) throws WidgetNotFoundException {
    List findControls = finder.findControls(new ClassMatcher(org.eclipse.swt.widgets.List.class));
    if (findControls.isEmpty())
      throw new WidgetNotFoundException("Could not find any table");
    return new SWTBotList((org.eclipse.swt.widgets.List) findControls.get(index));
  }
View Full Code Here

   * @return a wrapper around the tree widget.
   * @throws WidgetNotFoundException if the widget is not found.
   * @since 1.0
   */
  public SWTBotTree tree(int index) throws WidgetNotFoundException {
    List findControls = finder.findControls(new ClassMatcher(Tree.class));
    if (findControls.isEmpty())
      throw new WidgetNotFoundException("Could not find any tree");
    return new SWTBotTree((Tree) findControls.get(index));
  }
View Full Code Here

   * @return the index(th) tree
   * @throws WidgetNotFoundException if the widget is not found.
   * @since 1.2
   */
  public SWTBotExpandBar expandBar(int index) throws WidgetNotFoundException {
    List findControls = finder.findControls(new ClassMatcher(ExpandBar.class));
    if (findControls.isEmpty())
      throw new WidgetNotFoundException("Could not find any tree");
    return new SWTBotExpandBar((ExpandBar) findControls.get(index));
  }
View Full Code Here

   *
   * @param composite The composite to use.
   * @return The {@link StyledText} item.
   */
  private StyledText findEditor(final Composite composite) {
    final ClassMatcher classMatcher = new ClassMatcher(StyledText.class);
    return (StyledText) syncExec(new WidgetResult() {
      public Widget run() {
        StyledText styledText = null;
        try {
          List findControls = finder.findControls(composite, classMatcher, true);
View Full Code Here

   * @return a wrapper around a Text widget matching the specified criteria.
   * @throws WidgetNotFoundException if the widget is not found.
   * @since 1.0
   */
  public SWTBotText text(String text, int index) throws WidgetNotFoundException {
    List findControls = finder.findControls(new DecoratingAndMatcher(new ClassMatcher(Text.class), new TextMatcher(text)));
    if (findControls.isEmpty())
      throw new WidgetNotFoundException("Could not find any text widget");
    return new SWTBotText((Text) findControls.get(index));
  }
View Full Code Here

   * @param index the index of the table
   * @return a wrapper around the table widget.
   * @throws WidgetNotFoundException if the widget is not found.
   */
  public SWTBotTable table(int index) throws WidgetNotFoundException {
    List findControls = finder.findControls(new ClassMatcher(Table.class));
    if (findControls.isEmpty())
      throw new WidgetNotFoundException("Could not find any table");
    return new SWTBotTable((Table) findControls.get(index));
  }
View Full Code Here

   * @param shell the shell containing a table.
   * @return a wrapper around the table widget.
   * @throws WidgetNotFoundException if the table is not found.
   */
  public SWTBotTable table(SWTBotShell shell) throws WidgetNotFoundException {
    List findControls = finder.findControls(shell.widget, new ClassMatcher(Table.class), true);
    if (findControls.isEmpty())
      throw new WidgetNotFoundException("Could not find any table");
    return new SWTBotTable((Table) findControls.get(0));
  }
View Full Code Here

TOP

Related Classes of net.sf.swtbot.matcher.ClassMatcher

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.