Examples of SWTBotToolbarButton


Examples of org.eclipse.swtbot.swt.finder.widgets.SWTBotToolbarButton

        List<SWTBotToolbarButton> l = new ArrayList<SWTBotToolbarButton>();
        ToolItem[] items = toolbar.getItems();
        for (int i = 0; i < items.length; i++) {
          try {
            l.add(new SWTBotToolbarButton(items[i]));
          } catch (WidgetNotFoundException e) {
            log.warn("Failed to find widget " + items[i].getText(), e); //$NON-NLS-1$
          }
        }
View Full Code Here

Examples of org.eclipse.swtbot.swt.finder.widgets.SWTBotToolbarButton

   */
  public SWTBotToolbarButton toolbarButton(String tooltip) throws WidgetNotFoundException {
    List<SWTBotToolbarButton> l = getToolbarButtons();

    for (int i = 0; i < l.size(); i++) {
      SWTBotToolbarButton item = l.get(i);
      if (item.getToolTipText().equals(tooltip)) {
        return item;
      }
    }

    throw new WidgetNotFoundException("Unable to find toolitem with the given tooltip '" + tooltip + "'"); //$NON-NLS-1$ //$NON-NLS-2$
View Full Code Here

Examples of org.eclipse.swtbot.swt.finder.widgets.SWTBotToolbarButton

          return l;

        ToolItem[] items = toolbar.getItems();
        for (int i = 0; i < items.length; i++) {
          try {
            l.add(new SWTBotToolbarButton(items[i]));
          } catch (WidgetNotFoundException e) {
            log.warn("Failed to find widget " + items[i].getText(), e); //$NON-NLS-1$
          }
        }
View Full Code Here

Examples of org.eclipse.swtbot.swt.finder.widgets.SWTBotToolbarButton

   */
  public SWTBotToolbarButton toolbarButton(String tooltip) throws WidgetNotFoundException {
    List<SWTBotToolbarButton> l = getToolbarButtons();

    for (int i = 0; i < l.size(); i++) {
      SWTBotToolbarButton item = l.get(i);
      if (item.getToolTipText().equals(tooltip)) {
        return item;
      }
    }

    throw new WidgetNotFoundException("Unable to find toolitem with the given tooltip '" + tooltip + "'"); //$NON-NLS-1$ //$NON-NLS-2$
View Full Code Here

Examples of org.eclipse.swtbot.swt.finder.widgets.SWTBotToolbarButton

        //view.toolbarButton( "Refresh" ).click();
        // just a workaround till view.toolbarButton() is fixed
        Matcher matcher = allOf( widgetOfType( ToolItem.class ), withTooltip( "Refresh" ), withStyle( SWT.PUSH,
            "SWT.PUSH" ) );
        SWTBotToolbarButton button = new SWTBotToolbarButton( ( ToolItem ) new SWTWorkbenchBot().widget( matcher, 0 ),
            matcher );
        button.click();

        return view.bot().styledText().getText();
    }
View Full Code Here

Examples of org.eclipse.swtbot.swt.finder.widgets.SWTBotToolbarButton

        //view.toolbarButton( "Refresh" ).click();
        // just a workaround till view.toolbarButton() is fixed
        Matcher matcher = allOf( widgetOfType( ToolItem.class ), withTooltip( "Refresh" ), withStyle( SWT.PUSH,
            "SWT.PUSH" ) );
        SWTBotToolbarButton button = new SWTBotToolbarButton( ( ToolItem ) new SWTWorkbenchBot().widget( matcher, 0 ), matcher );
        button.click();

        return view.bot().styledText().getText();
    }
View Full Code Here

Examples of org.eclipse.swtbot.swt.finder.widgets.SWTBotToolbarButton

   * @return a {@link SWTBotToolbarButton} with the specified <code>mnemonicText</code>.
   */
  @SuppressWarnings("unchecked")
  public SWTBotToolbarButton toolbarButton(String mnemonicText, int index) {
    Matcher matcher = allOf(widgetOfType(ToolItem.class), withMnemonic(mnemonicText));
    return new SWTBotToolbarButton((ToolItem) widget(matcher, index), matcher);
  }
View Full Code Here

Examples of org.eclipse.swtbot.swt.finder.widgets.SWTBotToolbarButton

   * @return a {@link SWTBotToolbarButton} with the specified <code>tooltip</code>.
   */
  @SuppressWarnings("unchecked")
  public SWTBotToolbarButton toolbarButtonWithTooltip(String tooltip, int index) {
    Matcher matcher = allOf(widgetOfType(ToolItem.class), withTooltip(tooltip));
    return new SWTBotToolbarButton((ToolItem) widget(matcher, index), matcher);
  }
View Full Code Here

Examples of org.eclipse.swtbot.swt.finder.widgets.SWTBotToolbarButton

   * @return a {@link SWTBotToolbarButton} with the specified <code>key/value</code>.
   */
  @SuppressWarnings("unchecked")
  public SWTBotToolbarButton toolbarButtonWithId(String key, String value, int index) {
    Matcher matcher = allOf(widgetOfType(ToolItem.class), withId(key, value));
    return new SWTBotToolbarButton((ToolItem) widget(matcher, index), matcher);
  }
View Full Code Here

Examples of org.eclipse.swtbot.swt.finder.widgets.SWTBotToolbarButton

   * @return a {@link SWTBotToolbarButton} with the specified <code>value</code>.
   */
  @SuppressWarnings("unchecked")
  public SWTBotToolbarButton toolbarButtonWithId(String value, int index) {
    Matcher matcher = allOf(widgetOfType(ToolItem.class), withId(value));
    return new SWTBotToolbarButton((ToolItem) widget(matcher, index), matcher);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.