Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.eclipse.swtbot.swt.finder.widgets
Class SWTBotMenu

    java.lang.Object
      org.eclipse.swtbot.swt.finder.widgets.AbstractSWTBot<MenuItem>
          org.eclipse.swtbot.swt.finder.widgets.SWTBotMenu

    public class SWTBotMenu

extends AbstractSWTBot<MenuItem>

Version:
  $Id$
Author:
  Ketan Padegaonkar <KetanPadegaonkar [at] gmail [dot] com>

Field Summary

Fields inherited from class org.eclipse.swtbot.swt.finder.widgets.AbstractSWTBot
`description, display, log, widget`

Constructor Summary
`SWTBotMenu(MenuItem w)`
`SWTBotMenu(MenuItem w, SelfDescribing description)`

Method Summary
`SWTBotMenu` | `click()` Clicks on the menu item
`boolean` | `isChecked()` Gets if this menu item is checked.
`boolean` | `isEnabled()` Gets if the object's widget is enabled.
`SWTBotMenu` | `menu(String menuName)` Gets the menu matching the given name.

Methods inherited from class org.eclipse.swtbot.swt.finder.widgets.AbstractSWTBot
`absoluteLocation, assertEnabled, asyncExec, backgroundColor, click, clickXY, contextMenu, contextMenu, createEvent, createMouseEvent, createSelectionEvent, doubleClickXY, foregroundColor, getId, getText, getToolTipText, hasStyle, isActive, isEnabledInternal, isVisible, keyboard, notify, notify, notify, pressShortcut, pressShortcut, pressShortcut, rightClick, rightClick, setFocus, sleep, syncExec, syncExec, syncExec, syncExec, syncExec, syncExec, syncExec, syncExec, toString, traverse, waitForEnabled`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### SWTBotMenu

    public SWTBotMenu(MenuItem w,
                      SelfDescribing description)
               throws WidgetNotFoundException

Parameters:
  `w` - the widget.
  `description` - the description of the widget, this will be reported by `AbstractSWTBot.toString()`
Throws:
  `WidgetNotFoundException` - if the widget is `null` or widget has been disposed.

### SWTBotMenu

    public SWTBotMenu(MenuItem w)
               throws WidgetNotFoundException

Parameters:
  `w` - the widget.
Throws:
  `WidgetNotFoundException` - if the widget is `null` or widget has been disposed.

Method Detail

### click

    public SWTBotMenu click()

  Clicks on the menu item

  Overrides:
    `click` in class `AbstractSWTBot<MenuItem>`
  Returns:
    itself.

### menu

    public SWTBotMenu menu(String menuName)
                    throws WidgetNotFoundException

  Gets the menu matching the given name.

  Parameters:
    `menuName` - the name of the menu item that is to be found
  Returns:
    the first menu that matches the menuName
  Throws:
    `WidgetNotFoundException` - if the widget is not found.

### isEnabled

    public boolean isEnabled()

  Description copied from class: `AbstractSWTBot`
  Gets if the object's widget is enabled.

  Overrides:
    `isEnabled` in class `AbstractSWTBot<MenuItem>`
  Returns:
    `true` if the widget is enabled.
  See Also:
    `Control.isEnabled()`

### isChecked

    public boolean isChecked()

  Gets if this menu item is checked.

  Returns:
    `true` if the menu is checked, `false` otherwise.
  Since:
    1.2
  See Also:
    `MenuItem.getSelection()`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD