|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.zkoss.zul.AbstractListModel
org.zkoss.zul.ListModelList
public class ListModelList
This is the ListModel as a List to be used with Listbox.
Add or remove the contents of this model as a List would cause the associated Listbox to change accordingly.
ListModel,
ListModelList,
ListModelMap,
Serialized Form| Field Summary | |
|---|---|
protected java.util.List |
_list
|
| Constructor Summary | |
|---|---|
ListModelList()
Constructor. |
|
ListModelList(java.util.Collection c)
Constructor. |
|
ListModelList(int initialCapacity)
Constructor. |
|
ListModelList(java.util.List list,
boolean live)
Constructor |
|
ListModelList(java.lang.Object[] array)
Constructor. |
|
| Method Summary | |
|---|---|
void |
add(int index,
java.lang.Object element)
|
boolean |
add(java.lang.Object o)
|
boolean |
addAll(java.util.Collection c)
|
boolean |
addAll(int index,
java.util.Collection c)
|
void |
clear()
|
boolean |
contains(java.lang.Object elem)
|
boolean |
containsAll(java.util.Collection c)
|
boolean |
equals(java.lang.Object o)
|
java.lang.Object |
get(int index)
|
java.lang.Object |
getElementAt(int j)
Returns the value at the specified index. |
java.util.List |
getInnerList()
Get the inner real List. |
int |
getSize()
Returns the length of the list. |
int |
hashCode()
|
int |
indexOf(java.lang.Object elem)
|
static ListModelList |
instance(java.util.List list)
Deprecated. |
boolean |
isEmpty()
|
java.util.Iterator |
iterator()
|
int |
lastIndexOf(java.lang.Object elem)
|
java.util.ListIterator |
listIterator()
|
java.util.ListIterator |
listIterator(int index)
|
java.lang.Object |
remove(int index)
|
boolean |
remove(java.lang.Object o)
|
boolean |
removeAll(java.util.Collection c)
|
void |
removeRange(int fromIndex,
int toIndex)
Remove from fromIndex(inclusive) to toIndex(exclusive). |
boolean |
retainAll(java.util.Collection c)
|
java.lang.Object |
set(int index,
java.lang.Object element)
|
int |
size()
|
void |
sort(java.util.Comparator cmpr,
boolean ascending)
Sorts the data. |
java.util.List |
subList(int fromIndex,
int toIndex)
|
java.lang.Object[] |
toArray()
|
java.lang.Object[] |
toArray(java.lang.Object[] a)
|
java.lang.String |
toString()
|
| Methods inherited from class org.zkoss.zul.AbstractListModel |
|---|
addListDataListener, fireEvent, removeListDataListener |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected java.util.List _list
| Constructor Detail |
|---|
public ListModelList(java.util.List list,
boolean live)
list - the list to representlive - whether to have a 'live' ListModel on top of
the specified list.
If false, the content of the specified list is copied.
If true, this object is a 'facade' of the specified list,
i.e., when you add or remove items from this ListModelList,
the inner "live" list would be changed accordingly.
However, it is not a good idea to modify list
if it is passed to this method with live is true,
since Listbox is not smart enough to hanle it.
Instead, modify it thru this object.public ListModelList()
public ListModelList(java.util.Collection c)
public ListModelList(java.lang.Object[] array)
public ListModelList(int initialCapacity)
initialCapacity - the initial capacity for this ListModelList.| Method Detail |
|---|
public static ListModelList instance(java.util.List list)
It is deprecated. Use ListModelList(List,boolean) instead.
list - the inner List storage
public void removeRange(int fromIndex,
int toIndex)
fromIndex - the begin index (inclusive) to be removed.toIndex - the end index (exclusive) to be removed.public java.util.List getInnerList()
public int getSize()
ListModel
getSize in interface ListModelpublic java.lang.Object getElementAt(int j)
ListModel
getElementAt in interface ListModel
public void add(int index,
java.lang.Object element)
add in interface java.util.Listpublic boolean add(java.lang.Object o)
add in interface java.util.Collectionadd in interface java.util.Listpublic boolean addAll(java.util.Collection c)
addAll in interface java.util.CollectionaddAll in interface java.util.List
public boolean addAll(int index,
java.util.Collection c)
addAll in interface java.util.Listpublic void clear()
clear in interface java.util.Collectionclear in interface java.util.Listpublic boolean contains(java.lang.Object elem)
contains in interface java.util.Collectioncontains in interface java.util.Listpublic boolean containsAll(java.util.Collection c)
containsAll in interface java.util.CollectioncontainsAll in interface java.util.Listpublic boolean equals(java.lang.Object o)
equals in interface java.util.Collectionequals in interface java.util.Listequals in class java.lang.Objectpublic java.lang.Object get(int index)
get in interface java.util.Listpublic int hashCode()
hashCode in interface java.util.CollectionhashCode in interface java.util.ListhashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic int indexOf(java.lang.Object elem)
indexOf in interface java.util.Listpublic boolean isEmpty()
isEmpty in interface java.util.CollectionisEmpty in interface java.util.Listpublic java.util.Iterator iterator()
iterator in interface java.lang.Iterableiterator in interface java.util.Collectioniterator in interface java.util.Listpublic int lastIndexOf(java.lang.Object elem)
lastIndexOf in interface java.util.Listpublic java.util.ListIterator listIterator()
listIterator in interface java.util.Listpublic java.util.ListIterator listIterator(int index)
listIterator in interface java.util.Listpublic java.lang.Object remove(int index)
remove in interface java.util.Listpublic boolean remove(java.lang.Object o)
remove in interface java.util.Collectionremove in interface java.util.Listpublic boolean removeAll(java.util.Collection c)
removeAll in interface java.util.CollectionremoveAll in interface java.util.Listpublic boolean retainAll(java.util.Collection c)
retainAll in interface java.util.CollectionretainAll in interface java.util.List
public java.lang.Object set(int index,
java.lang.Object element)
set in interface java.util.Listpublic int size()
size in interface java.util.Collectionsize in interface java.util.List
public java.util.List subList(int fromIndex,
int toIndex)
subList in interface java.util.Listpublic java.lang.Object[] toArray()
toArray in interface java.util.CollectiontoArray in interface java.util.Listpublic java.lang.Object[] toArray(java.lang.Object[] a)
toArray in interface java.util.CollectiontoArray in interface java.util.List
public void sort(java.util.Comparator cmpr,
boolean ascending)
sort in interface ListModelExtcmpr - the comparator.ascending - whether to sort in the ascending order.
It is ignored since this implementation uses cmprt to compare.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||