TableTreeItem

A TableTreeItem is a selectable user interface object that represents an item in a hierarchy of items in a TableTree.

@deprecated As of 3.1 use Tree, TreeItem and TreeColumn

Constructors

this
this(TableTree parent, int style)

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

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

this
this(TableTreeItem parent, int style)

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

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

getBackground
Color getBackground()

Returns the receiver's background color.

getBounds
Rectangle getBounds(int index)

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

getChecked
bool getChecked()

Returns <code>true</code> if the receiver is checked, and false otherwise. When the parent does not have the <code>CHECK style, return false.

getExpanded
bool getExpanded()

Returns <code>true</code> if the receiver is expanded, and false otherwise. <p>

getFont
Font getFont()

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

getForeground
Color getForeground()

Returns the foreground color that the receiver will use to draw.

getGrayed
bool getGrayed()

Returns <code>true</code> if the receiver is grayed, and false otherwise. When the parent does not have the <code>CHECK</code> style, return false.

getImage
Image getImage()

Gets the first image. <p> The image in column 0 is reserved for the [+] and [-] images of the tree, therefore getImage(0) will return null.

getImage
Image getImage(int index)

Gets the image at the specified index. <p> Indexing is zero based. The image can be null. The image in column 0 is reserved for the [+] and [-] images of the tree, therefore getImage(0) will return null. Return null if the index is out of range.

getItem
TableTreeItem 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
int getItemCount()

Returns the number of items contained in the receiver that are direct item children of the receiver.

getItems
TableTreeItem[] getItems()

Returns an array of <code>TableTreeItem</code>s which are the direct item children of the receiver. <p> 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. </p>

getParent
TableTree getParent()

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

getParentItem
TableTreeItem getParentItem()

Returns the receiver's parent item, which must be a <code>TableTreeItem</code> or null when the receiver is a root.

getText
String getText(int index)

Gets the item text at the specified index. <p> Indexing is zero based.

indexOf
int indexOf(TableTreeItem item)

Gets the index of the specified item.

setBackground
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.

setChecked
void setChecked(bool checked)

Sets the checked state of the checkbox for this item. This state change only applies if the Table was created with the SWT.CHECK style.

setExpanded
void setExpanded(bool expanded)

Sets the expanded state. <p> @param expanded the new expanded state.

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.

setForeground
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.

setGrayed
void setGrayed(bool grayed)

Sets the grayed state of the checkbox for this item. This state change only applies if the Table was created with the SWT.CHECK style.

setImage
void setImage(int index, Image image)

Sets the image at an index. <p> The image can be null. The image in column 0 is reserved for the [+] and [-] images of the tree, therefore do nothing if index is 0.

setImage
void setImage(Image image)

Sets the first image. <p> The image can be null. The image in column 0 is reserved for the [+] and [-] images of the tree, therefore do nothing.

setText
void setText(int index, String text)

Sets the widget text. <p>

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