For a detailed example of using a TreeCursor to navigate to a cell and then edit it see https://github.com/eclipse-platform/eclipse.platform.swt/tree/master/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet360.java .
| Modifier and Type | Field and Description |
|---|---|
| pack-priv Color | |
| pack-priv static final int | |
| pack-priv TreeColumn | |
| pack-priv Listener | |
| pack-priv Listener | |
| pack-priv Color | |
| pack-priv static final int | |
| pack-priv Listener | |
| pack-priv Listener | |
| pack-priv TreeItem | |
| pack-priv Tree | |
| pack-priv Listener |
| Access | Constructor and Description |
|---|---|
| public | TreeCursor(Tree
a Tree control which will be the parent of the new instance (cannot be null) parent, int the style of control to construct style)Constructs a new instance of this class given its parent tree and a style value describing its behavior and appearance. |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv void | |
| public void | addSelectionListener(SelectionListener
the listener which should be notified listener)Adds the listener to the collection of listeners who will be notified when the receiver's
selection changes, by sending it one of the messages defined in the
|
| pack-priv int | |
| pack-priv int | |
| pack-priv TreeItem | |
| public Color | Returns: the receiver's background color |
| public int | Returns: the column index for the current positionReturns the index of the column over which the TreeCursor is positioned. |
| public Color | Returns: the receiver's foreground color |
| pack-priv TreeItem | |
| pack-priv TreeItem | |
| pack-priv TreeItem | |
| public TreeItem | Returns: the item for the current position, ornull if noneReturns the row over which the TreeCursor is positioned. |
| pack-priv void | |
| pack-priv void | |
| pack-priv void | |
| public void | removeSelectionListener(SelectionListener
the listener which should no longer be notified listener)Removes the listener from the collection of listeners who will be notified when the receiver's selection changes. |
| public void | setBackground(Color
the new color (or null) color)
Sets the receiver's background color to the color specified
by the argument, or to the default system color for the control
if the argument is null.
|
| public void | setForeground(Color
the new color (or null) color)
Sets the receiver's foreground color to the color specified
by the argument, or to the default system color for the control
if the argument is null.
|
| pack-priv void | |
| pack-priv void | |
| public void | setSelection(int
the index of the root-level row for the cell to select row, int the index of column for the cell to select column)Positions the TreeCursor over the root-level cell at the given row and column in the parent tree. |
| public void | setSelection(TreeItem
the TreeItem of the row for the cell to select row, int the index of column for the cell to select column)Positions the TreeCursor over the cell at the given row and column in the parent tree. |
| public void | setVisible(boolean
the new visibility state visible)Overrides org. true,
and marks it invisible otherwise.
|
| pack-priv void | |
| pack-priv void | |
| pack-priv void | |
| pack-priv void | |
| pack-priv void |
| background | back to summary |
|---|---|
| pack-priv Color background | |
| BACKGROUND | back to summary |
|---|---|
| pack-priv static final int BACKGROUND | |
| column | back to summary |
|---|---|
| pack-priv TreeColumn column | |
| disposeColumnListener | back to summary |
|---|---|
| pack-priv Listener disposeColumnListener | |
| disposeItemListener | back to summary |
|---|---|
| pack-priv Listener disposeItemListener | |
| foreground | back to summary |
|---|---|
| pack-priv Color foreground | |
| FOREGROUND | back to summary |
|---|---|
| pack-priv static final int FOREGROUND | |
| listener | back to summary |
|---|---|
| pack-priv Listener listener | |
| resizeListener | back to summary |
|---|---|
| pack-priv Listener resizeListener | |
| row | back to summary |
|---|---|
| pack-priv TreeItem row | |
| tree | back to summary |
|---|---|
| pack-priv Tree tree | |
| treeListener | back to summary |
|---|---|
| pack-priv Listener treeListener | |
| TreeCursor | back to summary |
|---|---|
| public TreeCursor(Tree parent, int style) Constructs a new instance of this class given its parent tree and a style value describing its behavior and appearance.
The style value is either one of the style constants defined in class
| |
| _resize | back to summary |
|---|---|
| pack-priv void _resize() | |
| addSelectionListener | back to summary |
|---|---|
| public void addSelectionListener(SelectionListener listener) Adds the listener to the collection of listeners who will be notified when the receiver's
selection changes, by sending it one of the messages defined in the
When
| |
| countSubTreePages | back to summary |
|---|---|
| pack-priv int countSubTreePages(TreeItem root) | |
| findIndex | back to summary |
|---|---|
| pack-priv int findIndex(TreeItem[] items, TreeItem treeItem) | |
| findItem | back to summary |
|---|---|
| pack-priv TreeItem findItem(TreeItem[] items, Point pt) | |
| getBackground | back to summary |
|---|---|
| public Color getBackground() Overrides org. Returns the background color that the receiver will use to draw. | |
| getColumn | back to summary |
|---|---|
| public int getColumn() Returns the index of the column over which the TreeCursor is positioned.
| |
| getForeground | back to summary |
|---|---|
| public Color getForeground() Overrides org. Returns the foreground color that the receiver will use to draw. | |
| getLastVisibleItem | back to summary |
|---|---|
| pack-priv TreeItem getLastVisibleItem(TreeItem[] items) | |
| getNextItem | back to summary |
|---|---|
| pack-priv TreeItem getNextItem(TreeItem item) | |
| getPreviousItem | back to summary |
|---|---|
| pack-priv TreeItem getPreviousItem(TreeItem item) | |
| getRow | back to summary |
|---|---|
| public TreeItem getRow() Returns the row over which the TreeCursor is positioned.
| |
| keyDown | back to summary |
|---|---|
| pack-priv void keyDown(Event event) | |
| onDispose | back to summary |
|---|---|
| pack-priv void onDispose(Event event) | |
| paint | back to summary |
|---|---|
| pack-priv void paint(Event event) | |
| removeSelectionListener | back to summary |
|---|---|
| public void removeSelectionListener(SelectionListener listener) Removes the listener from the collection of listeners who will be notified when the receiver's selection changes.
| |
| setBackground | back to summary |
|---|---|
| public void setBackground(Color color) Overrides org. Sets the receiver's background color to the color specified by the argument, or to the default system color for the control if the argument is null. Note This operation is a hint and may be overridden by the platform. For example, on Windows the background of a Button cannot be changed.
| |
| setForeground | back to summary |
|---|---|
| public void setForeground(Color color) Overrides org. Sets the receiver's foreground color to the color specified by the argument, or to the default system color for the control if the argument is null. Note This operation is a hint and may be overridden by the platform.
| |
| setRowColumn | back to summary |
|---|---|
| pack-priv void setRowColumn(int row, int column, boolean notify) | |
| setRowColumn | back to summary |
|---|---|
| pack-priv void setRowColumn(TreeItem row, TreeColumn column, boolean notify) | |
| setSelection | back to summary |
|---|---|
| public void setSelection(int row, int column) Positions the TreeCursor over the root-level cell at the given row and column in the parent tree.
| |
| setSelection | back to summary |
|---|---|
| public void setSelection(TreeItem row, int column) Positions the TreeCursor over the cell at the given row and column in the parent tree.
| |
| setVisible | back to summary |
|---|---|
| public void setVisible(boolean visible) Overrides org. Doc from org. Marks the receiver as visible if the argument is If one of the receiver's ancestors is not visible or some other condition makes the receiver not visible, marking it visible may not actually cause it to be displayed.
| |
| treeCollapse | back to summary |
|---|---|
| pack-priv void treeCollapse(Event event) | |
| treeExpand | back to summary |
|---|---|
| pack-priv void treeExpand(Event event) | |
| treeFocusIn | back to summary |
|---|---|
| pack-priv void treeFocusIn(Event event) | |
| treeMouseDown | back to summary |
|---|---|
| pack-priv void treeMouseDown(Event event) | |
| unhookRowColumnListeners | back to summary |
|---|---|
| pack-priv void unhookRowColumnListeners() | |