|
|||||||||||
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
getGrayed
public boolean getGrayed()
- Suppressed: Returns
true
if the receiver is grayed,
and false otherwise. When the parent does not have
the CHECK
style, return false.
- Returns:
- the grayed state of the checkbox
- Since:
- 2.1
getDisplay
public Display getDisplay()
- Suppressed:
- Specified by:
getDisplay
in class Widget
- Returns:
- the receiver's display
getExpanded
public boolean getExpanded()
- Enabled: Returns
true
if the receiver is expanded,
and false otherwise.
- Returns:
- the expanded state
getForeground
public Color getForeground()
- Enabled: Returns the foreground color that the receiver will use to draw.
- Returns:
- the receiver's foreground color
- Since:
- 2.0
getImage
public Image getImage()
- Enabled: Gets the first image.
The image in column 0 is reserved for the [+] and [-]
images of the tree, therefore getImage(0) will return null.
- Overrides:
getImage
in class Item
- Returns:
- the image at index 0
getImage
public Image getImage(int index)
- Enabled: Gets the image at the specified 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.
- Parameters:
index
- the index of the image
- Returns:
- the image at the specified index or null
getIndent
int getIndent()
getItemCount
public int getItemCount()
- Enabled: Returns the number of items contained in the receiver
that are direct item children of the receiver.
- Returns:
- the number of items
getItems
public TableTreeItem[] getItems()
- Enabled: Returns an array of
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.
- Returns:
- the receiver's items
getItem
TableTreeItem getItem(TableItem tableItem)
getParent
public TableTree getParent()
- Suppressed: Returns the receiver's parent, which must be a
TableTree
.
- Returns:
- the receiver's parent
getParentItem
public TableTreeItem getParentItem()
- Suppressed: Returns the receiver's parent item, which must be a
TableTreeItem
or null when the receiver is a
root.
- Returns:
- the receiver's parent item
getText
public String getText()
- Enabled:
- Overrides:
getText
in class Item
- Returns:
- the receiver's text
getText
public String getText(int index)
- Suppressed: Gets the item text at the specified 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.
- Parameters:
index
- the index of the item
- Returns:
- the item text at the specified index, which can be null
getVisible
boolean getVisible()
indexOf
public int indexOf(TableTreeItem item)
- Enabled: Gets the index of the specified 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.
- Parameters:
item
- the search item
- Returns:
- the index of the item or -1 if the item is not found
expandAll
void expandAll(boolean notify)
expandedIndexOf
int expandedIndexOf(TableTreeItem item)
visibleChildrenCount
int visibleChildrenCount()
dispose
public void dispose()
- Enabled:
- Overrides:
dispose
in class Widget
- See Also:
Widget.addDisposeListener(org.eclipse.swt.events.DisposeListener)
,
Widget.removeDisposeListener(org.eclipse.swt.events.DisposeListener)
,
Widget.checkWidget()
removeItem
void removeItem(TableTreeItem item)
setBackground
public 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.
- Parameters:
color
- the new color (or null)- Since:
- 2.0
setChecked
public void setChecked(boolean checked)
- Enabled: 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.
- Parameters:
checked
- the new checked state of the checkbox
setGrayed
public void setGrayed(boolean grayed)
- Suppressed: 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.
- Parameters:
grayed
- the new grayed state of the checkbox;- Since:
- 2.1
setExpanded
public void setExpanded(boolean expanded)
- Enabled: Sets the expanded state.
- Parameters:
expanded
- the new expanded state.
setForeground
public 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.
- Parameters:
color
- the new color (or null)- Since:
- 2.0, 2.0
setImage
public void setImage(int index,
Image image)
- Enabled: Sets the image at an index.
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.
- Parameters:
image
- the new image or null
setImage
public void setImage(Image image)
- Enabled: Sets the first image.
The image can be null.
The image in column 0 is reserved for the [+] and [-]
images of the tree, therefore do nothing.
- Overrides:
setImage
in class Item
- Parameters:
image
- the new image or null
setText
public void setText(int index,
String text)
- Enabled: Sets the widget text.
The widget text for an item is the label of the
item or the label of the text specified by a column
number.
- Parameters:
index
- the column numbertext
- the new text
setText
public void setText(String string)
- Enabled:
- Overrides:
setText
in class Item
- Parameters:
string
- the new text
setVisible
void setVisible(boolean show)
Overview
Package
Class
Tree
Deprecated
Index
Help
Legend
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
comments?