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

java.lang.Object
  extended by org.eclipse.swtbot.swt.finder.widgets.AbstractSWTBot<CTabItem>
      extended by org.eclipse.swtbot.swt.finder.widgets.SWTBotCTabItem

public class SWTBotCTabItem
extends AbstractSWTBot<CTabItem>

Author:
Ketan Patel, 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
SWTBotCTabItem(CTabItem w)
          Constructs a new instance of this object.
SWTBotCTabItem(CTabItem w, SelfDescribing description)
          Constructs a new instance of this object.
 
Method Summary
 SWTBotCTabItem activate()
          Activates the tabItem.
 SWTBotCTabItem close()
          Closes the CTabItem.
protected  Event createEvent()
          Creates an event.
 boolean isActive()
           
 boolean isEnabled()
          Gets if the object's widget is enabled.
 SWTBotCTabItem show()
          Shows the item.
 
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

SWTBotCTabItem

public SWTBotCTabItem(CTabItem 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.

SWTBotCTabItem

public SWTBotCTabItem(CTabItem 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

show

public SWTBotCTabItem show()
Shows the item. If the item is already showing in the receiver, this method simply returns. Otherwise, the items are scrolled until the item is visible.

Returns:
This SWTBotCTabItem.

activate

public SWTBotCTabItem 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<CTabItem>
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<CTabItem>
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<CTabItem>
Returns:
true if the widget is enabled.
See Also:
Control.isEnabled()

close

public SWTBotCTabItem close()
Closes the CTabItem.

Returns:
this CTabItem.