|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.zkoss.zul.AbstractListModel<E>
org.zkoss.zul.ListModelList<E>
public class ListModelList<E>
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.
For more information, please refer to ZK Developer's Reference: List Model
ListModel,
ListModelList,
ListModelMap,
Serialized Form| Field Summary | |
|---|---|
protected java.util.List<E> |
_list
|
| Constructor Summary | |
|---|---|
ListModelList()
Constructor. |
|
ListModelList(java.util.Collection<? extends E> c)
Constructor. |
|
ListModelList(E[] array)
Constructor. |
|
ListModelList(int initialCapacity)
Constructor. |
|
ListModelList(java.util.List<E> list,
boolean live)
Constructor |
|
| Method Summary | ||
|---|---|---|
boolean |
add(E o)
|
|
void |
add(int index,
E element)
|
|
boolean |
addAll(java.util.Collection<? extends E> c)
|
|
boolean |
addAll(int index,
java.util.Collection<? extends E> c)
|
|
void |
clear()
|
|
boolean |
contains(java.lang.Object elem)
|
|
boolean |
containsAll(java.util.Collection<?> c)
|
|
boolean |
equals(java.lang.Object o)
|
|
E |
get(int index)
|
|
E |
getElementAt(int j)
Returns the value at the specified index. |
|
java.util.List<E> |
getInnerList()
Get the inner real List. |
|
int |
getSize()
Returns the length of the list. |
|
int |
hashCode()
|
|
int |
indexOf(java.lang.Object elem)
|
|
boolean |
isEmpty()
|
|
java.util.Iterator<E> |
iterator()
|
|
int |
lastIndexOf(java.lang.Object elem)
|
|
java.util.ListIterator<E> |
listIterator()
|
|
java.util.ListIterator<E> |
listIterator(int index)
|
|
E |
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)
|
|
E |
set(int index,
E element)
|
|
int |
size()
|
|
void |
sort(java.util.Comparator<E> cmpr,
boolean ascending)
Sorts the data. |
|
java.util.List<E> |
subList(int fromIndex,
int toIndex)
|
|
java.lang.Object[] |
toArray()
|
|
|
toArray(T[] a)
|
|
java.lang.String |
toString()
|
|
| Methods inherited from class org.zkoss.zul.AbstractListModel |
|---|
addListDataListener, addSelection, clearSelection, fireEvent, getSelection, removeAllSelection, removeListDataListener, removeSelection, retainAllSelection |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected java.util.List<E> _list
| Constructor Detail |
|---|
public ListModelList(java.util.List<E> 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<? extends E> c)
public ListModelList(E[] array)
public ListModelList(int initialCapacity)
initialCapacity - the initial capacity for this ListModelList.| Method Detail |
|---|
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<E> getInnerList()
public int getSize()
ListModel
getSize in interface ListModel<E>public E getElementAt(int j)
ListModel
getElementAt in interface ListModel<E>
public void add(int index,
E element)
add in interface java.util.List<E>public boolean add(E o)
add in interface java.util.Collection<E>add in interface java.util.List<E>public boolean addAll(java.util.Collection<? extends E> c)
addAll in interface java.util.Collection<E>addAll in interface java.util.List<E>
public boolean addAll(int index,
java.util.Collection<? extends E> c)
addAll in interface java.util.List<E>public void clear()
clear in interface java.util.Collection<E>clear in interface java.util.List<E>public boolean contains(java.lang.Object elem)
contains in interface java.util.Collection<E>contains in interface java.util.List<E>public boolean containsAll(java.util.Collection<?> c)
containsAll in interface java.util.Collection<E>containsAll in interface java.util.List<E>public boolean equals(java.lang.Object o)
equals in interface java.util.Collection<E>equals in interface java.util.List<E>equals in class java.lang.Objectpublic E get(int index)
get in interface java.util.List<E>public int hashCode()
hashCode in interface java.util.Collection<E>hashCode in interface java.util.List<E>hashCode 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.List<E>public boolean isEmpty()
isEmpty in interface java.util.Collection<E>isEmpty in interface java.util.List<E>public java.util.Iterator<E> iterator()
iterator in interface java.lang.Iterable<E>iterator in interface java.util.Collection<E>iterator in interface java.util.List<E>public int lastIndexOf(java.lang.Object elem)
lastIndexOf in interface java.util.List<E>public java.util.ListIterator<E> listIterator()
listIterator in interface java.util.List<E>public java.util.ListIterator<E> listIterator(int index)
listIterator in interface java.util.List<E>public E remove(int index)
remove in interface java.util.List<E>public boolean remove(java.lang.Object o)
remove in interface java.util.Collection<E>remove in interface java.util.List<E>public boolean removeAll(java.util.Collection<?> c)
removeAll in interface java.util.Collection<E>removeAll in interface java.util.List<E>public boolean retainAll(java.util.Collection<?> c)
retainAll in interface java.util.Collection<E>retainAll in interface java.util.List<E>
public E set(int index,
E element)
set in interface java.util.List<E>public int size()
size in interface java.util.Collection<E>size in interface java.util.List<E>
public java.util.List<E> subList(int fromIndex,
int toIndex)
subList in interface java.util.List<E>public java.lang.Object[] toArray()
toArray in interface java.util.Collection<E>toArray in interface java.util.List<E>public <T> T[] toArray(T[] a)
toArray in interface java.util.Collection<E>toArray in interface java.util.List<E>
public void sort(java.util.Comparator<E> cmpr,
boolean ascending)
sort in interface Sortable<E>cmpr - 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 | |||||||||