CTabItem

Instances of this class represent a selectable user interface object that represent a page in a notebook widget.

<dl> <dt><b>Styles:</b></dt> <dd>SWT.CLOSE</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/#ctabfolder">CTabFolder, CTabItem snippets</a> @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>

Constructors

this
this(CTabFolder parent, int style)

Constructs a new instance of this class given its parent (which must be a <code>CTabFolder</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(CTabFolder parent, int style, int index)

Constructs a new instance of this class given its parent (which must be a <code>CTabFolder</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

dispose
void dispose()
Undocumented in source. Be warned that the author may not have intended to support it.
drawBorder
void drawBorder(GC gc, int[] shape)
Undocumented in source. Be warned that the author may not have intended to support it.
drawClose
void drawClose(GC gc)
Undocumented in source. Be warned that the author may not have intended to support it.
drawHighlight
void drawHighlight(GC gc, int rightEdge)
Undocumented in source. Be warned that the author may not have intended to support it.
drawLeftUnselectedBorder
void drawLeftUnselectedBorder(GC gc)
Undocumented in source. Be warned that the author may not have intended to support it.
drawRightUnselectedBorder
void drawRightUnselectedBorder(GC gc)
Undocumented in source. Be warned that the author may not have intended to support it.
drawSelected
void drawSelected(GC gc)
Undocumented in source. Be warned that the author may not have intended to support it.
drawUnselected
void drawUnselected(GC gc)
Undocumented in source. Be warned that the author may not have intended to support it.
getBounds
Rectangle getBounds()

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

getControl
Control getControl()

Gets the control that is displayed in the content area of the tab item.

getDisabledImage
Image getDisabledImage()

Get the image displayed in the tab if the tab is disabled.

getFont
Font getFont()

Returns the font that the receiver will use to paint textual information.

getParent
CTabFolder getParent()

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

getShowClose
bool getShowClose()

Returns <code>true</code> to indicate that the receiver's close button should be shown. Otherwise return <code>false</code>. The initial value is defined by the style (SWT.CLOSE) that was used to create the receiver.

getToolTipText
String getToolTipText()

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

isShowing
bool isShowing()

Returns <code>true</code> if the item will be rendered in the visible area of the CTabFolder. Returns false otherwise.

onPaint
void onPaint(GC gc, bool isSelected)
Undocumented in source. Be warned that the author may not have intended to support it.
preferredHeight
int preferredHeight(GC gc)
Undocumented in source. Be warned that the author may not have intended to support it.
preferredWidth
int preferredWidth(GC gc, bool isSelected, bool minimum)
Undocumented in source. Be warned that the author may not have intended to support it.
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.

setDisabledImage
void setDisabledImage(Image image)

Sets the image that is displayed if the tab item is disabled. Null will clear the image.

setFont
void setFont(Font font)

Sets the font that the receiver will use to paint textual information for this item to the font specified by the argument, or to the default font for that kind of control if the argument is null.

setImage
void setImage(Image image)
Undocumented in source. Be warned that the author may not have intended to support it.
setShowClose
void setShowClose(bool close)

Sets to <code>true</code> to indicate that the receiver's close button should be shown. If the parent (CTabFolder) was created with SWT.CLOSE style, changing this value has no effect.

setText
void setText(String string)
Undocumented in source. Be warned that the author may not have intended to support it.
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.

shortenText
String shortenText(GC gc, String text, int width)
Undocumented in source. Be warned that the author may not have intended to support it.
shortenText
String shortenText(GC gc, String text, int width, String ellipses)
Undocumented in source. Be warned that the author may not have intended to support it.
useEllipses
bool useEllipses()
Undocumented in source. Be warned that the author may not have intended to support it.

Static variables

BOTTOM_MARGIN
int BOTTOM_MARGIN;
Undocumented in source.
ELLIPSIS
String ELLIPSIS;
Undocumented in source.
FLAGS
int FLAGS;
Undocumented in source.
INTERNAL_SPACING
int INTERNAL_SPACING;
Undocumented in source.
LEFT_MARGIN
int LEFT_MARGIN;
Undocumented in source.
RIGHT_MARGIN
int RIGHT_MARGIN;
Undocumented in source.
TOP_MARGIN
int TOP_MARGIN;
Undocumented in source.

Variables

closeImageState
int closeImageState;
Undocumented in source.
closeRect
Rectangle closeRect;
Undocumented in source.
control
Control control;
Undocumented in source.
disabledImage
Image disabledImage;
Undocumented in source.
font
Font font;
height
int height;
Undocumented in source.
parent
CTabFolder parent;
Undocumented in source.
shortenedText
String shortenedText;
Undocumented in source.
shortenedTextWidth
int shortenedTextWidth;
Undocumented in source.
showClose
bool showClose;
Undocumented in source.
showing
bool showing;
Undocumented in source.
toolTipText
String toolTipText;
width
int width;
Undocumented in source.
x
int x;
y
int y;
Undocumented in source.

Inherited Members

From Item

text
String text;
Undocumented in source.
image
Image image;
Undocumented in source.
checkSubclass
void checkSubclass()
Undocumented in source. Be warned that the author may not have intended to support it.
getImage
Image getImage()

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

getNameText
String getNameText()
Undocumented in source. Be warned that the author may not have intended to support it.
getText
String getText()

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

releaseWidget
void releaseWidget()
Undocumented in source. Be warned that the author may not have intended to support it.
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