|
WUI : API |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.westofj.wui.Widget org.westofj.wui.WList
Implements base functionality for user selection of a single value from a list of values.
The wui framework provides multiple concrete implementations of this class including
WSelectList
and WRadioList
.
Constructor Summary | |
WList()
Constructs an empty single selection list. |
|
WList(List options)
Constructs a single selection list with the specified options. |
|
WList(Object[] options)
Constructs a single selection list with the specified options. |
Method Summary | |
void |
clearSelection()
Clears the current selection. |
List |
getOptions()
Returns the selectable options. |
int |
getSelectedIndex()
Returns the index in the list of options of the currently selected value. |
Object |
getSelectedValue()
Returns the currently selected value. |
boolean |
isSelectedIndex(int selectedIndex)
Returns true if the specified index is the selected index, false otherwise. |
void |
setOptions(List options)
Sets the options for the list. |
void |
setOptions(Object[] options)
Sets the options for the list. |
void |
setSelectedIndex(int selectedIndex)
Sets the selected value to the value at the specified index. |
void |
setSelectedValue(Object value)
Sets the selected value to the specified value. |
Methods inherited from class org.westofj.wui.Widget |
addChangeListener, getRunner, handleNoParams, handleParams, hasChangeListeners, removeChangeListener, render, stateChanged |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public WList()
public WList(List options)
options
- the selectable options.public WList(Object[] options)
options
- the selectable options.Method Detail |
public void clearSelection()
public List getOptions()
public int getSelectedIndex()
public Object getSelectedValue()
public boolean isSelectedIndex(int selectedIndex)
selectedIndex
- the index to test.
public void setOptions(List options)
options
- the selectable options.public void setOptions(Object[] options)
options
- the selectable options.public void setSelectedIndex(int selectedIndex)
selectedIndex
- the selected index.public void setSelectedValue(Object value)
value
- the selected value.
|
Copyright (c) 2003 West of J - All rights reserved. | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |