Package org.eclipse.swtbot.swt.finder.widgets

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


   * @throws WidgetNotFoundException if the widget is not found or is disposed.
   */
  @SuppressWarnings({"unchecked", "rawtypes"})
  public SWTBotToolbarDropDownButton toolbarDropDownButtonInGroup(String inGroup, int index) {
    Matcher matcher = allOf(widgetOfType(ToolItem.class), inGroup(inGroup), withStyle(SWT.DROP_DOWN, "SWT.DROP_DOWN"));
    return new SWTBotToolbarDropDownButton((ToolItem) widget(matcher, index), matcher);
  }
View Full Code Here


   * @throws WidgetNotFoundException if the widget is not found or is disposed.
   */
  @SuppressWarnings({"unchecked", "rawtypes"})
  public SWTBotToolbarDropDownButton toolbarDropDownButton(int index) {
    Matcher matcher = allOf(widgetOfType(ToolItem.class), withStyle(SWT.DROP_DOWN, "SWT.DROP_DOWN"));
    return new SWTBotToolbarDropDownButton((ToolItem) widget(matcher, index), matcher);
  }
View Full Code Here

   * @throws WidgetNotFoundException if the widget is not found or is disposed.
   */
  @SuppressWarnings({"unchecked", "rawtypes"})
  public SWTBotToolbarDropDownButton toolbarDropDownButtonInGroup(String mnemonicText, String inGroup, int index) {
    Matcher matcher = allOf(widgetOfType(ToolItem.class), withMnemonic(mnemonicText), inGroup(inGroup), withStyle(SWT.DROP_DOWN, "SWT.DROP_DOWN"));
    return new SWTBotToolbarDropDownButton((ToolItem) widget(matcher, index), matcher);
  }
View Full Code Here

   * @throws WidgetNotFoundException if the widget is not found or is disposed.
   */
  @SuppressWarnings({"unchecked", "rawtypes"})
  public SWTBotToolbarDropDownButton toolbarDropDownButtonWithTooltipInGroup(String tooltip, String inGroup, int index) {
    Matcher matcher = allOf(widgetOfType(ToolItem.class), withTooltip(tooltip), inGroup(inGroup), withStyle(SWT.DROP_DOWN, "SWT.DROP_DOWN"));
    return new SWTBotToolbarDropDownButton((ToolItem) widget(matcher, index), matcher);
  }
View Full Code Here

          assertSame(folderImage, showUndeleted.bot().tree()
              .getAllItems()[0].widget.getImage());
        }
      });

      SWTBotToolbarDropDownButton pathButton = showUndeleted.bot().toolbarDropDownButton();
      pathButton.menuItem(UIText.NonDeletedFilesTree_FileSystemPathsButton).click();
      // see http://www.eclipse.org/forums/index.php/t/159133/ why we need this
      pathButton.pressShortcut(KeyStroke.getInstance("ESC"));
      // fs path
      IPath path = new Path(lookupRepository(repositoryFile)
          .getWorkTree().getPath()).append(PROJ1).append(FOLDER)
          .append("ToBeDeleted");
      SWTBotTreeItem[] items = showUndeleted.bot().tree().getAllItems();
      for (int i = 0; i < path.segmentCount(); i++) {
        boolean found = false;
        String segment = path.segment(i);
        for (SWTBotTreeItem item : items)
          if (item.getText().equals(segment)) {
            found = true;
            items = item.getItems();
          }
        assertTrue(found);
      }
      pathButton.menuItem(UIText.NonDeletedFilesTree_ResourcePathsButton).click();
      // see http://www.eclipse.org/forums/index.php/t/159133/ why we need this
      pathButton.pressShortcut(KeyStroke.getInstance("ESC"));
      // resource path
      assertEquals("ToBeDeleted", showUndeleted.bot().tree()
          .getAllItems()[0].getItems()[0].getItems()[0].getText());
      Display.getDefault().syncExec(new Runnable() {
        public void run() {
View Full Code Here

 
  @Test
  public void toolbarDropDownButton() throws Exception {
    SWTBotView view = bot.viewByTitle("SWTBot Test View");

    SWTBotToolbarDropDownButton button = view.toolbarDropDownButton("This represents a drop down IAction command.");
    assertNotNull(button);

    button.click();
    bot.button("OK").click();
  }
View Full Code Here

   * @throws WidgetNotFoundException if the widget is not found or is disposed.
   */
  @SuppressWarnings({"unchecked", "rawtypes"})
  public SWTBotToolbarDropDownButton toolbarDropDownButton(String mnemonicText, int index) {
    Matcher matcher = allOf(widgetOfType(ToolItem.class), withMnemonic(mnemonicText), withStyle(SWT.DROP_DOWN, "SWT.DROP_DOWN"));
    return new SWTBotToolbarDropDownButton((ToolItem) widget(matcher, index), matcher);
  }
View Full Code Here

   * @throws WidgetNotFoundException if the widget is not found or is disposed.
   */
  @SuppressWarnings({"unchecked", "rawtypes"})
  public SWTBotToolbarDropDownButton toolbarDropDownButtonWithTooltip(String tooltip, int index) {
    Matcher matcher = allOf(widgetOfType(ToolItem.class), withTooltip(tooltip), withStyle(SWT.DROP_DOWN, "SWT.DROP_DOWN"));
    return new SWTBotToolbarDropDownButton((ToolItem) widget(matcher, index), matcher);
  }
View Full Code Here

   * @throws WidgetNotFoundException if the widget is not found or is disposed.
   */
  @SuppressWarnings({"unchecked", "rawtypes"})
  public SWTBotToolbarDropDownButton toolbarDropDownButtonWithId(String key, String value, int index) {
    Matcher matcher = allOf(widgetOfType(ToolItem.class), withId(key, value), withStyle(SWT.DROP_DOWN, "SWT.DROP_DOWN"));
    return new SWTBotToolbarDropDownButton((ToolItem) widget(matcher, index), matcher);
  }
View Full Code Here

   * @throws WidgetNotFoundException if the widget is not found or is disposed.
   */
  @SuppressWarnings({"unchecked", "rawtypes"})
  public SWTBotToolbarDropDownButton toolbarDropDownButtonWithId(String value, int index) {
    Matcher matcher = allOf(widgetOfType(ToolItem.class), withId(value), withStyle(SWT.DROP_DOWN, "SWT.DROP_DOWN"));
    return new SWTBotToolbarDropDownButton((ToolItem) widget(matcher, index), matcher);
  }
View Full Code Here

TOP

Related Classes of org.eclipse.swtbot.swt.finder.widgets.SWTBotToolbarDropDownButton

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.