|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--org.eclipse.swt.widgets.Widget
|
+--org.eclipse.swt.widgets.Control
|
+--org.eclipse.swt.widgets.Scrollable
|
+--org.eclipse.swt.widgets.List
Instances of this class are user interface objects that contain selectable items, displaying a list of strings and issuing notifications when a string is selected. A List may be of type single or multi select.
Note: Only one of SINGLE, and MULTI may be specified.
IMPORTANT: This class is not intended to be subclassed.
| Field Summary | |
protected int |
style
|
| Fields inherited from class org.eclipse.swt.widgets.Widget |
h, INCMD_DISPOSE, INCMD_EXTKEY, INCMD_KEY, INCMD_LDOWN, INCMD_LUP, INCMD_MENU, INCMD_POS, UPDATEITEM_ENABLED, UPDATEITEM_NAME, w, x, y |
| Constructor Summary | |
List(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 | |
void |
add(String string)
Adds the argument to the end of the receiver's list. |
void |
add(String string,
int index)
Adds the argument to the specified position of the receiver's list. |
int |
getSelectionCount()
Returns the number of currently selected items. |
int[] |
getSelectionIndices()
Returns the zero-relative indices of the items which are currently selected in the receiver. |
| Methods inherited from class org.eclipse.swt.widgets.Scrollable |
getClientArea |
| Methods inherited from class org.eclipse.swt.widgets.Control |
computeSize, computeSize, getLayoutData, isFocusControl, pack, pack, setBackground, setBounds, setFocus, setLayoutData, setSize, setSize, update |
| Methods inherited from class org.eclipse.swt.widgets.Widget |
addListener, dispose, focusState, getBorderWidth, getDisplayArea, getSelection, getStyle, getText, isDisposed, removeListener, setBounds, setCursor, stop |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, toString |
| Methods inherited from interface org.eclipse.swt.graphics.Drawable |
drawLine, drawRect, drawText, setColor |
| Methods inherited from interface java.lang.Runnable |
run |
| Field Detail |
protected int style
| Constructor Detail |
public List(Composite parent,
int style)
The style value is either one of the style constants defined in
class SWT which is applicable to instances of this
class, or must be built by bitwise OR'ing together
(that is, using the int "|" operator) two or more
of those SWT style constants. The class description
lists the style constants that are applicable to the class.
Style bits are also inherited from superclasses.
parent - a composite control which will be the parent of the new instance (cannot be null)style - the style of control to construct
IllegalArgumentException - SWTException - SWT.SINGLE,
SWT.MULTI| Method Detail |
public void add(String string)
string - the new item
IllegalArgumentException - SWTError -
public void add(String string,
int index)
string - the new itemindex - the position, -1 specifies the end of the list
IllegalArgumentException - SWTError - public int getSelectionCount()
SWTError - public int[] getSelectionIndices()
Note: This is not the actual structure used by the receiver to maintain its selection, so modifying the array will not affect the receiver.
SWTError -
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||