|
|||||||||
| Home >> All >> org >> eclipse >> swt >> [ widgets overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.eclipse.swt.widgets
Class TreeItem

java.lang.Objectorg.eclipse.swt.widgets.Widget
org.eclipse.swt.widgets.Item
org.eclipse.swt.widgets.TreeItem
- public class TreeItem
- extends Item
Instances of this class represent a selectable user interface object that represents a hierarchy of tree items in a tree widget.
- Styles:
- (none)
- Events:
- (none)
IMPORTANT: This class is not intended to be subclassed.
| Field Summary | |
(package private) static int |
EXPANDER_EXTRA_PADDING
|
(package private) Tree |
parent
|
| Fields inherited from class org.eclipse.swt.widgets.Item |
image, text |
| Fields inherited from class org.eclipse.swt.widgets.Widget |
ACTIVATE, BUTTON_PRESS_EVENT, BUTTON_RELEASE_EVENT, CANVAS, CHANGED, CLICKED, COMMIT, CONFIGURE_EVENT, data, DEFAULT_HEIGHT, DEFAULT_WIDTH, DELETE_EVENT, DELETE_RANGE, DELETE_TEXT, DISABLED, display, DISPOSED, ENTER_NOTIFY_EVENT, EVENT, EVENT_AFTER, eventTable, EXPOSE_EVENT, FOCUS, FOCUS_IN_EVENT, FOCUS_OUT_EVENT, handle, HANDLE, HIDE, INSERT_TEXT, KEY_PRESS_EVENT, KEY_RELEASE_EVENT, KEYED_DATA, LEAVE_NOTIFY_EVENT, MAP_EVENT, MENU, MNEMONIC_ACTIVATE, MOTION_NOTIFY_EVENT, OBSCURED, POPUP_MENU, PREEDIT_CHANGED, REALIZE, ROW_ACTIVATED, SCROLL_CHILD, SELECT, SHOW, SHOW_HELP, SIZE_ALLOCATE, state, style, STYLE_SET, SWITCH_PAGE, TEST_COLLAPSE_ROW, TEST_EXPAND_ROW, TOGGLED, UNMAP_EVENT, UNREALIZE, VALUE_CHANGED, VISIBILITY_NOTIFY_EVENT, WINDOW_STATE_EVENT |
| Constructor Summary | |
TreeItem(Tree parent,
int style)
Constructs a new instance of this class given its parent (which must be a Tree or a TreeItem)
and a style value describing its behavior and appearance. |
|
TreeItem(Tree parent,
int style,
int index)
Constructs a new instance of this class given its parent (which must be a Tree or a TreeItem),
a style value describing its behavior and appearance, and the index
at which to place it in the items maintained by its parent. |
|
TreeItem(TreeItem parentItem,
int style)
Constructs a new instance of this class given its parent (which must be a Tree or a TreeItem)
and a style value describing its behavior and appearance. |
|
TreeItem(TreeItem parentItem,
int style,
int index)
Constructs a new instance of this class given its parent (which must be a Tree or a TreeItem),
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 | |
(package private) static TreeItem |
checkNull(TreeItem item)
|
org.eclipse.swt.graphics.Color |
getBackground()
Returns the receiver's background color. |
org.eclipse.swt.graphics.Rectangle |
getBounds()
Returns a rectangle describing the receiver's size and location relative to its parent. |
boolean |
getChecked()
Returns true if the receiver is checked,
and false otherwise. |
boolean |
getExpanded()
Returns true if the receiver is expanded,
and false otherwise. |
org.eclipse.swt.graphics.Font |
getFont()
Returns the font that the receiver will use to paint textual information for this item. |
org.eclipse.swt.graphics.Color |
getForeground()
Returns the foreground color that the receiver will use to draw. |
boolean |
getGrayed()
Returns true if the receiver is grayed,
and false otherwise. |
int |
getItemCount()
Returns the number of items contained in the receiver that are direct item children of the receiver. |
TreeItem[] |
getItems()
Returns an array of TreeItems which are the
direct item children of the receiver. |
Tree |
getParent()
Returns the receiver's parent, which must be a Tree. |
TreeItem |
getParentItem()
Returns the receiver's parent item, which must be a TreeItem or null when the receiver is a
root. |
(package private) void |
releaseChild()
|
(package private) void |
releaseWidget()
|
void |
setBackground(org.eclipse.swt.graphics.Color color)
Sets the receiver's background color to the color specified by the argument, or to the default system color for the item if the argument is null. |
void |
setChecked(boolean checked)
Sets the checked state of the receiver. |
void |
setExpanded(boolean expanded)
Sets the expanded state of the receiver. |
void |
setFont(org.eclipse.swt.graphics.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. |
void |
setForeground(org.eclipse.swt.graphics.Color color)
Sets the receiver's foreground color to the color specified by the argument, or to the default system color for the item if the argument is null. |
void |
setGrayed(boolean grayed)
Sets the grayed state of the receiver. |
void |
setImage(org.eclipse.swt.graphics.Image image)
Sets the receiver's image to the argument, which may be null indicating that no image should be displayed. |
void |
setText(java.lang.String string)
Sets the receiver's text. |
| Methods inherited from class org.eclipse.swt.widgets.Item |
checkSubclass, getImage, getNameText, getText |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
parent
Tree parent
EXPANDER_EXTRA_PADDING
static final int EXPANDER_EXTRA_PADDING
- See Also:
- Constant Field Values
| Constructor Detail |
TreeItem
public TreeItem(Tree parent, int style)
- Constructs a new instance of this class given its parent
(which must be a
Treeor aTreeItem) 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
SWTwhich is applicable to instances of this class, or must be built by bitwise OR'ing together (that is, using theint"|" operator) two or more of thoseSWTstyle constants. The class description lists the style constants that are applicable to the class. Style bits are also inherited from superclasses.
TreeItem
public TreeItem(Tree parent, int style, int index)
- Constructs a new instance of this class given its parent
(which must be a
Treeor aTreeItem), 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
SWTwhich is applicable to instances of this class, or must be built by bitwise OR'ing together (that is, using theint"|" operator) two or more of thoseSWTstyle constants. The class description lists the style constants that are applicable to the class. Style bits are also inherited from superclasses.
TreeItem
public TreeItem(TreeItem parentItem, int style)
- Constructs a new instance of this class given its parent
(which must be a
Treeor aTreeItem) 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
SWTwhich is applicable to instances of this class, or must be built by bitwise OR'ing together (that is, using theint"|" operator) two or more of thoseSWTstyle constants. The class description lists the style constants that are applicable to the class. Style bits are also inherited from superclasses.
TreeItem
public TreeItem(TreeItem parentItem, int style, int index)
- Constructs a new instance of this class given its parent
(which must be a
Treeor aTreeItem), 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
SWTwhich is applicable to instances of this class, or must be built by bitwise OR'ing together (that is, using theint"|" operator) two or more of thoseSWTstyle constants. The class description lists the style constants that are applicable to the class. Style bits are also inherited from superclasses.
| Method Detail |
checkNull
static TreeItem checkNull(TreeItem item)
getBackground
public org.eclipse.swt.graphics.Color getBackground()
- Returns the receiver's background color.
- Since:
- 2.0
getBounds
public org.eclipse.swt.graphics.Rectangle getBounds()
- Returns a rectangle describing the receiver's size and location
relative to its parent.
getChecked
public boolean getChecked()
- Returns
trueif the receiver is checked, and false otherwise. When the parent does not have theCHECK style, return false.
getExpanded
public boolean getExpanded()
- Returns
trueif the receiver is expanded, and false otherwise.
getFont
public org.eclipse.swt.graphics.Font getFont()
- Returns the font that the receiver will use to paint textual information for this item.
- Since:
- 3.0
getForeground
public org.eclipse.swt.graphics.Color getForeground()
- Returns the foreground color that the receiver will use to draw.
- Since:
- 2.0
getGrayed
public boolean getGrayed()
- Returns
trueif the receiver is grayed, and false otherwise. When the parent does not have theCHECK style, return false.
getItemCount
public int getItemCount()
- Returns the number of items contained in the receiver
that are direct item children of the receiver.
getItems
public TreeItem[] getItems()
- Returns an array of
TreeItems which are the direct item children of the receiver.Note: This is not the actual structure used by the receiver to maintain its list of items, so modifying the array will not affect the receiver.
getParent
public Tree getParent()
- Returns the receiver's parent, which must be a
Tree.
getParentItem
public TreeItem getParentItem()
- Returns the receiver's parent item, which must be a
TreeItemor null when the receiver is a root.
releaseChild
void releaseChild()
- Overrides:
releaseChildin classWidget
releaseWidget
void releaseWidget()
- Overrides:
releaseWidgetin classItem
setBackground
public void setBackground(org.eclipse.swt.graphics.Color color)
- Sets the receiver's background color to the color specified
by the argument, or to the default system color for the item
if the argument is null.
- Since:
- 2.0
setChecked
public void setChecked(boolean checked)
- Sets the checked state of the receiver.
setGrayed
public void setGrayed(boolean grayed)
- Sets the grayed state of the receiver.
setExpanded
public void setExpanded(boolean expanded)
- Sets the expanded state of the receiver.
setFont
public void setFont(org.eclipse.swt.graphics.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.
- Since:
- 3.0
setForeground
public void setForeground(org.eclipse.swt.graphics.Color color)
- Sets the receiver's foreground color to the color specified
by the argument, or to the default system color for the item
if the argument is null.
- Since:
- 2.0, 2.0
setImage
public void setImage(org.eclipse.swt.graphics.Image image)
- Description copied from class:
Item - Sets the receiver's image to the argument, which may be
null indicating that no image should be displayed.
setText
public void setText(java.lang.String string)
|
|||||||||
| Home >> All >> org >> eclipse >> swt >> [ widgets overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC