Note
Only one of SINGLE and MULTI may be specified.
Important Note
This class is not intended to be subclassed.
| Modifier and Type | Field and Description |
|---|---|
| pack-priv double | |
| pack-priv double | |
| pack-priv long | |
| pack-priv boolean | |
| pack-priv int | |
| pack-priv int | |
| pack-priv static final int | |
| pack-priv int |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public 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 |
| pack-priv int | |
| pack-priv static int | |
| pack-priv Point | computeSizeInPixels(int wHint, int hHint, boolean changed)
Overrides org. |
| 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 boolean | dragDetect(int x, int y, boolean filter, boolean dragOnTimeout, boolean[] consume)
Overrides org. |
| pack-priv long | |
| public int | Returns: the index of the selected itemReturns the zero-relative index of the item which currently has the focus in the receiver, or -1 if no item has focus. |
| public String | 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 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 list. |
| pack-priv int | |
| public String[] | Returns: the items in the receiver's listReturns a (possibly empty) array of |
| public String[] | 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 item or -1Returns 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. |
| 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 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_row_activated(long tree, long path, long column)
|
| pack-priv void | |
| public int | |
| public int | |
| public boolean | Returns: the selection state of the item at the indexthe index of the item index)Returns |
| pack-priv void | keyPressDefaultSelectionHandler(long
the gtk key press event that was fired. event, int key)Used to emulate DefaultSelection event. |
| pack-priv long | |
| 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 | |
| public void | remove(int[]
the array of indices of the items indices)Removes the items from the receiver 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. |
| public void | select(int
the index of the item to select index)Selects the item at the given zero-relative index in the receiver's list. |
| 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 int | setBounds(int x, int y, int width, int height, boolean move, boolean resize)
Overrides org. |
| pack-priv void | |
| public void | |
| public 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 | setSelection(String[]
the array of items items)Sets the receiver's selection to be the given array of items. |
| 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 |
| cachedAdjustment | back to summary |
|---|---|
| pack-priv double cachedAdjustment | |
| currentAdjustment | back to summary |
|---|---|
| pack-priv double currentAdjustment | |
| modelHandle | back to summary |
|---|---|
| pack-priv long modelHandle | |
| rowActivated | back to summary |
|---|---|
| pack-priv boolean rowActivated | |
| selectionCountOnPress | back to summary |
|---|---|
| pack-priv int selectionCountOnPress | |
| selectionCountOnRelease | back to summary |
|---|---|
| pack-priv int selectionCountOnRelease | |
| TEXT_COLUMN | back to summary |
|---|---|
| pack-priv static final int TEXT_COLUMN | |
| topIndex | back to summary |
|---|---|
| pack-priv int topIndex | |
| List | back to summary |
|---|---|
| public List(Composite parent, int style) Constructs a new instance of this class given its parent and a style value describing its behavior and appearance.
The style value is either one of the style constants defined in
class
| |
| add | back to summary |
|---|---|
| public void add(String string) Adds the argument to the end of the receiver's list. Note If control characters like '\n', '\t' etc. are used in the string, then the behavior is platform dependent.
| |
| add | back to summary |
|---|---|
| public void add(String string, int index) Adds the argument to the receiver's list at the given zero-relative index. Note To add an item at the end of the list, use the
result of calling Also note, if control characters like '\n', '\t' etc. are used in the string, then the behavior is platform dependent.
| |
| 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
| |
| applyThemeBackground | back to summary |
|---|---|
| pack-priv int applyThemeBackground() Overrides org.
| |
| checkStyle | back to summary |
|---|---|
| pack-priv static int checkStyle(int style) | |
| computeSizeInPixels | back to summary |
|---|---|
| pack-priv Point computeSizeInPixels(int wHint, int hHint, boolean changed) Overrides org.
| |
| createHandle | back to summary |
|---|---|
| pack-priv void createHandle(int index) Overrides org.
| |
| defaultBackground | back to summary |
|---|---|
| pack-priv GdkRGBA defaultBackground() Overrides org.
| |
| deregister | back to summary |
|---|---|
| pack-priv void deregister() Overrides org.
| |
| deselect | back to summary |
|---|---|
| public void deselect(int index) Deselects the item at the given zero-relative index in the receiver. If the item at the index was already deselected, it remains deselected. Indices that are out of range are ignored.
| |
| deselect | back to summary |
|---|---|
| public void deselect(int start, int end) Deselects the items at the given zero-relative indices in the receiver. If the item at the given zero-relative index in the receiver is selected, it is deselected. If the item at the index was not selected, it remains deselected. The range of the indices is inclusive. Indices that are out of range are ignored.
| |
| deselect | back to summary |
|---|---|
| public void deselect(int[] indices) Deselects the items at the given zero-relative indices in the receiver. If the item at the given zero-relative index in the receiver is selected, it is deselected. If the item at the index was not selected, it remains deselected. Indices that are out of range and duplicate indices are ignored.
| |
| deselectAll | back to summary |
|---|---|
| public void deselectAll() Deselects all selected items in the receiver.
| |
| dragDetect | back to summary |
|---|---|
| pack-priv boolean dragDetect(int x, int y, boolean filter, boolean dragOnTimeout, boolean[] consume) Overrides org.
| |
| eventWindow | back to summary |
|---|---|
| pack-priv long eventWindow() Overrides org.
| |
| getFocusIndex | back to summary |
|---|---|
| public int getFocusIndex() Returns the zero-relative index of the item which currently has the focus in the receiver, or -1 if no item has focus.
| |
| getItem | back to summary |
|---|---|
| public String getItem(int index) Returns the item at the given, zero-relative index in the receiver. Throws an exception if the index is out of range.
| |
| getItemCount | back to summary |
|---|---|
| public int getItemCount() Returns the number of items contained in the receiver.
| |
| getItemHeight | back to summary |
|---|---|
| public int getItemHeight() Returns the height of the area which would be used to display one of the items in the list.
| |
| getItemHeightInPixels | back to summary |
|---|---|
| pack-priv int getItemHeightInPixels() | |
| getItems | back to summary |
|---|---|
| public String[] getItems() Returns a (possibly empty) array of 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.
| |
| getSelection | back to summary |
|---|---|
| public String[] getSelection() Returns an array of Note This is not the actual structure used by the receiver to maintain its selection, so modifying the array will not affect the receiver.
| |
| getSelectionCount | back to summary |
|---|---|
| public int getSelectionCount() Returns the number of selected items contained in the receiver.
| |
| getSelectionIndex | back to summary |
|---|---|
| public int getSelectionIndex() Returns the zero-relative index of the item which is currently selected in the receiver, or -1 if no item is selected.
| |
| getSelectionIndices | back to summary |
|---|---|
| public int[] getSelectionIndices() Returns the zero-relative indices of the items which are currently selected in the receiver. The order of the indices is unspecified. The array is empty if no items are selected. Note This is not the actual structure used by the receiver to maintain its selection, so modifying the array will not affect the receiver.
| |
| getTextRenderer | back to summary |
|---|---|
| pack-priv long getTextRenderer(long column) | |
| getTopIndex | back to summary |
|---|---|
| public int getTopIndex() Returns the zero-relative index of the item which is currently at the top of the receiver. This index can change when items are scrolled or new items are added or removed.
| |
| gtk_button_press_event | back to summary |
|---|---|
| pack-priv long gtk_button_press_event(long widget, long event) Overrides org.
| |
| gtk_button_release_event | back to summary |
|---|---|
| pack-priv long gtk_button_release_event(long widget, long event) Overrides org.
| |
| gtk_changed | back to summary |
|---|---|
| pack-priv long gtk_changed(long widget) Overrides org.
| |
| gtk_gesture_press_event | back to summary |
|---|---|
| pack-priv void gtk_gesture_press_event(long gesture, int n_press, double x, double y, long event) Overrides org. Doc from org. Handling multi-press event on GTK4
| |
| gtk_key_press_event | back to summary |
|---|---|
| pack-priv long gtk_key_press_event(long widget, long event) Overrides org.
| |
| gtk_row_activated | back to summary |
|---|---|
| pack-priv long gtk_row_activated(long tree, long path, long column) Overrides org.
| |
| hookEvents | back to summary |
|---|---|
| pack-priv void hookEvents() Overrides org.
| |
| indexOf | back to summary |
|---|---|
| public int indexOf(String string) Gets the index of an item. The list 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.
| |
| indexOf | back to summary |
|---|---|
| public int indexOf(String string, int start) Searches the receiver's list starting at the given, zero-relative index until an item is found that is equal to the argument, and returns the index of that item. If no item is found or the starting index is out of range, returns -1.
| |
| isSelected | back to summary |
|---|---|
| public boolean isSelected(int index) Returns
| |
| keyPressDefaultSelectionHandler | back to summary |
|---|---|
| pack-priv void keyPressDefaultSelectionHandler(long event, int key) Used to emulate DefaultSelection event. See Bug 312568.
| |
| paintWindow | back to summary |
|---|---|
| pack-priv long paintWindow() Overrides org.
| |
| register | back to summary |
|---|---|
| pack-priv void register() Overrides org.
| |
| releaseWidget | back to summary |
|---|---|
| pack-priv void releaseWidget() Overrides org.
| |
| remove | back to summary |
|---|---|
| public void remove(int index) Removes the item from the receiver at the given zero-relative index.
| |
| remove | back to summary |
|---|---|
| public void remove(int start, int end) Removes the items from the receiver which are between the given zero-relative start and end indices (inclusive).
| |
| remove | back to summary |
|---|---|
| public void remove(String string) Searches the receiver's list starting at the first item until an item is found that is equal to the argument, and removes that item from the list.
| |
| remove | back to summary |
|---|---|
| public void remove(int[] indices) Removes the items from the receiver at the given zero-relative indices.
| |
| removeAll | back to summary |
|---|---|
| public void removeAll() Removes all of the items from the receiver.
| |
| 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.
| |
| select | back to summary |
|---|---|
| public void select(int index) Selects the item at the given zero-relative index in the receiver's list. If the item at the index was already selected, it remains selected. Indices that are out of range are ignored.
| |
| select | back to summary |
|---|---|
| public void select(int start, int end) Selects the items in the range specified by the given zero-relative indices in the receiver. The range of indices is inclusive. The current selection is not cleared before the new items are selected. If an item in the given range is not selected, it is selected. If an item in the given range was already selected, it remains selected. Indices that are out of range are ignored and no items will be selected if start is greater than end. If the receiver is single-select and there is more than one item in the given range, then all indices are ignored.
| |
| select | back to summary |
|---|---|
| public void select(int[] indices) Selects the items at the given zero-relative indices in the receiver. The current selection is not cleared before the new items are selected. If the item at a given index is not selected, it is selected. If the item at a given index was already selected, it remains selected. Indices that are out of range and duplicate indices are ignored. If the receiver is single-select and multiple indices are specified, then all indices are ignored.
| |
| selectAll | back to summary |
|---|---|
| public void selectAll() Selects all of the items in the receiver. If the receiver is single-select, do nothing.
| |
| selectFocusIndex | back to summary |
|---|---|
| pack-priv void selectFocusIndex(int index) | |
| sendTreeDefaultSelection | back to summary |
|---|---|
| pack-priv void sendTreeDefaultSelection() Used to emulate DefaultSelection event. See Bug 312568. Feature in GTK. 'row-activation' event comes before DoubleClick event. This is causing the editor not to get focus after double-click. The solution is to manually send the DefaultSelection event after a double-click, and to emulate it for Space/Return. | |
| setBounds | back to summary |
|---|---|
| pack-priv int setBounds(int x, int y, int width, int height, boolean move, boolean resize) Overrides org.
| |
| setForegroundGdkRGBA | back to summary |
|---|---|
| pack-priv void setForegroundGdkRGBA(GdkRGBA rgba) Overrides org.
| |
| setItem | back to summary |
|---|---|
| public void setItem(int index, String string) Sets the text of the item in the receiver's list at the given zero-relative index to the string argument.
| |
| setItems | back to summary |
|---|---|
| public void setItems(String... items) Sets the receiver's items to be the given array of items.
| |
| setSelection | back to summary |
|---|---|
| public void setSelection(int index) Selects the item at the given zero-relative index in the receiver. If the item at the index was already selected, it remains selected. The current selection is first cleared, then the new item is selected, and if necessary the receiver is scrolled to make the new selection visible. Indices that are out of range are ignored.
| |
| setSelection | back to summary |
|---|---|
| public void setSelection(int start, int end) Selects the items in the range specified by the given zero-relative indices in the receiver. The range of indices is inclusive. The current selection is cleared before the new items are selected, and if necessary the receiver is scrolled to make the new selection visible. Indices that are out of range are ignored and no items will be selected if start is greater than end. If the receiver is single-select and there is more than one item in the given range, then all indices are ignored.
| |
| setSelection | back to summary |
|---|---|
| public void setSelection(int[] indices) Selects the items at the given zero-relative indices in the receiver. The current selection is cleared before the new items are selected, and if necessary the receiver is scrolled to make the new selection visible. Indices that are out of range and duplicate indices are ignored. If the receiver is single-select and multiple indices are specified, then all indices are ignored.
| |
| setSelection | back to summary |
|---|---|
| public void setSelection(String[] items) Sets the receiver's selection to be the given array of items. The current selection is cleared before the new items are selected, and if necessary the receiver is scrolled to make the new selection visible. Items that are not in the receiver are ignored. If the receiver is single-select and multiple items are specified, then all items are ignored.
| |
| setTopIndex | back to summary |
|---|---|
| public void setTopIndex(int index) Sets the zero-relative index of the item which is currently at the top of the receiver. This index can change when items are scrolled or new items are added and removed.
| |
| showSelection | back to summary |
|---|---|
| public void showSelection() Shows the selection. If the selection is already showing in the receiver, this method simply returns. Otherwise, the items are scrolled until the selection is visible.
| |