| java.lang.Object org.zkoss.zul.AbstractListModel org.zkoss.zul.ListModelArray
All known Subclasses: org.zkoss.zkplus.databind.BindingListModelArray,
ListModelArray | public ListModelArray(Object[] array, boolean live)(Code) | | Constructor
Parameters: array - the array to represent Parameters: live - whether to have a 'live' ListModel on top ofthe specified array.If false, the content of the specified array is copied.If true, this object is a 'facade' of the specified array,i.e., when you add or remove items from this ListModelArray,the inner "live" array would be changed accordingly.However, it is not a good idea to modify array 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. since: 2.4.0 |
ListModelArray | public ListModelArray(Object[] src)(Code) | | Constructor.
It mades a copy of the specified array (i.e., not live).
Parameters: src - the source array used to initialize this ListModelArray. |
ListModelArray | public ListModelArray(int size)(Code) | | Constructor.
Parameters: size - the array size. |
ListModelArray | public ListModelArray(List list)(Code) | | Constructor.
It mades a copy of the specified list (i.e., not live).
since: 2.4.1 |
get | public Object get(int index)(Code) | | Get the value of this ListModelArray at specified index.
Parameters: index - the array index to be get value. |
getInnerArray | public Object[] getInnerArray()(Code) | | Get the inner real Object[].
since: 2.4.0 |
getSize | public int getSize()(Code) | | |
hashCode | public int hashCode()(Code) | | |
indexOf | public int indexOf(Object elm)(Code) | | Returns the index of the specified element.
|
set | public void set(int index, Object value)(Code) | | Change content of the Array at specified index.
Parameters: index - the array index to be set the new value. |
sort | public void sort(Comparator cmpr, boolean ascending)(Code) | | Sorts the data.
Parameters: cmpr - the comparator. Parameters: ascending - whether to sort in the ascending order.It is ignored since this implementation uses cmprt to compare. |
|
|