The item children that may be added to instances of this class
must be of type TableItem.
Style VIRTUAL is used to create a Table whose
TableItems are to be populated by the client on an on-demand basis
instead of up-front. This can provide significant performance improvements for
tables that are very large or for which TableItem population is
expensive (for example, retrieving values from an external source).
Here is an example of using a Table with style VIRTUAL:
final Table table = new Table (parent, SWT.VIRTUAL | SWT.BORDER);
table.setItemCount (1000000);
table.addListener (SWT.SetData, new Listener () {
public void handleEvent (Event event) {
TableItem item = (TableItem) event.item;
int index = table.indexOf (item);
item.setText ("Item " + index);
System.out.println (item.getText ());
}
});
Note that although this class is a subclass of Composite,
it does not normally make sense to add Control children to
it, or set a layout on it, unless implementing something like a cell
editor.
Note
Only one of the styles SINGLE, and MULTI may be specified.
Important Note
This class is not intended to be subclassed.
| Modifier and Type | Field and Description |
|---|---|
| pack-priv GdkRGBA | |
| pack-priv static final int | |
| pack-priv boolean | |
| pack-priv double | |
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv long | |
| pack-priv int | |
| pack-priv TableColumn[] | |
| pack-priv double | |
| pack-priv TableItem | |
| pack-priv int | |
| pack-priv GdkRGBA | |
| pack-priv int | |
| pack-priv static final int | |
| pack-priv boolean | firstCompute
True iff computeSize has never been called on this Table |
| pack-priv boolean | |
| pack-priv static final int | |
| pack-priv GdkRGBA | |
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv boolean | |
| pack-priv Color | |
| private long | |
| pack-priv Color | |
| pack-priv int | |
| pack-priv ImageList | |
| pack-priv boolean | |
| pack-priv long | |
| pack-priv boolean | |
| pack-priv ImageList | |
| pack-priv int | |
| pack-priv TableItem[] | |
| pack-priv int | |
| pack-priv int | |
| pack-priv long | |
| pack-priv boolean | |
| pack-priv int | |
| pack-priv boolean | |
| pack-priv int | |
| pack-priv boolean | |
| pack-priv int | |
| pack-priv int | |
| pack-priv TableColumn | |
| pack-priv int | |
| pack-priv int | |
| pack-priv boolean |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv void | _addListener(int eventType, Listener listener)
Overrides org. |
| pack-priv TableItem | |
| 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 |
| pack-priv int | |
| pack-priv int | |
| pack-priv long | cellDataProc(long tree_column, long cell, long tree_model, long iter, long data)
Overrides org. |
| pack-priv boolean | |
| pack-priv void | checkSetDataInProcessBeforeRemoval(int
index of first item to check start, int index after the last item to check end)Check the table item range [start, end) for items that are in process of
sending |
| pack-priv static int | |
| protected void | checkSubclass()
Checks that this class can be subclassed.
|
| public void | clear(int
the index of the item to clear index)Clears the item at the given zero-relative index in the receiver. |
| public void | clear(int
the start index of the item to clear start, int the end index of the item to clear end)Removes the items from the receiver which are between the given zero-relative start and end indices (inclusive). |
| public void | clear(int[]
the array of indices of the items indices)Clears the items at the given zero-relative indices in the receiver. |
| public void | |
| pack-priv Point | computeSizeInPixels(int wHint, int hHint, boolean changed)
Overrides org. |
| pack-priv void | |
| pack-priv void | |
| pack-priv void | |
| pack-priv void | |
| pack-priv void | |
| pack-priv void | |
| pack-priv void | |
| pack-priv GdkRGBA | |
| pack-priv void | |
| public void | deselect(int
the index of the item to deselect index)Deselects the item at the given zero-relative index in the receiver. |
| public void | deselect(int
the start index of the items to deselect start, int the end index of the items to deselect end)Deselects the items at the given zero-relative indices in the receiver. |
| public void | deselect(int[]
the array of indices for the items to deselect indices)Deselects the items at the given zero-relative indices in the receiver. |
| public void | |
| pack-priv void | |
| pack-priv void | |
| public void | dispose()
Overrides org. |
| pack-priv boolean | dragDetect(int x, int y, boolean filter, boolean dragOnTimeout, boolean[] consume)
Overrides org. |
| pack-priv void | |
| pack-priv long | |
| pack-priv long | |
| pack-priv Rectangle | |
| pack-priv int | |
| public TableColumn | Returns: the column at the given indexthe index of the column to return index)Returns the column at the given, zero-relative index in the receiver. |
| public int | Returns: the number of columnsReturns the number of columns contained in the receiver. |
| public int[] | Returns: the current visual order of the receiver's itemsReturns an array of zero-relative integers that map the creation order of the receiver's items to the order in which they are currently being displayed. |
| public TableColumn[] | Returns: the items in the receiverReturns an array of |
| pack-priv long[] | |
| pack-priv GdkRGBA | |
| pack-priv GdkRGBA | |
| pack-priv TableItem | |
| private GC | |
| public int | Returns: the width of a grid line in pointsReturns the width in points of a grid line. |
| pack-priv int | |
| public Color | Returns: the receiver's header background color.Returns the header background color. |
| public Color | Returns: the receiver's header foreground color.Returns the header foreground color. |
| public int | Returns: the height of the header or zero if the header is not visibleReturns the height of the receiver's header |
| pack-priv int | |
| public boolean | Returns: the receiver's header's visibility stateReturns |
| public TableItem | Returns: the item at the given indexthe index of the item to return index)Returns the item at the given, zero-relative index in the receiver. |
| public TableItem | |
| public int | |
| public int | Returns: the height of one itemReturns the height of the area which would be used to display one of the items in the receiver. |
| pack-priv int | |
| pack-priv TableItem | |
| public TableItem[] | Returns: the items in the receiverReturns a (possibly empty) array of |
| public boolean | Returns: the visibility state of the linesReturns |
| pack-priv long | |
| public TableItem[] | Returns: an array representing the selectionReturns an array of |
| public int | Returns: the number of selected itemsReturns the number of selected items contained in the receiver. |
| public int | Returns: the index of the selected itemReturns the zero-relative index of the item which is currently selected in the receiver, or -1 if no item is selected. |
| public int[] | Returns: the array of indices of the selected itemsReturns the zero-relative indices of the items which are currently selected in the receiver. |
| public TableColumn | Returns: the sort indicatorReturns the column which shows the sort indicator for the receiver. |
| public int | Returns: the sort directionReturns the direction of the sort indicator for the receiver. |
| pack-priv long | |
| public int | Returns: the index of the top itemReturns the zero-relative index of the item which is currently at the top of the receiver. |
| pack-priv long | gtk_button_press_event(long widget, long event)
Overrides org. |
| pack-priv long | gtk_button_release_event(long widget, long event)
Overrides org. |
| pack-priv long | |
| pack-priv long | |
| pack-priv void | gtk_gesture_press_event(long
the corresponding controller responsible for capturing the event gesture, int how many touch/button presses happened with this one n_press, double the x coordinate, in widget allocation coordinates x, double the y coordinate, in widget allocation coordinates y, long the GdkEvent captured event)Overrides org. |
| pack-priv long | gtk_key_press_event(long widget, long event)
Overrides org. |
| pack-priv long | gtk_motion_notify_event(long widget, long event)
Overrides org. |
| pack-priv long | gtk_row_activated(long tree, long path, long column)
|
| pack-priv long | gtk_scroll_event(long widget, long eventPtr)
Overrides org. |
| pack-priv long | gtk_start_interactive_search(long widget)
Overrides org. |
| pack-priv long | |
| pack-priv void | gtk_widget_get_preferred_size(long widget, GtkRequisition requisition)
Overrides org. |
| pack-priv void | |
| pack-priv void | |
| public int | Returns: the index of the columnthe search column column)Searches the receiver's list starting at the first column (index 0) until a column is found that is equal to the argument, and returns the index of that column. |
| public int | |
| public boolean | Returns: the selection state of the item at the indexthe index of the item index)Returns |
| pack-priv boolean | |
| pack-priv boolean | |
| pack-priv long | |
| pack-priv void | propagateDraw(long
the parent container, i.e. fixedHandle container, long the cairo context provided by GTK cairo)Overrides org. Propagates draw events from a parent container to its children using gtk_container_propagate_draw(). |
| pack-priv void | |
| pack-priv void | |
| pack-priv void | |
| pack-priv void | |
| pack-priv void | |
| public void | remove(int
the index for the item index)Removes the item from the receiver at the given zero-relative index. |
| public void | remove(int
the start of the range start, int the end of the range end)Removes the items from the receiver which are between the given zero-relative start and end indices (inclusive). |
| public void | remove(int[]
the array of indices of the items indices)Removes the items from the receiver's list at the given zero-relative indices. |
| public 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. |
| pack-priv long | rendererGetPreferredWidthProc(long cell, long handle, long minimun_size, long natural_size)
Overrides org. |
| pack-priv void | rendererRender(long cell, long cr, long snapshot, long widget, long background_area, long cell_area, long expose_area, long flags)
|
| pack-priv long | rendererRenderProc(long cell, long cr, long widget, long background_area, long cell_area, long flags)
Overrides org. |
| pack-priv long | rendererSnapshotProc(long cell, long snapshot, long widget, long background_area, long cell_area, long flags)
Overrides org. |
| pack-priv void | |
| pack-priv Point | resizeCalculationsGTK3(long widget, int width, int height)
Overrides org. |
| pack-priv void | |
| pack-priv boolean | |
| public void | select(int
the index of the item to select index)Selects the item at the given zero-relative index in the receiver. |
| public void | select(int
the start of the range start, int the end of the range end)Selects the items in the range specified by the given zero-relative indices in the receiver. |
| public void | select(int[]
the array of indices for the items to select indices)Selects the items at the given zero-relative indices in the receiver. |
| public void | |
| pack-priv void | |
| pack-priv void | |
| pack-priv void | |
| pack-priv void | setBackgroundGdkRGBA(long context, long handle, GdkRGBA rgba)
Overrides org. |
| pack-priv void | |
| pack-priv int | setBounds(int x, int y, int width, int height, boolean move, boolean resize)
Overrides org. |
| public void | setColumnOrder(int[]
the new order to display the items order)Sets the order that the items in the receiver should be displayed in to the given argument which is described in terms of the zero-relative ordering of when the items were added. |
| pack-priv void | |
| pack-priv void | |
| public void | setHeaderBackground(Color
the new color (or null) color)Sets the header background color to the color specified by the argument, or to the default system color if the argument is null. |
| public void | setHeaderForeground(Color
the new color (or null) color)Sets the header foreground color to the color specified by the argument, or to the default system color if the argument is null. |
| public void | setHeaderVisible(boolean
the new visibility state show)Marks the receiver's header as visible if the argument is |
| public void | |
| public void | setLinesVisible(boolean
the new visibility state show)Marks the receiver's lines as visible if the argument is |
| pack-priv void | |
| pack-priv void | |
| pack-priv void | |
| pack-priv void | |
| public void | setRedraw(boolean
the new redraw state redraw)Overrides org. false, causes subsequent drawing
operations in the receiver to be ignored.
|
| pack-priv void | |
| public void | setSelection(int
the index of the item to select index)Selects the item at the given zero-relative index in the receiver. |
| public void | setSelection(int
the start index of the items to select start, int the end index of the items to select end)Selects the items in the range specified by the given zero-relative indices in the receiver. |
| public void | setSelection(int[]
the indices of the items to select indices)Selects the items at the given zero-relative indices in the receiver. |
| public void | |
| public void | setSelection(TableItem[]
the array of items items)Sets the receiver's selection to be the given array of items. |
| public void | setSortColumn(TableColumn
the column used by the sort indicator or column)nullSets the column used by the sort indicator for the receiver. |
| public void | setSortDirection(int
the direction of the sort indicator direction)Sets the direction of the sort indicator for the receiver. |
| public void | setTopIndex(int
the index of the top item index)Sets the zero-relative index of the item which is currently at the top of the receiver. |
| public void | |
| pack-priv boolean | |
| public void | |
| pack-priv void | |
| public void | |
| private void | |
| pack-priv void | |
| pack-priv void | |
| pack-priv long | windowProc(long handle, long arg0, long user_data)
Overrides org. |