TabItem

Instances of this class represent a selectable user interface object corresponding to a tab for a page in a tab folder. <dl> <dt><b>Styles:</b></dt> <dd>(none)</dd> <dt><b>Events:</b></dt> <dd>(none)</dd> </dl> <p> IMPORTANT: This class is <em>not</em> intended to be subclassed. </p>

@see <a href="http://www.eclipse.org/swt/snippets/#tabfolder">TabFolder, TabItem snippets</a> @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>

Constructors

this
this(TabFolder parent, int style)

Constructs a new instance of this class given its parent (which must be a <code>TabFolder</code>) and a style value describing its behavior and appearance. The item is added to the end of the items maintained by its parent. <p> The style value is either one of the style constants defined in class <code>SWT</code> which is applicable to instances of this class, or must be built by <em>bitwise OR</em>'ing together (that is, using the <code>int</code> "|" operator) two or more of those <code>SWT</code> style constants. The class description lists the style constants that are applicable to the class. Style bits are also inherited from superclasses. </p>

this
this(TabFolder parent, int style, int index)

Constructs a new instance of this class given its parent (which must be a <code>TabFolder</code>), a style value describing its behavior and appearance, and the index at which to place it in the items maintained by its parent. <p> The style value is either one of the style constants defined in class <code>SWT</code> which is applicable to instances of this class, or must be built by <em>bitwise OR</em>'ing together (that is, using the <code>int</code> "|" operator) two or more of those <code>SWT</code> style constants. The class description lists the style constants that are applicable to the class. Style bits are also inherited from superclasses. </p>

Members

Functions

getBounds
Rectangle getBounds()

Returns a rectangle describing the receiver's size and location relative to its parent.

getControl
Control getControl()

Returns the control that is used to fill the client area of the tab folder when the user selects the tab item. If no control has been set, return <code>null</code>. <p> @return the control

getParent
TabFolder getParent()

Returns the receiver's parent, which must be a <code>TabFolder</code>.

getToolTipText
String getToolTipText()

Returns the receiver's tool tip text, or null if it has not been set.

setControl
void setControl(Control control)

Sets the control that is used to fill the client area of the tab folder when the user selects the tab item. <p> @param control the new control (or null)

setText
void setText(String string)

Sets the receiver's text. The string may include the mnemonic character. </p> <p> Mnemonics are indicated by an '&amp;' that causes the next character to be the mnemonic. When the user presses a key sequence that matches the mnemonic, a selection event occurs. On most platforms, the mnemonic appears underlined but may be emphasised in a platform specific manner. The mnemonic indicator character '&amp;' can be escaped by doubling it in the string, causing a single '&amp;' to be displayed. </p>

setToolTipText
void setToolTipText(String string)

Sets the receiver's tool tip text to the argument, which may be null indicating that no tool tip text should be shown.

Inherited Members

From Item

getImage
Image getImage()

Returns the receiver's image if it has one, or null if it does not.

getText
String getText()

Returns the receiver's text, which will be an empty string if it has never been set.

setImage
void setImage(Image image)

Sets the receiver's image to the argument, which may be null indicating that no image should be displayed.

setText
void setText(String string)

Sets the receiver's text.

Meta