Package org.eclipse.swtbot.swt.finder.finders

Examples of org.eclipse.swtbot.swt.finder.finders.MenuFinder


    final Matcher<? extends Widget> matcher = withMnemonic(menuName);
    MenuItem menuItem = syncExec(new WidgetResult<MenuItem>() {
      public MenuItem run() {
        Menu bar = widget.getMenu();
        Matcher<MenuItem> withMnemonic = withMnemonic(menuName);
        List<MenuItem> menus = new MenuFinder().findMenus(bar, withMnemonic, true);
        if (!menus.isEmpty())
          return menus.get(0);
        return null;
      }
    });
View Full Code Here


  public String getFailureMessage() {
    return "Could not find a menu within the shell '" + shell + "' matching '" + matcher + "'"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
  }

  protected List<MenuItem> findMatches() {
    return new MenuFinder().findMenus(shell.widget, matcher, true);
  }
View Full Code Here

  public String getFailureMessage() {
    return "Could not find a menu within the shell '" + shell + "' matching '" + matcher + "'"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
  }

  protected List<MenuItem> findMatches() {
    return new MenuFinder().findMenus(shell.widget, matcher, true);
  }
View Full Code Here

  public SWTBotMenu menu(final String menuName) throws WidgetNotFoundException {
    final Matcher<? extends Widget> matcher = withMnemonic(menuName);
    MenuItem menuItem = syncExec(new WidgetResult<MenuItem>() {
      public MenuItem run() {
        Menu bar = widget.getMenu();
        List<MenuItem> menus = new MenuFinder().findMenus(bar, withMnemonic(menuName), true);
        if (!menus.isEmpty())
          return menus.get(0);
        return null;
      }
    });
View Full Code Here

  /**
   * Constructs a bot.
   */
  public SWTBot() {
    this(new ControlFinder(), new MenuFinder());
  }
View Full Code Here

   * Constructs a bot that will match the contents of the given parentWidget.
   *
   * @param parent the parent
   */
  public SWTBot(Widget parent) {
    this(new ChildrenControlFinder(parent), new MenuFinder());
  }
View Full Code Here

  /**
   * Constructs a bot.
   */
  public SWTBotFactory() {
    this(new ControlFinder(), new MenuFinder());
  }
View Full Code Here

  public String getFailureMessage() {
    return "Could not find a menu within the shell '" + shell + "' matching '" + matcher + "'"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
  }

  public boolean test() throws Exception {
    allMenuItems = new MenuFinder().findMenus(shell.widget, matcher, true);
    return !allMenuItems.isEmpty();
  }
View Full Code Here

  public SWTBotMenu menu(final String menuName) throws WidgetNotFoundException {
    final Matcher<? extends Widget> matcher = withMnemonic(menuName);
    MenuItem menuItem = syncExec(new WidgetResult<MenuItem>() {
      public MenuItem run() {
        Menu bar = widget.getMenu();
        List menus = new MenuFinder().findMenus(bar, withMnemonic(menuName), true);
        if (!menus.isEmpty())
          return (MenuItem) menus.get(0);
        return null;
      }
    });
View Full Code Here

  /**
   * Constructs a bot.
   */
  public SWTBot() {
    this(new ControlFinder(), new MenuFinder());
  }
View Full Code Here

TOP

Related Classes of org.eclipse.swtbot.swt.finder.finders.MenuFinder

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.