|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectwicket.markup.html.form.model.ChoiceList
Simple choice list backed by an ArrayList. This class implements
IChoiceListso that it is easier to
create subclasses and anonymous implementations.
| Nested Class Summary | |
protected class |
ChoiceList.Choice
Implementation of IChoice for simple objects. |
| Constructor Summary | |
ChoiceList()
Constructor |
|
ChoiceList(java.util.Collection choices)
Constructor |
|
ChoiceList(int initialCapacity)
Constructor |
|
| Method Summary | |
void |
add(java.lang.Object object)
|
void |
addAll(java.util.Collection collection)
Add all the elements from a collection to this choice list |
void |
attach()
Attaches model for use. |
IChoice |
choiceForId(java.lang.String id)
Gets an choice by id |
IChoice |
choiceForObject(java.lang.Object object)
|
void |
clear()
Clears this list |
void |
detach()
Detaches model after use. |
IChoice |
get(int index)
|
java.util.List |
getList()
|
protected IChoice |
newChoice(java.lang.Object object,
int index)
IChoice factory method |
int |
size()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ChoiceList()
public ChoiceList(java.util.Collection choices)
choices - Choices to add to this listpublic ChoiceList(int initialCapacity)
initialCapacity - Initial capacity of list| Method Detail |
public void add(java.lang.Object object)
object - Object to add to listpublic void addAll(java.util.Collection collection)
collection - The collectionpublic void attach()
IChoiceList
attach in interface IChoiceListIChoiceList.attach()public IChoice choiceForId(java.lang.String id)
IChoiceList
choiceForId in interface IChoiceListid - The choice's id
IChoiceList.choiceForId(java.lang.String)public IChoice choiceForObject(java.lang.Object object)
choiceForObject in interface IChoiceListobject - The object to find
IChoiceList.choiceForObject(java.lang.Object)public void clear()
public void detach()
IDetachable
detach in interface IDetachableIDetachable.detach()public IChoice get(int index)
get in interface IChoiceListindex - The index of the choice to get
IChoiceList.get(int)public java.util.List getList()
public int size()
size in interface IChoiceListIChoiceList.size()
protected IChoice newChoice(java.lang.Object object,
int index)
object - Choice objectindex - Index of choice
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||