Class DualList
- All Implemented Interfaces:
org.eclipse.swt.graphics.Drawable
public class DualList
extends org.eclipse.swt.widgets.Composite
- Styles:
- (none)
- Events:
- Selection
-
Field Summary
-
Constructor Summary
Constructors Constructor Description DualList(org.eclipse.swt.widgets.Composite parent, int style)Constructs a new instance of this class given its parent and a style value describing its behavior and appearance. -
Method Summary
Modifier and Type Method Description voidadd(DLItem item)Adds the argument to the end of the receiver's list.voidadd(DLItem item, int index)Adds the argument to the receiver's list at the given zero-relative index.voidaddSelectionChangeListener(SelectionChangeListener 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 theSelectionChangeListenerinterface.voidaddSelectionListener(org.eclipse.swt.events.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 theSelectionListenerinterface.voiddeselect(int index)Deselects the item at the given zero-relative index in the receiver.voiddeselect(int[] indices)Deselects the items at the given zero-relative indices in the receiver.voiddeselect(int start, int end)Deselects the items at the given zero-relative indices in the receiver.voiddeselectAll()Deselects all selected items in the receiver.voiddeselectAll(boolean shouldFireEvents)Deselects all selected items in the receiver.voiddeselectAllDoNotFireEvent()Deselects all selected items in the receiver.voiddeselectDoNotFireEvent(int index)Deselects the item at the given zero-relative index in the receiver.voiddeselectDoNotFireEvent(int[] indices)Deselects the items at the given zero-relative indices in the receiver.voiddeselectDoNotFireEvent(int start, int end)Deselects the items at the given zero-relative indices in the receiver.protected voiddeselectItem()Deselect a given itemDLConfigurationgetConfiguration()Returns the configuration of the receiver.DLItemgetItem(int index)Returns the item at the given, zero-relative index in the receiver.intgetItemCount()Returns the number of items contained in the receiver.DLItem[]getItems()Returns a (possibly empty) array ofDLItems which are the items in the receiver.java.util.List<DLItem>getItemsAsList()Returns a (possibly empty) list ofDLItems which are the items in the receiver.DLItem[]getSelection()Returns an array ofDLItems that are currently selected in the receiver.java.util.List<DLItem>getSelectionAsList()Returns a list ofDLItems that are currently selected in the receiver.intgetSelectionCount()Returns the number of selected items contained in the receiver.protected voidmoveDownItem()Move the selected item downprotected voidmoveSelectionToFirstPosition()Move the selected item to the first positionprotected voidmoveSelectionToLastPosition()Move the selected item to the last positionprotected voidmoveUpItem()Move the selected item upvoidremove(int index)Removes the item from the receiver at the given zero-relative index.voidremove(int[] indices)Removes the items from the receiver at the given zero-relative indices.voidremove(int start, int end)Removes the items from the receiver which are between the given zero-relative start and end indices (inclusive).voidremove(DLItem item)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.voidremoveAll()Removes all of the items from the receiver.voidremoveSelectionChangeListener(SelectionChangeListener listener)Removes the listener from the collection of listeners who will be notified when the user changes the receiver's selection.voidremoveSelectionListener(org.eclipse.swt.events.SelectionListener listener)Removes the listener from the collection of listeners who will be notified when the user changes the receiver's selection.voidselect(int index)Selects the item at the given zero-relative index in the receiver's list.voidselect(int[] indices)Selects the items at the given zero-relative indices in the receiver.voidselect(int start, int end)Selects the items in the range specified by the given zero-relative indices in the receiver.voidselectAll()Selects all of the items in the receiver.voidselectAllDoNotFireEvent()Selects all of the items in the receiver.voidselectDoNotFireEvent(int index)Selects the item at the given zero-relative index in the receiver's list.voidselectDoNotFireEvent(int[] indices)Selects the items at the given zero-relative indices in the receiver.voidselectDoNotFireEvent(int start, int end)Selects the items in the range specified by the given zero-relative indices in the receiver.protected voidselectItem()Select a given itemvoidsetBounds(int x, int y, int width, int height)voidsetConfiguration(DLConfiguration configuration)Sets the receiver's configurationvoidsetItem(int index, DLItem item)Sets the item in the receiver's list at the given zero-relative index to the item argument.voidsetItems(java.util.List<DLItem> items)Sets the receiver's items to be the given list of items.voidsetItems(DLItem[] items)Sets the receiver's items to be the given array of items.Methods inherited from class org.eclipse.swt.widgets.Composite
changed, checkSubclass, drawBackground, getBackgroundMode, getChildren, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, layout, setBackgroundMode, setFocus, setLayout, setLayoutDeferred, setTabList, toStringMethods inherited from class org.eclipse.swt.widgets.Scrollable
computeTrim, getClientArea, getHorizontalBar, getScrollbarsMode, getVerticalBarMethods inherited from class org.eclipse.swt.widgets.Control
addControlListener, addDragDetectListener, addFocusListener, addGestureListener, addHelpListener, addKeyListener, addMenuDetectListener, addMouseListener, addMouseMoveListener, addMouseTrackListener, addMouseWheelListener, addPaintListener, addTouchListener, addTraverseListener, computeSize, computeSize, dragDetect, dragDetect, forceFocus, getAccessible, getBackground, getBackgroundImage, getBorderWidth, getBounds, getCursor, getDragDetect, getEnabled, getFont, getForeground, getLayoutData, getLocation, getMenu, getMonitor, getOrientation, getParent, getRegion, getShell, getSize, getTextDirection, getToolTipText, getTouchEnabled, getVisible, internal_dispose_GC, internal_new_GC, isEnabled, isFocusControl, isReparentable, isVisible, moveAbove, moveBelow, pack, pack, print, redraw, redraw, removeControlListener, removeDragDetectListener, removeFocusListener, removeGestureListener, removeHelpListener, removeKeyListener, removeMenuDetectListener, removeMouseListener, removeMouseMoveListener, removeMouseTrackListener, removeMouseWheelListener, removePaintListener, removeTouchListener, removeTraverseListener, requestLayout, setBackground, setBackgroundImage, setBounds, setCapture, setCursor, setDragDetect, setEnabled, setFont, setForeground, setLayoutData, setLocation, setLocation, setMenu, setOrientation, setParent, setRedraw, setRegion, setSize, setSize, setTextDirection, setToolTipText, setTouchEnabled, setVisible, toControl, toControl, toDisplay, toDisplay, traverse, traverse, traverse, updateMethods inherited from class org.eclipse.swt.widgets.Widget
addDisposeListener, addListener, checkWidget, dispose, getData, getData, getDisplay, getListeners, getStyle, isAutoDirection, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, reskin, setData, setData
-
Constructor Details
-
DualList
public DualList(org.eclipse.swt.widgets.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
SWTwhich 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 thoseSWTstyle 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:
java.lang.IllegalArgumentException-- ERROR_NULL_ARGUMENT - if the parent is null
org.eclipse.swt.SWTException-- ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the parent
-
-
Method Details
-
add
Adds the argument to the end of the receiver's list.- Parameters:
item- the new item- Throws:
java.lang.IllegalArgumentException-- ERROR_NULL_ARGUMENT - if the item is null
org.eclipse.swt.SWTException-- ERROR_WIDGET_DISPOSED - if the receiver has been disposed
- ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
- See Also:
add(DLItem,int)
-
add
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
getItemCount()as the index or useadd(DLItem).- Parameters:
item- the new itemindex- the index for the item- Throws:
java.lang.IllegalArgumentException-- ERROR_NULL_ARGUMENT - if the item is null
- ERROR_INVALID_RANGE - if the index is not between 0 and the number of elements in the list (inclusive)
org.eclipse.swt.SWTException-- ERROR_WIDGET_DISPOSED - if the receiver has been disposed
- ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
- See Also:
#add(String)
-
addSelectionListener
public void addSelectionListener(org.eclipse.swt.events.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 theSelectionListenerinterface.- Parameters:
listener- the listener which should be notified- Throws:
java.lang.IllegalArgumentException-- ERROR_NULL_ARGUMENT - if the listener is null
org.eclipse.swt.SWTException-- ERROR_WIDGET_DISPOSED - if the receiver has been disposed
- ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
- See Also:
SelectionListener,removeSelectionListener(org.eclipse.swt.events.SelectionListener),SelectionEvent
-
removeSelectionListener
public void removeSelectionListener(org.eclipse.swt.events.SelectionListener listener)Removes the listener from the collection of listeners who will be notified when the user changes the receiver's selection.- Parameters:
listener- the listener which should no longer be notified- Throws:
java.lang.IllegalArgumentException-- ERROR_NULL_ARGUMENT - if the listener is null
org.eclipse.swt.SWTException-- ERROR_WIDGET_DISPOSED - if the receiver has been disposed
- ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
- See Also:
SelectionListener,addSelectionListener(org.eclipse.swt.events.SelectionListener)
-
addSelectionChangeListener
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 theSelectionChangeListenerinterface.- Parameters:
listener- the listener which should be notified- Throws:
java.lang.IllegalArgumentException-- ERROR_NULL_ARGUMENT - if the listener is null
org.eclipse.swt.SWTException-- ERROR_WIDGET_DISPOSED - if the receiver has been disposed
- ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
- See Also:
SelectionChangeListener,removeSelectionChangeListener(org.eclipse.nebula.widgets.opal.duallist.SelectionChangeListener),SelectionChangeEvent
-
removeSelectionChangeListener
Removes the listener from the collection of listeners who will be notified when the user changes the receiver's selection.- Parameters:
listener- the listener which should no longer be notified- Throws:
java.lang.IllegalArgumentException-- ERROR_NULL_ARGUMENT - if the listener is null
org.eclipse.swt.SWTException-- ERROR_WIDGET_DISPOSED - if the receiver has been disposed
- ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
- See Also:
SelectionChangeListener,addSelectionChangeListener(org.eclipse.nebula.widgets.opal.duallist.SelectionChangeListener)
-
deselect
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.- Parameters:
index- the index of the item to deselect- Throws:
org.eclipse.swt.SWTException-- ERROR_WIDGET_DISPOSED - if the receiver has been disposed
- ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
-
deselectDoNotFireEvent
public void deselectDoNotFireEvent(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.- Parameters:
index- the index of the item to deselect- Throws:
org.eclipse.swt.SWTException-- ERROR_WIDGET_DISPOSED - if the receiver has been disposed
- ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
-
deselect
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.- Parameters:
indices- the array of indices for the items to deselect- Throws:
java.lang.IllegalArgumentException-- ERROR_NULL_ARGUMENT - if the set of indices is null
org.eclipse.swt.SWTException-- ERROR_WIDGET_DISPOSED - if the receiver has been disposed
- ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
-
deselectDoNotFireEvent
public void deselectDoNotFireEvent(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.- Parameters:
indices- the array of indices for the items to deselect- Throws:
java.lang.IllegalArgumentException-- ERROR_NULL_ARGUMENT - if the set of indices is null
org.eclipse.swt.SWTException-- ERROR_WIDGET_DISPOSED - if the receiver has been disposed
- ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
-
deselect
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.- Parameters:
start- the start index of the items to deselectend- the end index of the items to deselect- Throws:
java.lang.IllegalArgumentException-- ERROR_INVALID_RANGE - if start is greater than end
org.eclipse.swt.SWTException-- ERROR_WIDGET_DISPOSED - if the receiver has been disposed
- ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
-
deselectDoNotFireEvent
public void deselectDoNotFireEvent(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.- Parameters:
start- the start index of the items to deselectend- the end index of the items to deselect- Throws:
java.lang.IllegalArgumentException-- ERROR_INVALID_RANGE - if start is greater than end
org.eclipse.swt.SWTException-- ERROR_WIDGET_DISPOSED - if the receiver has been disposed
- ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
-
deselectAll
public void deselectAll()Deselects all selected items in the receiver.- Throws:
org.eclipse.swt.SWTException-- ERROR_WIDGET_DISPOSED - if the receiver has been disposed
- ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
-
deselectAllDoNotFireEvent
public void deselectAllDoNotFireEvent()Deselects all selected items in the receiver.- Throws:
org.eclipse.swt.SWTException-- ERROR_WIDGET_DISPOSED - if the receiver has been disposed
- ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
-
deselectAll
public void deselectAll(boolean shouldFireEvents)Deselects all selected items in the receiver.- Throws:
org.eclipse.swt.SWTException-- ERROR_WIDGET_DISPOSED - if the receiver has been disposed
- ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
-
getItem
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:
java.lang.IllegalArgumentException-- ERROR_INVALID_RANGE - if the index is not between 0 and the number of elements in the list minus 1 (inclusive)
org.eclipse.swt.SWTException-- ERROR_WIDGET_DISPOSED - if the receiver has been disposed
- ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
-
getItemCount
public int getItemCount()Returns the number of items contained in the receiver.- Returns:
- the number of items
- Throws:
org.eclipse.swt.SWTException-- ERROR_WIDGET_DISPOSED - if the receiver has been disposed
- ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
-
getItems
Returns a (possibly empty) array ofDLItems which are the items in 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 items in the receiver's list
- Throws:
org.eclipse.swt.SWTException-- ERROR_WIDGET_DISPOSED - if the receiver has been disposed
- ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
-
getItemsAsList
Returns a (possibly empty) list ofDLItems which are the items in 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 items in the receiver's list
- Throws:
org.eclipse.swt.SWTException-- ERROR_WIDGET_DISPOSED - if the receiver has been disposed
- ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
-
getSelection
Returns an array ofDLItems that are currently selected in the receiver. An empty array indicates that 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.
- Returns:
- an array representing the selection
- Throws:
org.eclipse.swt.SWTException-- ERROR_WIDGET_DISPOSED - if the receiver has been disposed
- ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
-
getSelectionAsList
Returns a list ofDLItems that are currently selected in the receiver. An empty array indicates that 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.
- Returns:
- an array representing the selection
- Throws:
org.eclipse.swt.SWTException-- ERROR_WIDGET_DISPOSED - if the receiver has been disposed
- ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
-
getSelectionCount
public int getSelectionCount()Returns the number of selected items contained in the receiver.- Returns:
- the number of selected items
- Throws:
org.eclipse.swt.SWTException-- ERROR_WIDGET_DISPOSED - if the receiver has been disposed
- ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
-
remove
public void remove(int index)Removes the item from the receiver at the given zero-relative index.- Parameters:
index- the index for the item- Throws:
java.lang.IllegalArgumentException-- ERROR_INVALID_RANGE - if the index is not between 0 and the number of elements in the list minus 1 (inclusive)
org.eclipse.swt.SWTException-- ERROR_WIDGET_DISPOSED - if the receiver has been disposed
- ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
-
remove
public void remove(int[] indices)Removes the items from the receiver at the given zero-relative indices.- Parameters:
indices- the array of indices of the items- Throws:
java.lang.IllegalArgumentException-- ERROR_INVALID_RANGE - if the index is not between 0 and the number of elements in the list minus 1 (inclusive)
- ERROR_NULL_ARGUMENT - if the indices array is null
org.eclipse.swt.SWTException-- ERROR_WIDGET_DISPOSED - if the receiver has been disposed
- ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
-
remove
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).- Parameters:
start- the start of the rangeend- the end of the range- Throws:
java.lang.IllegalArgumentException-- ERROR_INVALID_RANGE - if either the start or end are not between 0 and the number of elements in the list minus 1 (inclusive) or if start>end
org.eclipse.swt.SWTException-- ERROR_WIDGET_DISPOSED - if the receiver has been disposed
- ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
-
remove
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.- Parameters:
item- the item to remove- Throws:
java.lang.IllegalArgumentException-- ERROR_NULL_ARGUMENT - if the item is null
- ERROR_INVALID_ARGUMENT - if the item is not found in the list
org.eclipse.swt.SWTException-- ERROR_WIDGET_DISPOSED - if the receiver has been disposed
- ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
-
removeAll
public void removeAll()Removes all of the items from the receiver.- Throws:
org.eclipse.swt.SWTException-- ERROR_WIDGET_DISPOSED - if the receiver has been disposed
- ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
-
select
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.- Parameters:
index- the index of the item to select- Throws:
org.eclipse.swt.SWTException-- ERROR_WIDGET_DISPOSED - if the receiver has been disposed
- ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
-
selectDoNotFireEvent
public void selectDoNotFireEvent(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.- Parameters:
index- the index of the item to select- Throws:
org.eclipse.swt.SWTException-- ERROR_WIDGET_DISPOSED - if the receiver has been disposed
- ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
-
select
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.
- Parameters:
indices- the array of indices for the items to select- Throws:
java.lang.IllegalArgumentException-- ERROR_NULL_ARGUMENT - if the array of indices is null
org.eclipse.swt.SWTException-- ERROR_WIDGET_DISPOSED - if the receiver has been disposed
- ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
-
selectDoNotFireEvent
public void selectDoNotFireEvent(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.
- Parameters:
indices- the array of indices for the items to select- Throws:
java.lang.IllegalArgumentException-- ERROR_NULL_ARGUMENT - if the array of indices is null
org.eclipse.swt.SWTException-- ERROR_WIDGET_DISPOSED - if the receiver has been disposed
- ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
-
select
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.
- Parameters:
start- the start of the rangeend- the end of the range- Throws:
org.eclipse.swt.SWTException-- ERROR_WIDGET_DISPOSED - if the receiver has been disposed
- ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
- See Also:
List#setSelection(int,int)
-
selectDoNotFireEvent
public void selectDoNotFireEvent(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.
- Parameters:
start- the start of the rangeend- the end of the range- Throws:
org.eclipse.swt.SWTException-- ERROR_WIDGET_DISPOSED - if the receiver has been disposed
- ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
- See Also:
List#setSelection(int,int)
-
selectAll
public void selectAll()Selects all of the items in the receiver.If the receiver is single-select, do nothing.
- Throws:
org.eclipse.swt.SWTException-- ERROR_WIDGET_DISPOSED - if the receiver has been disposed
- ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
-
selectAllDoNotFireEvent
public void selectAllDoNotFireEvent()Selects all of the items in the receiver.If the receiver is single-select, do nothing.
- Throws:
org.eclipse.swt.SWTException-- ERROR_WIDGET_DISPOSED - if the receiver has been disposed
- ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
-
setBounds
public void setBounds(int x, int y, int width, int height)- Overrides:
setBoundsin classorg.eclipse.swt.widgets.Control- See Also:
Control.setBounds(int, int, int, int)
-
setItem
Sets the item in the receiver's list at the given zero-relative index to the item argument.- Parameters:
index- the index for the itemitem- the new item- Throws:
java.lang.IllegalArgumentException-- ERROR_INVALID_RANGE - if the index is not between 0 and the number of elements in the list minus 1 (inclusive)
- ERROR_NULL_ARGUMENT - if the item is null
org.eclipse.swt.SWTException-- ERROR_WIDGET_DISPOSED - if the receiver has been disposed
- ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
-
setItems
Sets the receiver's items to be the given array of items.- Parameters:
items- the array of items- Throws:
java.lang.IllegalArgumentException-- ERROR_NULL_ARGUMENT - if the items array is null
- ERROR_INVALID_ARGUMENT - if an item in the items array is null
org.eclipse.swt.SWTException-- ERROR_WIDGET_DISPOSED - if the receiver has been disposed
- ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
-
setItems
Sets the receiver's items to be the given list of items.- Parameters:
items- the list of items- Throws:
java.lang.IllegalArgumentException-- ERROR_NULL_ARGUMENT - if the items list is null
- ERROR_INVALID_ARGUMENT - if an item in the items list is null
org.eclipse.swt.SWTException-- ERROR_WIDGET_DISPOSED - if the receiver has been disposed
- ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
-
moveSelectionToFirstPosition
protected void moveSelectionToFirstPosition()Move the selected item to the first position -
selectItem
protected void selectItem()Select a given item -
moveUpItem
protected void moveUpItem()Move the selected item up -
deselectItem
protected void deselectItem()Deselect a given item -
moveDownItem
protected void moveDownItem()Move the selected item down -
moveSelectionToLastPosition
protected void moveSelectionToLastPosition()Move the selected item to the last position -
getConfiguration
Returns the configuration of the receiver.- Returns:
- the current configuration of the receiver
- Throws:
org.eclipse.swt.SWTException-- ERROR_WIDGET_DISPOSED - if the receiver has been disposed
- ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
-
setConfiguration
Sets the receiver's configuration- Parameters:
configuration- the new configuration- Throws:
org.eclipse.swt.SWTException-- ERROR_WIDGET_DISPOSED - if the receiver has been disposed
- ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
-