org.zkoss.zkplus.databind
Class BindingListModelArray

java.lang.Object
  extended by org.zkoss.zul.AbstractListModel
      extended by org.zkoss.zul.ListModelArray
          extended by org.zkoss.zkplus.databind.BindingListModelArray
All Implemented Interfaces:
java.io.Serializable, BindingListModel, BindingListModelExt, Selectable, ListModel, ListModelExt

public class BindingListModelArray
extends ListModelArray
implements BindingListModelExt, java.io.Serializable

This is the BindingListModel as a Object array to be used with Listbox, Grid, and DataBinder. Modify the contents of this model as an Object array would cause the associated Listbox or Grid to change accordingly.

Make as public class since 3.0.5

Support BindingListModelEx since 3.1

Author:
Henri Chen
See Also:
BindingListModel, ListModel, ListModelArray, Serialized Form

Field Summary
 
Fields inherited from class org.zkoss.zul.ListModelArray
_array
 
Constructor Summary
BindingListModelArray(java.lang.Object[] c, boolean live)
           
BindingListModelArray(java.lang.Object[] c, boolean live, boolean distinct)
           
 
Method Summary
 int[] indexesOf(java.lang.Object elm)
          Returns indexes of the given object inside a ListModel.
 boolean isDistinct()
          Returns true if all objects inside this ListModel is distinct.
 
Methods inherited from class org.zkoss.zul.ListModelArray
equals, get, getElementAt, getInnerArray, getSize, hashCode, indexOf, set, sort, 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
 
Methods inherited from interface org.zkoss.zkplus.databind.BindingListModel
indexOf
 
Methods inherited from interface org.zkoss.zul.ListModel
addListDataListener, getElementAt, getSize, removeListDataListener
 

Constructor Detail

BindingListModelArray

public BindingListModelArray(java.lang.Object[] c,
                             boolean live,
                             boolean distinct)
Since:
3.5.0

BindingListModelArray

public BindingListModelArray(java.lang.Object[] c,
                             boolean live)
Since:
3.0.5
Method Detail

isDistinct

public boolean isDistinct()
Description copied from interface: BindingListModelExt
Returns true if all objects inside this ListModel is distinct. This is for DataBinder performance so there is no need to scan the whole ListModel as long as find one.

Specified by:
isDistinct in interface BindingListModelExt
Returns:
true if all objects inside this ListModel is distinct; otherwise, return false.

indexesOf

public int[] indexesOf(java.lang.Object elm)
Description copied from interface: BindingListModelExt
Returns indexes of the given object inside a ListModel.

Specified by:
indexesOf in interface BindingListModelExt
Parameters:
elm - the specified object
Returns:
indexes that contains the given object; return empty array if none found.


Copyright © 2005-2009 Potix Corporation. All Rights Reserved. SourceForge.net Logo