org.eclipse.swtbot.swt.finder.widgets
Class SWTBotTabItem

java.lang.Object
  extended by org.eclipse.swtbot.swt.finder.widgets.AbstractSWTBot<TabItem>
      extended by org.eclipse.swtbot.swt.finder.widgets.SWTBotTabItem

public class SWTBotTabItem
extends AbstractSWTBot<TabItem>

Version:
$Id$
Author:
Ketan Padegaonkar <KetanPadegaonkar [at] gmail [dot] com>, Joshua Gosse <jlgosse [at] ca [dot] ibm [dot] com>

Field Summary
 
Fields inherited from class org.eclipse.swtbot.swt.finder.widgets.AbstractSWTBot
description, display, log, widget
 
Constructor Summary
SWTBotTabItem(TabItem w)
          Constructs a new instance of this object.
SWTBotTabItem(TabItem w, SelfDescribing description)
          Constructs a new instance of this object.
 
Method Summary
 SWTBotTabItem activate()
          Activates the tabItem.
protected  Event createEvent()
          Creates an event.
 boolean isActive()
           
 boolean isEnabled()
          Gets if the object's widget is enabled.
 
Methods inherited from class org.eclipse.swtbot.swt.finder.widgets.AbstractSWTBot
absoluteLocation, assertEnabled, asyncExec, backgroundColor, click, click, clickXY, contextMenu, contextMenu, createMouseEvent, createSelectionEvent, doubleClickXY, foregroundColor, getId, getText, getToolTipText, hasStyle, 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

SWTBotTabItem

public SWTBotTabItem(TabItem w)
              throws WidgetNotFoundException
Constructs a new instance of this object.

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

SWTBotTabItem

public SWTBotTabItem(TabItem w,
                     SelfDescribing description)
              throws WidgetNotFoundException
Constructs a new instance of this object.

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.
Method Detail

activate

public SWTBotTabItem activate()
                       throws TimeoutException
Activates the tabItem.

Returns:
itself.
Throws:
TimeoutException - if the tab does not activate

createEvent

protected Event createEvent()
Description copied from class: AbstractSWTBot
Creates an event.

Overrides:
createEvent in class AbstractSWTBot<TabItem>
Returns:
an event that encapsulates AbstractSWTBot.widget and AbstractSWTBot.display. Subclasses may override to set other event properties.

isActive

public boolean isActive()
Overrides:
isActive in class AbstractSWTBot<TabItem>
Returns:
true if this widget has focus.
See Also:
Display.getFocusControl()

isEnabled

public boolean isEnabled()
Description copied from class: AbstractSWTBot
Gets if the object's widget is enabled.

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