public class TableTreeItem extends Item
Modifier and Type | Field and Description |
---|---|
(package private) Color |
background
Deprecated.
|
(package private) boolean |
checked
Deprecated.
|
(package private) boolean |
expanded
Deprecated.
|
(package private) Font |
font
Deprecated.
|
(package private) Color |
foreground
Deprecated.
|
(package private) boolean |
grayed
Deprecated.
|
(package private) Image[] |
images
Deprecated.
|
(package private) TableTreeItem[] |
items
Deprecated.
|
(package private) TableTree |
parent
Deprecated.
|
(package private) TableTreeItem |
parentItem
Deprecated.
|
(package private) TableItem |
tableItem
Deprecated.
|
(package private) java.lang.String[] |
texts
Deprecated.
|
Constructor and Description |
---|
TableTreeItem(TableTree parent,
int style)
Deprecated.
Constructs a new instance of this class given its parent
(which must be a
TableTree )
and a style value describing its behavior and appearance. |
TableTreeItem(TableTree parent,
int style,
int index)
Deprecated.
Constructs a new instance of this class given its parent
(which must be a
TableTree ,
a style value describing its behavior and appearance, and the index
at which to place it in the items maintained by its parent. |
TableTreeItem(TableTreeItem parent,
int style)
Deprecated.
Constructs a new instance of this class given its parent
(which must be a
TableTreeItem )
and a style value describing its behavior and appearance. |
TableTreeItem(TableTreeItem parent,
int style,
int index)
Deprecated.
Constructs a new instance of this class given its parent
(which must be a
TableTreeItem ),
a style value describing its behavior and appearance, and the index
at which to place it in the items maintained by its parent. |
TableTreeItem(TableTree parent,
TableTreeItem parentItem,
int style,
int index)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
(package private) void |
addCheck()
Deprecated.
|
(package private) void |
addItem(TableTreeItem item,
int index)
Deprecated.
|
void |
dispose()
Deprecated.
Disposes of the operating system resources associated with
the receiver and all its descendants.
|
(package private) void |
expandAll(boolean notify)
Deprecated.
|
(package private) int |
expandedIndexOf(TableTreeItem item)
Deprecated.
|
Color |
getBackground()
Deprecated.
Returns the receiver's background color.
|
Rectangle |
getBounds(int index)
Deprecated.
Returns a rectangle describing the receiver's size and location
relative to its parent.
|
boolean |
getChecked()
Deprecated.
Returns
true if the receiver is checked,
and false otherwise. |
boolean |
getExpanded()
Deprecated.
Returns
true if the receiver is expanded,
and false otherwise. |
Font |
getFont()
Deprecated.
Returns the font that the receiver will use to paint textual information for this item.
|
Color |
getForeground()
Deprecated.
Returns the foreground color that the receiver will use to draw.
|
boolean |
getGrayed()
Deprecated.
Returns
true if the receiver is grayed,
and false otherwise. |
Image |
getImage()
Deprecated.
Gets the first image.
|
Image |
getImage(int index)
Deprecated.
Gets the image at the specified index.
|
(package private) int |
getIndent()
Deprecated.
|
TableTreeItem |
getItem(int index)
Deprecated.
Returns the item at the given, zero-relative index in the
receiver.
|
(package private) TableTreeItem |
getItem(TableItem tableItem)
Deprecated.
|
int |
getItemCount()
Deprecated.
Returns the number of items contained in the receiver
that are direct item children of the receiver.
|
TableTreeItem[] |
getItems()
Deprecated.
Returns an array of
TableTreeItem s which are the
direct item children of the receiver. |
TableTree |
getParent()
Deprecated.
Returns the receiver's parent, which must be a
TableTree . |
TableTreeItem |
getParentItem()
Deprecated.
Returns the receiver's parent item, which must be a
TableTreeItem or null when the receiver is a
root. |
java.lang.String |
getText()
Deprecated.
Returns the receiver's text, which will be an empty
string if it has never been set.
|
java.lang.String |
getText(int index)
Deprecated.
Gets the item text at the specified index.
|
(package private) boolean |
getVisible()
Deprecated.
|
int |
indexOf(TableTreeItem item)
Deprecated.
Gets the index of the specified item.
|
(package private) void |
removeItem(TableTreeItem item)
Deprecated.
|
void |
setBackground(Color color)
Deprecated.
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)
Deprecated.
Sets the checked state of the checkbox for this item.
|
void |
setExpanded(boolean expanded)
Deprecated.
Sets the expanded state.
|
void |
setFont(Font font)
Deprecated.
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(Color color)
Deprecated.
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)
Deprecated.
Sets the grayed state of the checkbox for this item.
|
void |
setImage(Image image)
Deprecated.
Sets the first image.
|
void |
setImage(int index,
Image image)
Deprecated.
Sets the image at an index.
|
void |
setText(int index,
java.lang.String text)
Deprecated.
Sets the widget text.
|
void |
setText(java.lang.String string)
Deprecated.
Sets the receiver's text.
|
(package private) void |
setVisible(boolean show)
Deprecated.
|
(package private) int |
visibleChildrenCount()
Deprecated.
|
checkSubclass
addDisposeListener, addListener, checkWidget, getData, getData, getDisplay, getListeners, getStyle, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, reskin, setData, setData, toString
TableItem tableItem
TableTree parent
TableTreeItem parentItem
TableTreeItem[] items
java.lang.String[] texts
Image[] images
Color background
Color foreground
Font font
boolean expanded
boolean checked
boolean grayed
public TableTreeItem(TableTree parent, int style)
TableTree
)
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 composite control which will be the parent of the new instance (cannot be null)style
- the style of control to constructjava.lang.IllegalArgumentException
- SWTException
- SWT
,
Widget.getStyle()
public TableTreeItem(TableTree parent, int style, int index)
TableTree
,
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 composite control 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 parentjava.lang.IllegalArgumentException
- SWTException
- SWT
,
Widget.getStyle()
public TableTreeItem(TableTreeItem parent, int style)
TableTreeItem
)
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 composite control which will be the parent of the new instance (cannot be null)style
- the style of control to constructjava.lang.IllegalArgumentException
- SWTException
- SWT
,
Widget.getStyle()
public TableTreeItem(TableTreeItem parent, int style, int index)
TableTreeItem
),
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 composite control 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 parentjava.lang.IllegalArgumentException
- SWTException
- SWT
,
Widget.getStyle()
TableTreeItem(TableTree parent, TableTreeItem parentItem, int style, int index)
void addCheck()
void addItem(TableTreeItem item, int index)
public Color getBackground()
SWTException
- public Rectangle getBounds(int index)
SWTException
- public boolean getChecked()
true
if the receiver is checked,
and false otherwise. When the parent does not have
the CHECK style, return false.
SWTException
- public boolean getGrayed()
true
if the receiver is grayed,
and false otherwise. When the parent does not have
the CHECK
style, return false.SWTException
- public boolean getExpanded()
true
if the receiver is expanded,
and false otherwise.
public Font getFont()
SWTException
- public Color getForeground()
SWTException
- public Image getImage()
The image in column 0 is reserved for the [+] and [-] images of the tree, therefore getImage(0) will return null.
getImage
in class Item
SWTException
- public Image getImage(int index)
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.
index
- the index of the imageint getIndent()
public TableTreeItem getItem(int index)
index
- the index of the item to returnjava.lang.IllegalArgumentException
- SWTException
- public int getItemCount()
public TableTreeItem[] getItems()
TableTreeItem
s 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.
TableTreeItem getItem(TableItem tableItem)
public TableTree getParent()
TableTree
.public TableTreeItem getParentItem()
TableTreeItem
or null when the receiver is a
root.public java.lang.String getText()
Item
public java.lang.String getText(int index)
Indexing is zero based. This operation will fail when the index is out of range or an item could not be queried from the OS.
index
- the index of the itemboolean getVisible()
public int indexOf(TableTreeItem item)
The widget is searched starting at 0 until an item is found that is equal to the search item. If no item is found, -1 is returned. Indexing is zero based. This index is relative to the parent only.
item
- the search itemvoid expandAll(boolean notify)
int expandedIndexOf(TableTreeItem item)
int visibleChildrenCount()
public void dispose()
Widget
true
when sent the message isDisposed()
.
Any internal connections between the widgets in the tree will
have been removed to facilitate garbage collection.
This method does nothing if the widget is already disposed.
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 Dispose
event.
void removeItem(TableTreeItem item)
public void setBackground(Color color)
color
- the new color (or null)java.lang.IllegalArgumentException
- SWTException
- public void setChecked(boolean checked)
checked
- the new checked state of the checkboxSWTException
- public void setGrayed(boolean grayed)
grayed
- the new grayed state of the checkbox;SWTException
- public void setExpanded(boolean expanded)
expanded
- the new expanded state.SWTException
- public void setFont(Font font)
font
- the new font (or null)java.lang.IllegalArgumentException
- SWTException
- public void setForeground(Color color)
color
- the new color (or null)java.lang.IllegalArgumentException
- SWTException
- public void setImage(int index, Image image)
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.
image
- the new image or nullSWTException
- public void setImage(Image image)
The image can be null. The image in column 0 is reserved for the [+] and [-] images of the tree, therefore do nothing.
setImage
in class Item
image
- the new image or nullSWTException
- public void setText(int index, java.lang.String text)
The widget text for an item is the label of the item or the label of the text specified by a column number.
index
- the column numbertext
- the new textjava.lang.IllegalArgumentException
- SWTException
- public void setText(java.lang.String string)
Item
void setVisible(boolean show)