Important Note
This class is not intended to be subclassed.
| Modifier and Type | Field and Description |
|---|---|
| pack-priv boolean | |
| pack-priv Font[] | |
| pack-priv static final int | |
| pack-priv Font | |
| pack-priv boolean | |
| pack-priv boolean | |
| pack-priv Tree | |
| pack-priv boolean | |
| pack-priv String[] | |
| pack-priv boolean |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public | |
| public | |
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv Color | |
| pack-priv Color | |
| pack-priv boolean | |
| pack-priv Color | |
| pack-priv Color | |
| pack-priv Image | |
| pack-priv String | |
| pack-priv static int | |
| pack-priv static TreeItem | |
| pack-priv static Tree | |
| protected void | checkSubclass()
Overrides org. |
| pack-priv void | |
| public void | clear(int
the index of the item to clear index, boolean true if all child items of the indexed item should be
cleared recursively, and false otherwiseClears the item at the given zero-relative index in the receiver. |
| public void | clearAll(boolean
true if all child items should be cleared
recursively, and false otherwiseClears all the items in the receiver. |
| pack-priv void | |
| public void | dispose()
Overrides org. |
| public Color | |
| public Color | Returns: the background colorthe column index index)Returns the background color at the given column index in the receiver. |
| public Rectangle | Returns: the receiver's bounding column rectanglethe index that specifies the column index)Returns a rectangle describing the receiver's size and location relative to its parent at a column in the tree. |
| public Rectangle | Returns: the bounding rectangle of the receiver's textReturns a rectangle describing the size and location of the receiver's text relative to its parent. |
| pack-priv Rectangle | |
| pack-priv Rectangle | |
| public boolean | |
| public boolean | Returns: the expanded stateReturns |
| public Font | Returns: the receiver's fontReturns the font that the receiver will use to paint textual information for this item. |
| public Font | Returns: the receiver's fontthe column index index)Returns the font that the receiver will use to paint textual information for the specified cell in this item. |
| public Color | Returns: the receiver's foreground colorReturns the foreground color that the receiver will use to draw. |
| public Color | Returns: the foreground colorthe column index index)Returns the foreground color at the given column index in the receiver. |
| public boolean | Returns: the grayed state of the checkboxReturns |
| public Image | getImage()
Overrides org. |
| public Image | Returns: the image stored at the given column index in the receiverthe column index index)Returns the image stored at the given column index in the receiver, or null if the image has not been set or if the column does not exist. |
| public Rectangle | Returns: the receiver's bounding image rectanglethe index that specifies the column index)Returns a rectangle describing the size and location relative to its parent of an image at a column in the tree. |
| pack-priv Rectangle | |
| public TreeItem | Returns: the item at the given indexthe index of the item to return index)Returns the item at the given, zero-relative index in the receiver. |
| public int | Returns: the number of itemsReturns the number of items contained in the receiver that are direct item children of the receiver. |
| public TreeItem[] | Returns: the receiver's itemsReturns a (possibly empty) array of |
| pack-priv String | |
| public Tree | |
| public TreeItem | Returns: the receiver's parent itemReturns the receiver's parent item, which must be a
|
| public String | getText()
Overrides org. |
| public String | Returns: the text stored at the given column index in the receiverthe column index index)Returns the text stored at the given column index in the receiver, or empty string if the text has not been set. |
| public Rectangle | Returns: the receiver's bounding text rectanglethe index that specifies the column index)Returns a rectangle describing the size and location relative to its parent of the text at a column in the tree. |
| pack-priv Rectangle | |
| public int | |
| pack-priv void | |
| pack-priv void | |
| pack-priv void | |
| public void | |
| public void | setBackground(Color
the new color (or null) 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. |
| public void | setBackground(int
the column index index, Color the new color (or null) color)Sets the background color at the given column index in the receiver to the color specified by the argument, or to the default system color for the item if the argument is null. |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | setForeground(Color
the new color (or null) 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. |
| public void | setForeground(int
the column index index, Color the new color (or null) color)Sets the foreground color at the given column index in the receiver to the color specified by the argument, or to the default system color for the item if the argument is null. |
| public void | setGrayed(boolean
the new grayed state of the checkbox grayed)Sets the grayed state of the checkbox for this item. |
| public void | |
| public void | setImage(Image
the image to display on the receiver (may be null) image)Overrides org. |
| public void | |
| public void | |
| public void | |
| public void | setText(String
the new text string)Overrides org. |
| public void |
| cached | back to summary |
|---|---|
| pack-priv boolean cached | |
| cellFont | back to summary |
|---|---|
| pack-priv Font[] cellFont | |
| EXPANDER_EXTRA_PADDING | back to summary |
|---|---|
| pack-priv static final int EXPANDER_EXTRA_PADDING | |
| font | back to summary |
|---|---|
| pack-priv Font font | |
| grayed | back to summary |
|---|---|
| pack-priv boolean grayed | |
| isExpanded | back to summary |
|---|---|
| pack-priv boolean isExpanded | |
| parent | back to summary |
|---|---|
| pack-priv Tree parent | |
| settingData | back to summary |
|---|---|
| pack-priv boolean settingData | |
| strings | back to summary |
|---|---|
| pack-priv String[] strings | |
| updated | back to summary |
|---|---|
| pack-priv boolean updated | |
| TreeItem | back to summary |
|---|---|
| public TreeItem(Tree parent, int style) Constructs
The fastest way to insert many items is documented in
| |
| TreeItem | back to summary |
|---|---|
| public TreeItem(Tree parent, int style, int index) Constructs The fastest way to insert many items is:
| |
| TreeItem | back to summary |
|---|---|
| public TreeItem(TreeItem parentItem, int style) Constructs
The fastest way to insert many items is documented in
| |
| TreeItem | back to summary |
|---|---|
| public TreeItem(TreeItem parentItem, int style, int index) Constructs
The fastest way to insert many items is documented in
| |
| TreeItem | back to summary |
|---|---|
| pack-priv TreeItem(Tree parent, long parentIter, int style, int index, long iter) | |
| _getBackground | back to summary |
|---|---|
| pack-priv Color _getBackground() | |
| _getBackground | back to summary |
|---|---|
| pack-priv Color _getBackground(int index) | |
| _getChecked | back to summary |
|---|---|
| pack-priv boolean _getChecked() | |
| _getForeground | back to summary |
|---|---|
| pack-priv Color _getForeground() | |
| _getForeground | back to summary |
|---|---|
| pack-priv Color _getForeground(int index) | |
| _getImage | back to summary |
|---|---|
| pack-priv Image _getImage(int index) | |
| _getText | back to summary |
|---|---|
| pack-priv String _getText(int index) | |
| checkIndex | back to summary |
|---|---|
| pack-priv static int checkIndex(int index) | |
| checkNull | back to summary |
|---|---|
| pack-priv static TreeItem checkNull(TreeItem item) | |
| checkNull | back to summary |
|---|---|
| pack-priv static Tree checkNull(Tree control) | |
| checkSubclass | back to summary |
|---|---|
| protected void checkSubclass() Overrides org. Doc from org. Checks that this class can be subclassed.
The SWT class library is intended to be subclassed
only at specific, controlled points (most notably,
Important Note By providing an implementation of this method that allows a subclass of a class which does not normally allow subclassing to be created, the implementer agrees to be fully responsible for the fact that any such subclass will likely fail between SWT releases and will be strongly platform specific. No support is provided for user-written classes which are implemented in this fashion. The ability to subclass outside of the allowed SWT classes is intended purely to enable those not on the SWT development team to implement patches in order to get around specific limitations in advance of when those limitations can be addressed by the team. Subclassing should not be attempted without an intimate and detailed understanding of the hierarchy.
| |
| clear | back to summary |
|---|---|
| pack-priv void clear() | |
| clear | back to summary |
|---|---|
| public void clear(int index, boolean all) Clears the item at the given zero-relative index in the receiver.
The text, icon and other attributes of the item are set to the default
value. If the tree was created with the
| |
| clearAll | back to summary |
|---|---|
| public void clearAll(boolean all) Clears all the items in the receiver. The text, icon and other
attributes of the items are set to their default values. If the
tree was created with the
| |
| destroyWidget | back to summary |
|---|---|
| pack-priv void destroyWidget() Overrides org.
| |
| dispose | back to summary |
|---|---|
| public void dispose() Overrides org. Doc from org. Disposes of the operating system resources associated with
the receiver and all its descendants. After this method has
been invoked, the receiver and all descendants will answer
Note This method is not called recursively on the descendants
of the receiver. This means that, widget implementers can not
detect when a widget is being disposed of by re-implementing
this method, but should instead listen for the
| |
| getBackground | back to summary |
|---|---|
| public Color getBackground() Returns the receiver's background color.
| |
| getBackground | back to summary |
|---|---|
| public Color getBackground(int index) Returns the background color at the given column index in the receiver.
| |
| getBounds | back to summary |
|---|---|
| public Rectangle getBounds(int index) Returns a rectangle describing the receiver's size and location relative to its parent at a column in the tree.
| |
| getBounds | back to summary |
|---|---|
| public Rectangle getBounds() Returns a rectangle describing the size and location of the receiver's text relative to its parent.
| |
| getBoundsInPixels | back to summary |
|---|---|
| pack-priv Rectangle getBoundsInPixels(int index) | |
| getBoundsInPixels | back to summary |
|---|---|
| pack-priv Rectangle getBoundsInPixels() | |
| getChecked | back to summary |
|---|---|
| public boolean getChecked() Returns
| |
| getExpanded | back to summary |
|---|---|
| public boolean getExpanded() Returns
| |
| getFont | back to summary |
|---|---|
| public Font getFont() Returns the font that the receiver will use to paint textual information for this item.
| |
| getFont | back to summary |
|---|---|
| public Font getFont(int index) Returns the font that the receiver will use to paint textual information for the specified cell in this item.
| |
| getForeground | back to summary |
|---|---|
| public Color getForeground() Returns the foreground color that the receiver will use to draw.
| |
| getForeground | back to summary |
|---|---|
| public Color getForeground(int index) Returns the foreground color at the given column index in the receiver.
| |
| getGrayed | back to summary |
|---|---|
| public boolean getGrayed() Returns
| |
| getImage | back to summary |
|---|---|
| public Image getImage() Overrides org. Doc from org. Returns the receiver's image if it has one, or null if it does not. | |
| getImage | back to summary |
|---|---|
| public Image getImage(int index) Returns the image stored at the given column index in the receiver, or null if the image has not been set or if the column does not exist.
| |
| getImageBounds | back to summary |
|---|---|
| public Rectangle getImageBounds(int index) Returns a rectangle describing the size and location relative to its parent of an image at a column in the tree.
| |
| getImageBoundsInPixels | back to summary |
|---|---|
| pack-priv Rectangle getImageBoundsInPixels(int index) | |
| getItem | back to summary |
|---|---|
| public TreeItem getItem(int index) Returns the item at the given, zero-relative index in the receiver. Throws an exception if the index is out of range.
| |
| getItemCount | back to summary |
|---|---|
| public int getItemCount() Returns the number of items contained in the receiver that are direct item children of the receiver.
| |
| getItems | back to summary |
|---|---|
| public TreeItem[] getItems() Returns a (possibly empty) array of 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.
| |
| getNameText | back to summary |
|---|---|
| pack-priv String getNameText() Overrides org.
| |
| getParent | back to summary |
|---|---|
| public Tree getParent() Returns the receiver's parent, which must be a
| |
| getParentItem | back to summary |
|---|---|
| public TreeItem getParentItem() Returns the receiver's parent item, which must be a
| |
| getText | back to summary |
|---|---|
| public String getText() Overrides org. Doc from org. Returns the receiver's text, which will be an empty string if it has never been set. | |
| getText | back to summary |
|---|---|
| public String getText(int index) Returns the text stored at the given column index in the receiver, or empty string if the text has not been set.
| |
| getTextBounds | back to summary |
|---|---|
| public Rectangle getTextBounds(int index) Returns a rectangle describing the size and location relative to its parent of the text at a column in the tree.
| |
| getTextBoundsInPixels | back to summary |
|---|---|
| pack-priv Rectangle getTextBoundsInPixels(int index) | |
| indexOf | back to summary |
|---|---|
| public int indexOf(TreeItem item) Searches the receiver's list starting at the first item (index 0) until an item is found that is equal to the argument, and returns the index of that item. If no item is found, returns -1.
| |
| releaseChildren | back to summary |
|---|---|
| pack-priv void releaseChildren(boolean destroy) Overrides org.
| |
| releaseHandle | back to summary |
|---|---|
| pack-priv void releaseHandle() Overrides org.
| |
| releaseWidget | back to summary |
|---|---|
| pack-priv void releaseWidget() Overrides org.
| |
| removeAll | back to summary |
|---|---|
| public void removeAll() Removes all of the items from the receiver.
| |
| setBackground | back to summary |
|---|---|
| public void setBackground(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.
| |
| setBackground | back to summary |
|---|---|
| public void setBackground(int index, Color color) Sets the background color at the given column index in the receiver to the color specified by the argument, or to the default system color for the item if the argument is null.
| |
| setChecked | back to summary |
|---|---|
| public void setChecked(boolean checked) Sets the checked state of the receiver.
| |
| setExpanded | back to summary |
|---|---|
| public void setExpanded(boolean expanded) Sets the expanded state of the receiver.
| |
| setFont | back to summary |
|---|---|
| public 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.
| |
| setFont | back to summary |
|---|---|
| public void setFont(int index, Font font) Sets the font that the receiver will use to paint textual information for the specified cell in this item to the font specified by the argument, or to the default font for that kind of control if the argument is null.
| |
| setForeground | back to summary |
|---|---|
| public void setForeground(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.
| |
| setForeground | back to summary |
|---|---|
| public void setForeground(int index, Color color) Sets the foreground color at the given column index in the receiver to the color specified by the argument, or to the default system color for the item if the argument is null.
| |
| setGrayed | back to summary |
|---|---|
| public void setGrayed(boolean grayed) Sets the grayed state of the checkbox for this item. This state change only applies if the Tree was created with the SWT.CHECK style.
| |
| setImage | back to summary |
|---|---|
| public void setImage(int index, Image image) Sets the receiver's image at a column.
| |
| setImage | back to summary |
|---|---|
| public void setImage(Image image) Overrides org. Doc from org. Sets the receiver's image to the argument, which may be null indicating that no image should be displayed. | |
| setImage | back to summary |
|---|---|
| public void setImage(Image[] images) Sets the image for multiple columns in the tree.
| |
| setItemCount | back to summary |
|---|---|
| public void setItemCount(int count) Sets the number of child items contained in the receiver. The fastest way to insert many items is:
| |
| setText | back to summary |
|---|---|
| public void setText(int index, String string) Sets the receiver's text at a column Note If control characters like '\n', '\t' etc. are used in the string, then the behavior is platform dependent.
| |
| setText | back to summary |
|---|---|
| public void setText(String string) Overrides org. Doc from org. Sets the receiver's text. Note If control characters like '\n', '\t' etc. are used in the string, then the behavior is platform dependent. | |
| setText | back to summary |
|---|---|
| public void setText(String[] strings) Sets the text for multiple columns in the tree. Note If control characters like '\n', '\t' etc. are used in the string, then the behavior is platform dependent.
| |