Examples of SWTBotToolbarButton


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

   * @return a {@link SWTBotToolbarButton} with the specified <code>inGroup</code>.
   */
  @SuppressWarnings("unchecked")
  public SWTBotToolbarButton toolbarButtonInGroup(String inGroup, int index) {
    Matcher matcher = allOf(widgetOfType(ToolItem.class), inGroup(inGroup));
    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>none</code>.
   */
  @SuppressWarnings("unchecked")
  public SWTBotToolbarButton toolbarButton(int index) {
    Matcher matcher = allOf(widgetOfType(ToolItem.class));
    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>mnemonicText</code> with the specified <code>inGroup</code>.
   */
  @SuppressWarnings("unchecked")
  public SWTBotToolbarButton toolbarButtonInGroup(String mnemonicText, String inGroup, int index) {
    Matcher matcher = allOf(widgetOfType(ToolItem.class), withMnemonic(mnemonicText), inGroup(inGroup));
    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> with the specified <code>inGroup</code>.
   */
  @SuppressWarnings("unchecked")
  public SWTBotToolbarButton toolbarButtonWithTooltipInGroup(String tooltip, String inGroup, int index) {
    Matcher matcher = allOf(widgetOfType(ToolItem.class), withTooltip(tooltip), inGroup(inGroup));
    return new SWTBotToolbarButton((ToolItem) widget(matcher, index), matcher);
  }
View Full Code Here

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

   * @param tooltip The tooltip to use to find the button to return.
   * @return The toolbar button.
   * @throws WidgetNotFoundException Thrown if the widget was not found matching the given tooltip.
   */
  public SWTBotToolbarDropDownButton toolbarDropDownButton(String tooltip) throws WidgetNotFoundException {
    SWTBotToolbarButton abstractButton = toolbarButton(tooltip);
    if (abstractButton instanceof SWTBotToolbarDropDownButton)
      return (SWTBotToolbarDropDownButton) abstractButton;

    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

   * @param tooltip The tooltip to use to find the button to return.
   * @return The toolbar button.
   * @throws WidgetNotFoundException Thrown if the widget was not found matching the given tooltip.
   */
  public SWTBotToolbarRadioButton toolbarRadioButton(String tooltip) throws WidgetNotFoundException {
    SWTBotToolbarButton abstractButton = toolbarButton(tooltip);
    if (abstractButton instanceof SWTBotToolbarRadioButton)
      return (SWTBotToolbarRadioButton) abstractButton;

    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

   * @param tooltip The tooltip to use to find the button to return.
   * @return The toolbar button.
   * @throws WidgetNotFoundException Thrown if the widget was not found matching the given tooltip.
   */
  public SWTBotToolbarPushButton toolbarPushButton(String tooltip) throws WidgetNotFoundException {
    SWTBotToolbarButton abstractButton = toolbarButton(tooltip);
    if (abstractButton instanceof SWTBotToolbarPushButton)
      return (SWTBotToolbarPushButton) abstractButton;

    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

   * @param tooltip The tooltip to use to find the button to return.
   * @return The toolbar button.
   * @throws WidgetNotFoundException Thrown if the widget was not found matching the given tooltip.
   */
  public SWTBotToolbarToggleButton toolbarToggleButton(String tooltip) throws WidgetNotFoundException {
    SWTBotToolbarButton abstractButton = toolbarButton(tooltip);
    if (abstractButton instanceof SWTBotToolbarToggleButton)
      return (SWTBotToolbarToggleButton) abstractButton;

    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

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