|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.iplanet.jato.view.html.OptionList
The OptionList encapsulates a collection of Option items for use by SelectableGroup sub-types.
See the documentation for SelectableGroup
for details
on the SelectableGroup/OptionsList design pattern.
Option
,
SelectableGroup
,
RadioButtonGroup
,
ListBox
,
ComboBox
Constructor Summary | |
OptionList()
Default constructor |
|
OptionList(Option[] options)
|
|
OptionList(java.lang.String[] labels,
java.lang.String[] values)
|
Method Summary | |
void |
add(int index,
Option option)
|
void |
add(int index,
java.lang.String label,
java.lang.String value)
Adds an Option with a corresponding label and value |
void |
add(Option option)
|
void |
add(java.lang.String label,
java.lang.String value)
Adds an Option with a corresponding label and value |
void |
clear()
Clears the list of all previously stored Options |
Option |
get(int index)
Returns the object at the specified index |
protected java.util.List |
getOptions()
Returns the List of Options |
java.lang.String |
getValue(int index)
Retreives the value of the option at the specified index label |
int |
getValueIndex(java.lang.String value)
Searches for the specified value and, if found, returns its index |
java.lang.String |
getValueLabel(java.lang.String value)
Searches for the specified value and, if found, returns the associated label |
boolean |
hasValue(java.lang.String value)
Determines if the specified value exists in the option list |
void |
populate(RequestContext requestContext)
Directs this object to replace its current collection of Options with a new collection. |
void |
set(int index,
Option option)
Sets the Options object at the specified index |
protected void |
setOptions(java.util.List value)
Sets the list of Options. |
void |
setOptions(Option[] options)
Sets the list of Options. |
void |
setOptions(java.lang.String[] labels,
java.lang.String[] values)
Sets the internal list of Options to the reflect the paired arrays of labels and values. |
int |
size()
Returns the number of Option objects currently in the list |
java.lang.Object[] |
toArray()
Returns the collection of Options as an Option array |
java.lang.Object[] |
toArray(java.lang.Object[] arrayType)
Returns the collection of Options as an Option array |
Option[] |
toOptionArray()
Returns the collection of Options as an Option array |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public OptionList()
public OptionList(Option[] options)
public OptionList(java.lang.String[] labels, java.lang.String[] values)
Method Detail |
protected java.util.List getOptions()
protected void setOptions(java.util.List value)
public void setOptions(Option[] options)
public void setOptions(java.lang.String[] labels, java.lang.String[] values)
labels
- Array of option labelsvaluex
- Array of value labelspublic void add(Option option)
public void add(java.lang.String label, java.lang.String value)
label
- Label for optionvalue
- Value for optionpublic void add(int index, java.lang.String label, java.lang.String value)
label
- Label for optionvalue
- Value for optionpublic void add(int index, Option option)
public void clear()
public Option get(int index)
public void set(int index, Option option)
index
- The index at thich to set the Option objectoption
- The Option object to setpublic int size()
public java.lang.Object[] toArray()
public java.lang.Object[] toArray(java.lang.Object[] arrayType)
public Option[] toOptionArray()
public void populate(RequestContext requestContext)
requestContext
- The RequestContext is made available to the OptionList so that
it can draw on all of the RequestContext's run time resources
(if necessary) in order to fetch a new set of options. Note,
implementations of this method are not required to make use
of the RequestContext. It is merely provided as a helpful
resource.public int getValueIndex(java.lang.String value)
value
- The value to search for in the option listhasValue(String)
public boolean hasValue(java.lang.String value)
value
- The value to search for in the option listgetValueIndex(String)
public java.lang.String getValueLabel(java.lang.String value)
value
- The value to search for in the option listgetValueIndex(String)
public java.lang.String getValue(int index)
index
- The index of the optiongetValueLabel(String)
,
getValueIndex(String)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |