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.eclipse.finder.widgets
Class SWTBotView

    java.lang.Object
      org.eclipse.swtbot.eclipse.finder.widgets.SWTBotWorkbenchPart<IViewReference>
          org.eclipse.swtbot.eclipse.finder.widgets.SWTBotView

Direct Known Subclasses:
  SWTBotGefView

    public class SWTBotView

extends SWTBotWorkbenchPart<IViewReference>

This represents the eclipse `View` item.

Version:
  $Id$
Author:
  Ketan Padegaonkar <KetanPadegaonkar [at] gmail [dot] com>, Ralf Ebert www.ralfebert.de (bug 271630)

Field Summary

Fields inherited from class org.eclipse.swtbot.eclipse.finder.widgets.SWTBotWorkbenchPart
`bot, log, partReference`

Constructor Summary
`SWTBotView(IViewReference partReference, SWTWorkbenchBot bot)` Creates an instance of a view part.
`SWTBotView(IViewReference partReference, SWTWorkbenchBot bot, SelfDescribing description)` Creates an instance of a view part.

Method Summary
`void` | `close()` Close the partReference.
`IViewReference` | `getViewReference()`
`boolean` | `isActive()`
`SWTBotViewMenu` | `menu(String label)` Gets a menu item matching the give label within the partReference menu if one exists.
`SWTBotViewMenu` | `menu(String label, int index)` Gets a menu item matching the give label within the partReference menu if one exists.
`List<SWTBotViewMenu>` | `menus()` Gets a list of all menus within the partReference.
`void` | `setFocus()` Sets focus on the current part.

Methods inherited from class org.eclipse.swtbot.eclipse.finder.widgets.SWTBotWorkbenchPart
`assertActive, bot, findWidget, findWidgets, getReference, getTitle, getToolbarButtons, getWidget, show, toolbarButton, toolbarDropDownButton, toolbarPushButton, toolbarRadioButton, toolbarToggleButton`

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

Constructor Detail

### SWTBotView

    public SWTBotView(IViewReference partReference,
                      SWTWorkbenchBot bot)

  Creates an instance of a view part.

  Parameters:
    `partReference` - the view reference representing this view.
    `bot` - the bot that's used to find controls within this view.
  Since:
    2.0

### SWTBotView

    public SWTBotView(IViewReference partReference,
                      SWTWorkbenchBot bot,
                      SelfDescribing description)

  Creates an instance of a view part.

  Parameters:
    `partReference` - the part reference.
    `bot` - the helper bot.
    `description` - the description of the workbench part.

Method Detail

### setFocus

    public void setFocus()

  Description copied from class: `SWTBotWorkbenchPart`
  Sets focus on the current part.

  Specified by:
    `setFocus` in class `SWTBotWorkbenchPart<IViewReference>`

### getViewReference

    public IViewReference getViewReference()

  Returns:
    the view reference for this view.

### isActive

    public boolean isActive()

  Specified by:
    `isActive` in class `SWTBotWorkbenchPart<IViewReference>`
  Returns:
    `true` if the part is currently active.

### close

    public void close()

  Close the partReference.

  Specified by:
    `close` in class `SWTBotWorkbenchPart<IViewReference>`

### menus

    public List<SWTBotViewMenu> menus()

  Gets a list of all menus within the partReference. This will also include sub menus.

  Returns:
    The list of menus

### menu

    public SWTBotViewMenu menu(String label)
                        throws WidgetNotFoundException

  Gets a menu item matching the give label within the partReference menu if one exists.

  Parameters:
    `label` - The label matching name in the menu.
  Returns:
    The `SWTBotMenu` item.
  Throws:
    `WidgetNotFoundException` - Thrown if the menu can not be found or if the partReference does not contain a menu.

### menu

    public SWTBotViewMenu menu(String label,
                               int index)
                        throws WidgetNotFoundException

  Gets a menu item matching the give label within the partReference menu if one exists.

  Parameters:
    `label` - The label matching name in the menu.
    `index` - The index of the menu to choose.
  Returns:
    The `SWTBotMenu` item.
  Throws:
    `WidgetNotFoundException` - Thrown if the menu can not be found or if the partReference does not contain a menu.

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