Class TableTreeItem
-
Constructor Summary
ConstructorsConstructorDescriptionTableTreeItem
(TableTreeItem parent, int style) Deprecated.Constructs a new instance of this class given its parent (which must be aTableTreeItem
) 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 aTableTreeItem
), 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, int style) Deprecated.Constructs a new instance of this class given its parent (which must be aTableTree
) 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 aTableTree
, a style value describing its behavior and appearance, and the index at which to place it in the items maintained by its parent. -
Method Summary
Modifier and TypeMethodDescriptionvoid
dispose()
Deprecated.Disposes of the operating system resources associated with the receiver and all its descendants.Deprecated.Returns the receiver's background color.getBounds
(int index) Deprecated.Returns a rectangle describing the receiver's size and location relative to its parent.boolean
Deprecated.Returnstrue
if the receiver is checked, and false otherwise.boolean
Deprecated.Returnstrue
if the receiver is expanded, and false otherwise.getFont()
Deprecated.Returns the font that the receiver will use to paint textual information for this item.Deprecated.Returns the foreground color that the receiver will use to draw.boolean
Deprecated.Returnstrue
if the receiver is grayed, and false otherwise.getImage()
Deprecated.Gets the first image.getImage
(int index) Deprecated.Gets the image at the specified index.getItem
(int index) Deprecated.Returns the item at the given, zero-relative index in the receiver.int
Deprecated.Returns the number of items contained in the receiver that are direct item children of the receiver.getItems()
Deprecated.Returns an array ofTableTreeItem
s which are the direct item children of the receiver.Deprecated.Returns the receiver's parent, which must be aTableTree
.Deprecated.Returns the receiver's parent item, which must be aTableTreeItem
or null when the receiver is a root.getText()
Deprecated.Returns the receiver's text, which will be an empty string if it has never been set.getText
(int index) Deprecated.Gets the item text at the specified index.int
indexOf
(TableTreeItem item) Deprecated.Gets the index of the specified item.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
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
Deprecated.Sets the image at an index.void
Deprecated.Sets the first image.void
Deprecated.Sets the widget text.void
Deprecated.Sets the receiver's text.Methods inherited from class org.eclipse.swt.widgets.Item
checkSubclass
Methods inherited from class org.eclipse.swt.widgets.Widget
addDisposeListener, addListener, checkWidget, getData, getData, getDisplay, getListeners, getStyle, isAutoDirection, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, reskin, setData, setData, toString
-
Constructor Details
-
TableTreeItem
Deprecated.Constructs a new instance of this class given its parent (which must be aTableTree
) 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 theint
"|" operator) two or more of thoseSWT
style constants. The class description lists the style constants that are applicable to the class. Style bits are also inherited from superclasses.- Parameters:
parent
- a composite control which will be the parent of the new instance (cannot be null)style
- the style of control to construct- Throws:
IllegalArgumentException
-- ERROR_NULL_ARGUMENT - if the parent is null
SWTException
-- ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the parent
- See Also:
-
TableTreeItem
Deprecated.Constructs a new instance of this class given its parent (which must be aTableTree
, 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 theint
"|" operator) two or more of thoseSWT
style constants. The class description lists the style constants that are applicable to the class. Style bits are also inherited from superclasses.- Parameters:
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 parent- Throws:
IllegalArgumentException
-- ERROR_NULL_ARGUMENT - if the parent is null
SWTException
-- ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the parent
- See Also:
-
TableTreeItem
Deprecated.Constructs a new instance of this class given its parent (which must be aTableTreeItem
) 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 theint
"|" operator) two or more of thoseSWT
style constants. The class description lists the style constants that are applicable to the class. Style bits are also inherited from superclasses.- Parameters:
parent
- a composite control which will be the parent of the new instance (cannot be null)style
- the style of control to construct- Throws:
IllegalArgumentException
-- ERROR_NULL_ARGUMENT - if the parent is null
SWTException
-- ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the parent
- See Also:
-
TableTreeItem
Deprecated.Constructs a new instance of this class given its parent (which must be aTableTreeItem
), 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 theint
"|" operator) two or more of thoseSWT
style constants. The class description lists the style constants that are applicable to the class. Style bits are also inherited from superclasses.- Parameters:
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 parent- Throws:
IllegalArgumentException
-- ERROR_NULL_ARGUMENT - if the parent is null
SWTException
-- ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the parent
- See Also:
-
-
Method Details
-
getBackground
Deprecated.Returns the receiver's background color.- Returns:
- the background color
- Throws:
SWTException
-- ERROR_WIDGET_DISPOSED - if the receiver has been disposed
- ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
- Since:
- 2.0
-
getBounds
Deprecated.Returns a rectangle describing the receiver's size and location relative to its parent.- Returns:
- the receiver's bounding rectangle
- Throws:
SWTException
-- ERROR_WIDGET_DISPOSED - if the receiver has been disposed
- ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
-
getChecked
public boolean getChecked()Deprecated.Returnstrue
if the receiver is checked, and false otherwise. When the parent does not have theCHECK style, return false.
- Returns:
- the checked state of the checkbox
- Throws:
SWTException
-- ERROR_WIDGET_DISPOSED - if the receiver has been disposed
- ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
-
getGrayed
public boolean getGrayed()Deprecated.Returnstrue
if the receiver is grayed, and false otherwise. When the parent does not have theCHECK
style, return false.- Returns:
- the grayed state of the checkbox
- Throws:
SWTException
-- ERROR_WIDGET_DISPOSED - if the receiver has been disposed
- ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
- Since:
- 2.1
-
getExpanded
public boolean getExpanded()Deprecated.Returnstrue
if the receiver is expanded, and false otherwise.- Returns:
- the expanded state
-
getFont
Deprecated.Returns the font that the receiver will use to paint textual information for this item.- Returns:
- the receiver's font
- Throws:
SWTException
-- ERROR_WIDGET_DISPOSED - if the receiver has been disposed
- ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
- Since:
- 3.0
-
getForeground
Deprecated.Returns the foreground color that the receiver will use to draw.- Returns:
- the receiver's foreground color
- Throws:
SWTException
-- ERROR_WIDGET_DISPOSED - if the receiver has been disposed
- ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
- Since:
- 2.0
-
getImage
Deprecated.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 classItem
- Returns:
- the image at index 0
- Throws:
SWTException
-- ERROR_WIDGET_DISPOSED - if the receiver has been disposed
- ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
-
getImage
Deprecated.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
-
getItem
Deprecated.Returns the item at the given, zero-relative index in the receiver. Throws an exception if the index is out of range.- Parameters:
index
- the index of the item to return- Returns:
- the item at the given index
- Throws:
IllegalArgumentException
-- ERROR_INVALID_RANGE - if the index is not between 0 and the number of elements in the list minus 1 (inclusive)
SWTException
-- ERROR_WIDGET_DISPOSED - if the receiver has been disposed
- ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
- Since:
- 3.1
-
getItemCount
public int getItemCount()Deprecated.Returns the number of items contained in the receiver that are direct item children of the receiver.- Returns:
- the number of items
-
getItems
Deprecated.Returns an array ofTableTreeItem
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
-
getParent
Deprecated.Returns the receiver's parent, which must be aTableTree
.- Returns:
- the receiver's parent
-
getParentItem
Deprecated.Returns the receiver's parent item, which must be aTableTreeItem
or null when the receiver is a root.- Returns:
- the receiver's parent item
-
getText
Deprecated.Description copied from class:Item
Returns the receiver's text, which will be an empty string if it has never been set. -
getText
Deprecated.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
-
indexOf
Deprecated.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
-
dispose
public void dispose()Deprecated.Description copied from class:Widget
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 answertrue
when sent the messageisDisposed()
. 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. -
setBackground
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.- Parameters:
color
- the new color (or null)- Throws:
IllegalArgumentException
-- ERROR_INVALID_ARGUMENT - if the argument has been disposed
SWTException
-- ERROR_WIDGET_DISPOSED - if the receiver has been disposed
- ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
- Since:
- 2.0
-
setChecked
public void setChecked(boolean checked) Deprecated.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- Throws:
SWTException
-- ERROR_WIDGET_DISPOSED - if the receiver has been disposed
- ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
-
setGrayed
public void setGrayed(boolean grayed) Deprecated.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;- Throws:
SWTException
-- ERROR_WIDGET_DISPOSED - if the receiver has been disposed
- ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
- Since:
- 2.1
-
setExpanded
public void setExpanded(boolean expanded) Deprecated.Sets the expanded state.- Parameters:
expanded
- the new expanded state.- Throws:
SWTException
-- ERROR_THREAD_INVALID_ACCESS when called from the wrong thread
- ERROR_WIDGET_DISPOSED when the widget has been disposed
-
setFont
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.- Parameters:
font
- the new font (or null)- Throws:
IllegalArgumentException
-- ERROR_INVALID_ARGUMENT - if the argument has been disposed
SWTException
-- ERROR_WIDGET_DISPOSED - if the receiver has been disposed
- ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
- Since:
- 3.0
-
setForeground
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.- Parameters:
color
- the new color (or null)- Throws:
IllegalArgumentException
-- ERROR_INVALID_ARGUMENT - if the argument has been disposed
SWTException
-- ERROR_WIDGET_DISPOSED - if the receiver has been disposed
- ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
- Since:
- 2.0, 2.0
-
setImage
Deprecated.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- Throws:
SWTException
-- ERROR_THREAD_INVALID_ACCESS when called from the wrong thread
- ERROR_WIDGET_DISPOSED when the widget has been disposed
-
setImage
Deprecated.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 classItem
- Parameters:
image
- the new image or null- Throws:
SWTException
-- ERROR_THREAD_INVALID_ACCESS when called from the wrong thread
- ERROR_WIDGET_DISPOSED when the widget has been disposed
-
setText
Deprecated.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- Throws:
IllegalArgumentException
-- ERROR_NULL_ARGUMENT - if the text is null
SWTException
-- ERROR_THREAD_INVALID_ACCESS when called from the wrong thread
- ERROR_WIDGET_DISPOSED when the widget has been disposed
-
setText
Deprecated.Description copied from class:Item
Sets the receiver's text.Note: If control characters like '\n', '\t' etc. are used in the string, then the behavior is platform dependent.
-