For a detailed example of using a TableCursor 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/Snippet96.java .
| Modifier and Type | Field and Description |
|---|---|
| pack-priv Color | |
| pack-priv static final int | |
| pack-priv TableColumn | |
| pack-priv Listener | |
| pack-priv Listener | |
| pack-priv Color | |
| pack-priv static final int | |
| pack-priv Listener | |
| pack-priv Listener | |
| pack-priv TableItem | |
| pack-priv Table | |
| pack-priv Listener |
| Access | Constructor and Description |
|---|---|
| public | TableCursor(Table
a Table 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 table 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 when the user changes the receiver's selection listener)Adds the listener to the collection of listeners who will
be notified when the user changes the receiver's selection, by sending
it one of the messages defined in the |
| 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 TableCursor is positioned. |
| public Color | Returns: the receiver's foreground color |
| public TableItem | Returns: the item for the current position, ornull if noneReturns the row over which the TableCursor 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 user changes the receiver's selection. |
| 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 row for the cell to select row, int the index of column for the cell to select column)Positions the TableCursor over the cell at the given row and column in the parent table. |
| public void | setSelection(TableItem
the TableItem of the row for the cell to select row, int the index of column for the cell to select column)Positions the TableCursor over the cell at the given row and column in the parent table. |
| 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 |
| background | back to summary |
|---|---|
| pack-priv Color background | |
| BACKGROUND | back to summary |
|---|---|
| pack-priv static final int BACKGROUND | |
| column | back to summary |
|---|---|
| pack-priv TableColumn 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 TableItem row | |
| table | back to summary |
|---|---|
| pack-priv Table table | |
| tableListener | back to summary |
|---|---|
| pack-priv Listener tableListener | |
| TableCursor | back to summary |
|---|---|
| public TableCursor(Table parent, int style) Constructs a new instance of this class given its parent table 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 user changes the receiver's selection, by sending
it one of the messages defined in the
When
| |
| 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 TableCursor is positioned.
| |
| getForeground | back to summary |
|---|---|
| public Color getForeground() Overrides org. Returns the foreground color that the receiver will use to draw. | |
| getRow | back to summary |
|---|---|
| public TableItem getRow() Returns the row over which the TableCursor 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 user changes the receiver's selection.
| |
| 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(TableItem row, TableColumn column, boolean notify) | |
| setSelection | back to summary |
|---|---|
| public void setSelection(int row, int column) Positions the TableCursor over the cell at the given row and column in the parent table.
| |
| setSelection | back to summary |
|---|---|
| public void setSelection(TableItem row, int column) Positions the TableCursor over the cell at the given row and column in the parent table.
| |
| 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.
| |
| tableFocusIn | back to summary |
|---|---|
| pack-priv void tableFocusIn(Event event) | |
| tableMouseDown | back to summary |
|---|---|
| pack-priv void tableMouseDown(Event event) | |
| unhookRowColumnListeners | back to summary |
|---|---|
| pack-priv void unhookRowColumnListeners() | |