|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.eclipse.swt.widgets.Widget | +--org.eclipse.swt.widgets.Item | +--org.eclipse.swt.custom.CTabItem
Safe:
Field Summary | |
(package private) static int |
BOTTOM_MARGIN
|
(package private) Control |
control
|
private Image |
disabledImage
|
private static String |
ellipsis
|
(package private) int |
height
|
private static int |
INTERNAL_SPACING
|
(package private) static int |
LEFT_MARGIN
|
(package private) CTabFolder |
parent
|
(package private) static int |
RIGHT_MARGIN
|
(package private) String |
shortenedText
|
(package private) int |
shortenedTextWidth
|
(package private) String |
toolTipText
|
(package private) static int |
TOP_MARGIN
|
(package private) int |
width
|
(package private) int |
x
|
(package private) int |
y
|
Fields inherited from class org.eclipse.swt.widgets.Item |
|
Fields inherited from class org.eclipse.swt.widgets.Widget |
|
Constructor Summary | |
CTabItem(CTabFolder parent,
int style)
Enabled: Constructs a new instance of this class given its parent (which must be a CTabFolder ) and a style value
describing its behavior and appearance. |
|
CTabItem(CTabFolder parent,
int style,
int index)
Enabled: Constructs a new instance of this class given its parent (which must be a CTabFolder ), a style value
describing its behavior and appearance, and the index
at which to place it in the items maintained by its parent. |
Method Summary | |
private static int |
checkStyle(int style)
|
void |
dispose()
Enabled: |
Rectangle |
getBounds()
Enabled: Returns a rectangle describing the receiver's size and location relative to its parent. |
Control |
getControl()
Enabled: Gets the control that is displayed in the content are of the tab item. |
Image |
getDisabledImage()
Enabled: Get the image displayed in the tab if the tab is disabled. |
Display |
getDisplay()
Suppressed: |
CTabFolder |
getParent()
Suppressed: Returns the receiver's parent, which must be a CTabFolder . |
String |
getToolTipText()
Enabled: Returns the receiver's tool tip text, or null if it has not been set. |
(package private) void |
onPaint(GC gc,
boolean isSelected)
Paint the receiver. |
(package private) int |
preferredHeight(GC gc)
Answer the preferred height of the receiver for the GC. |
(package private) int |
preferredWidth(GC gc)
Answer the preferred width of the receiver for the GC. |
void |
setControl(Control control)
Enabled: Sets the control that is used to fill the client area of the tab folder when the user selects the tab item. |
void |
setDisabledImage(Image image)
Enabled: Sets the image that is displayed if the tab item is disabled. |
void |
setImage(Image image)
Enabled: |
void |
setText(String string)
Enabled: Set the widget text. |
void |
setToolTipText(String string)
Enabled: Sets the receiver's tool tip text to the argument, which may be null indicating that no tool tip text should be shown. |
private static String |
shortenText(GC gc,
String text,
int width)
|
Methods inherited from class org.eclipse.swt.widgets.Item |
checkSubclass, getImage, getText |
Methods inherited from class org.eclipse.swt.widgets.Widget |
addDisposeListener, addListener, checkWidget, getData, getData, getStyle, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, setData, setData, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
CTabFolder parent
int x
int y
int width
int height
String toolTipText
Control control
private Image disabledImage
static final int LEFT_MARGIN
static final int RIGHT_MARGIN
static final int TOP_MARGIN
static final int BOTTOM_MARGIN
private static final int INTERNAL_SPACING
private static final String ellipsis
String shortenedText
int shortenedTextWidth
Constructor Detail |
public CTabItem(CTabFolder parent, int style)
CTabFolder
) and a style value
describing its behavior and appearance. The item is added
to the end of the items maintained by its parent.
The style value is either one of the style constants defined in
class SWT
which is applicable to instances of this
class, or must be built by bitwise OR'ing together
(that is, using the int
"|" operator) two or more
of those SWT
style constants. The class description
lists the style constants that are applicable to the class.
Style bits are also inherited from superclasses.
parent
- a CTabFolder which will be the parent of the new instance (cannot be null)style
- the style of control to constructSWT
,
Widget.getStyle()
public CTabItem(CTabFolder parent, int style, int index)
CTabFolder
), a style value
describing its behavior and appearance, and the index
at which to place it in the items maintained by its parent.
The style value is either one of the style constants defined in
class SWT
which is applicable to instances of this
class, or must be built by bitwise OR'ing together
(that is, using the int
"|" operator) two or more
of those SWT
style constants. The class description
lists the style constants that are applicable to the class.
Style bits are also inherited from superclasses.
parent
- a CTabFolder which will be the parent of the new instance (cannot be null)style
- the style of control to constructindex
- the index to store the receiver in its parentSWT
,
Widget.getStyle()
Method Detail |
private static int checkStyle(int style)
public void dispose()
dispose
in class Widget
Widget.addDisposeListener(org.eclipse.swt.events.DisposeListener)
,
Widget.removeDisposeListener(org.eclipse.swt.events.DisposeListener)
,
Widget.checkWidget()
public Rectangle getBounds()
public Control getControl()
public Display getDisplay()
getDisplay
in class Widget
public Image getDisabledImage()
public CTabFolder getParent()
CTabFolder
.
public String getToolTipText()
void onPaint(GC gc, boolean isSelected)
private static String shortenText(GC gc, String text, int width)
int preferredHeight(GC gc)
int preferredWidth(GC gc)
public void setControl(Control control)
control
- the new control (or null)public void setImage(Image image)
setImage
in class Item
image
- the image to display on the receiver (may be null)public void setDisabledImage(Image image)
image
- the image to be displayed when the item is disabled or nullpublic void setText(String string)
This method sets the widget label. The label may include mnemonic characters but must not contain line delimiters.
setText
in class Item
string
- the new label for the widgetpublic void setToolTipText(String string)
string
- the new tool tip text (or null)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |