|
|||||||||||
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.TableTreeItem
Safe: A TableTreeItem is a selectable user interface object that represents an item in a heirarchy of items in a TableTree.
Field Summary | |
(package private) Color |
background
|
(package private) boolean |
checked
|
(package private) boolean |
expanded
|
(package private) Color |
foreground
|
(package private) boolean |
grayed
|
(package private) Image[] |
images
|
(package private) TableTreeItem[] |
items
|
(package private) TableTree |
parent
|
(package private) TableTreeItem |
parentItem
|
(package private) TableItem |
tableItem
|
(package private) String[] |
texts
|
Fields inherited from class org.eclipse.swt.widgets.Item |
|
Fields inherited from class org.eclipse.swt.widgets.Widget |
|
Constructor Summary | |
|
TableTreeItem(TableTree parent,
int style)
Enabled: 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)
Enabled: 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)
Enabled: 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)
Enabled: 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. |
(package private) |
TableTreeItem(TableTree parent,
TableTreeItem parentItem,
int style,
int index)
|
Method Summary | |
(package private) void |
addCheck()
|
(package private) void |
addItem(TableTreeItem item,
int index)
|
void |
dispose()
Enabled: |
(package private) void |
expandAll(boolean notify)
|
(package private) int |
expandedIndexOf(TableTreeItem item)
|
Color |
getBackground()
Enabled: Returns the receiver's background color. |
Rectangle |
getBounds(int index)
Enabled: Returns a rectangle describing the receiver's size and location relative to its parent. |
boolean |
getChecked()
Enabled: Returns true if the receiver is checked,
and false otherwise. |
Display |
getDisplay()
Suppressed: |
boolean |
getExpanded()
Enabled: Returns true if the receiver is expanded,
and false otherwise. |
Color |
getForeground()
Enabled: Returns the foreground color that the receiver will use to draw. |
boolean |
getGrayed()
Suppressed: Returns true if the receiver is grayed,
and false otherwise. |
Image |
getImage()
Enabled: Gets the first image. |
Image |
getImage(int index)
Enabled: Gets the image at the specified index. |
(package private) int |
getIndent()
|
(package private) TableTreeItem |
getItem(TableItem tableItem)
|
int |
getItemCount()
Enabled: Returns the number of items contained in the receiver that are direct item children of the receiver. |
TableTreeItem[] |
getItems()
Enabled: Returns an array of TableTreeItem s which are the
direct item children of the receiver. |
TableTree |
getParent()
Suppressed: Returns the receiver's parent, which must be a TableTree . |
TableTreeItem |
getParentItem()
Suppressed: Returns the receiver's parent item, which must be a TableTreeItem or null when the receiver is a
root. |
String |
getText()
Enabled: |
String |
getText(int index)
Suppressed: Gets the item text at the specified index. |
(package private) boolean |
getVisible()
|
int |
indexOf(TableTreeItem item)
Enabled: Gets the index of the specified item. |
(package private) void |
removeItem(TableTreeItem item)
|
void |
setBackground(Color color)
Enabled: 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)
Enabled: Sets the checked state of the checkbox for this item. |
void |
setExpanded(boolean expanded)
Enabled: Sets the expanded state. |
void |
setForeground(Color color)
Enabled: 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)
Suppressed: Sets the grayed state of the checkbox for this item. |
void |
setImage(Image image)
Enabled: Sets the first image. |
void |
setImage(int index,
Image image)
Enabled: Sets the image at an index. |
void |
setText(int index,
String text)
Enabled: Sets the widget text. |
void |
setText(String string)
Enabled: |
(package private) void |
setVisible(boolean show)
|
(package private) int |
visibleChildrenCount()
|
Methods inherited from class org.eclipse.swt.widgets.Item |
checkSubclass |
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 |
TableItem tableItem
TableTree parent
TableTreeItem parentItem
TableTreeItem[] items
String[] texts
Image[] images
Color background
Color foreground
boolean expanded
boolean checked
boolean grayed
Constructor Detail |
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 constructSWT
,
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 parentSWT
,
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.
style
- the style of control to constructSWT
,
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.
style
- the style of control to constructindex
- the index to store the receiver in its parentSWT
,
Widget.getStyle()
TableTreeItem(TableTree parent, TableTreeItem parentItem, int style, int index)
Method Detail |
void addCheck()
void addItem(TableTreeItem item, int index)
public Color getBackground()
public Rectangle getBounds(int index)
public boolean getChecked()
true
if the receiver is checked,
and false otherwise. When the parent does not have
the CHECK style, return false.
- Returns:
- the checked state of the checkbox
public boolean getGrayed()
true
if the receiver is grayed,
and false otherwise. When the parent does not have
the CHECK
style, return false.
public Display getDisplay()
getDisplay
in class Widget
public boolean getExpanded()
true
if the receiver is expanded,
and false otherwise.
public Color getForeground()
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
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 image
int getIndent()
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 String getText()
getText
in class Item
public 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 item
boolean 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 item
void expandAll(boolean notify)
int expandedIndexOf(TableTreeItem item)
int visibleChildrenCount()
public void dispose()
dispose
in class Widget
Widget.addDisposeListener(org.eclipse.swt.events.DisposeListener)
,
Widget.removeDisposeListener(org.eclipse.swt.events.DisposeListener)
,
Widget.checkWidget()
void removeItem(TableTreeItem item)
public void setBackground(Color color)
color
- the new color (or null)public void setChecked(boolean checked)
checked
- the new checked state of the checkboxpublic void setGrayed(boolean grayed)
grayed
- the new grayed state of the checkbox;public void setExpanded(boolean expanded)
expanded
- the new expanded state.public void setForeground(Color color)
color
- the new color (or null)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 nullpublic 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 nullpublic void setText(int index, 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 textpublic void setText(String string)
setText
in class Item
string
- the new textvoid setVisible(boolean show)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |