|
||||||||||
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 FormField Summary | |
---|---|
protected List<E> |
_list
|
Constructor Summary | |
---|---|
ListModelList()
Constructor. |
|
ListModelList(Collection<? extends E> c)
Constructor. |
|
ListModelList(E[] array)
Constructor. |
|
ListModelList(int initialCapacity)
Constructor. |
|
ListModelList(List<E> list,
boolean live)
Constructor |
Method Summary | ||
---|---|---|
boolean |
add(E o)
|
|
void |
add(int index,
E element)
|
|
boolean |
addAll(Collection<? extends E> c)
|
|
boolean |
addAll(int index,
Collection<? extends E> c)
|
|
void |
clear()
|
|
boolean |
contains(Object elem)
|
|
boolean |
containsAll(Collection<?> c)
|
|
boolean |
equals(Object o)
|
|
E |
get(int index)
|
|
E |
getElementAt(int j)
Returns the value at the specified index. |
|
List<E> |
getInnerList()
Get the inner real List. |
|
int |
getSize()
Returns the length of the list. |
|
int |
hashCode()
|
|
int |
indexOf(Object elem)
|
|
boolean |
isEmpty()
|
|
Iterator<E> |
iterator()
|
|
int |
lastIndexOf(Object elem)
|
|
ListIterator<E> |
listIterator()
|
|
ListIterator<E> |
listIterator(int index)
|
|
E |
remove(int index)
|
|
boolean |
remove(Object o)
|
|
boolean |
removeAll(Collection<?> c)
|
|
void |
removeRange(int fromIndex,
int toIndex)
Remove from fromIndex(inclusive) to toIndex(exclusive). |
|
boolean |
retainAll(Collection<?> c)
|
|
E |
set(int index,
E element)
|
|
int |
size()
|
|
void |
sort(Comparator<E> cmpr,
boolean ascending)
Sorts the data. |
|
List<E> |
subList(int fromIndex,
int toIndex)
|
|
Object[] |
toArray()
|
|
|
toArray(T[] a)
|
|
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 List<E> _list
Constructor Detail |
---|
public ListModelList(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(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 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 List<E>
public boolean add(E o)
add
in interface Collection<E>
add
in interface List<E>
public boolean addAll(Collection<? extends E> c)
addAll
in interface Collection<E>
addAll
in interface List<E>
public boolean addAll(int index, Collection<? extends E> c)
addAll
in interface List<E>
public void clear()
clear
in interface Collection<E>
clear
in interface List<E>
public boolean contains(Object elem)
contains
in interface Collection<E>
contains
in interface List<E>
public boolean containsAll(Collection<?> c)
containsAll
in interface Collection<E>
containsAll
in interface List<E>
public boolean equals(Object o)
equals
in interface Collection<E>
equals
in interface List<E>
equals
in class Object
public E get(int index)
get
in interface List<E>
public int hashCode()
hashCode
in interface Collection<E>
hashCode
in interface List<E>
hashCode
in class Object
public String toString()
toString
in class Object
public int indexOf(Object elem)
indexOf
in interface List<E>
public boolean isEmpty()
isEmpty
in interface Collection<E>
isEmpty
in interface List<E>
public Iterator<E> iterator()
iterator
in interface Iterable<E>
iterator
in interface Collection<E>
iterator
in interface List<E>
public int lastIndexOf(Object elem)
lastIndexOf
in interface List<E>
public ListIterator<E> listIterator()
listIterator
in interface List<E>
public ListIterator<E> listIterator(int index)
listIterator
in interface List<E>
public E remove(int index)
remove
in interface List<E>
public boolean remove(Object o)
remove
in interface Collection<E>
remove
in interface List<E>
public boolean removeAll(Collection<?> c)
removeAll
in interface Collection<E>
removeAll
in interface List<E>
public boolean retainAll(Collection<?> c)
retainAll
in interface Collection<E>
retainAll
in interface List<E>
public E set(int index, E element)
set
in interface List<E>
public int size()
size
in interface Collection<E>
size
in interface List<E>
public List<E> subList(int fromIndex, int toIndex)
subList
in interface List<E>
public Object[] toArray()
toArray
in interface Collection<E>
toArray
in interface List<E>
public <T> T[] toArray(T[] a)
toArray
in interface Collection<E>
toArray
in interface List<E>
public void sort(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 |