org.zkoss.zkplus.databind
Class BindingListModelListModel<E>
java.lang.Object
org.zkoss.zkplus.databind.BindingListModelListModel<E>
- All Implemented Interfaces:
- Serializable, BindingListModel<E>, BindingListModelExt<E>, org.zkoss.zul.ext.Selectable<E>, org.zkoss.zul.ListModel<E>
public class BindingListModelListModel<E>
- extends Object
- implements BindingListModel<E>, org.zkoss.zul.ext.Selectable<E>, Serializable, BindingListModelExt<E>
This is the BindingListModel as a ListModel to be used with
Listbox, Grid,
and DataBinder.
Add or remove the contents of this model as a ListModel would cause the associated Listbox or Grid to change accordingly.
- Since:
- 5.0.8
- Author:
- peterkuo
- See Also:
- Serialized Form
|
Field Summary |
protected org.zkoss.zul.ListModel<E> |
_model
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_model
protected org.zkoss.zul.ListModel<E> _model
BindingListModelListModel
public BindingListModelListModel(org.zkoss.zul.ListModel<E> model)
BindingListModelListModel
public BindingListModelListModel(org.zkoss.zul.ListModel<E> model,
boolean distinct)
indexOf
public int indexOf(Object obj)
- Description copied from interface:
BindingListModel
- Returns index of the given object inside a ListModel.
- Specified by:
indexOf in interface BindingListModel<E>
getElementAt
public E getElementAt(int index)
- Specified by:
getElementAt in interface org.zkoss.zul.ListModel<E>
getSize
public int getSize()
- Specified by:
getSize in interface org.zkoss.zul.ListModel<E>
addListDataListener
public void addListDataListener(org.zkoss.zul.event.ListDataListener l)
- Specified by:
addListDataListener in interface org.zkoss.zul.ListModel<E>
removeListDataListener
public void removeListDataListener(org.zkoss.zul.event.ListDataListener l)
- Specified by:
removeListDataListener in interface org.zkoss.zul.ListModel<E>
getInnerModel
public org.zkoss.zul.ListModel<E> getInnerModel()
getSelection
public Set<E> getSelection()
- Specified by:
getSelection in interface org.zkoss.zul.ext.Selectable<E>
setSelection
public void setSelection(Collection<? extends E> selection)
- Specified by:
setSelection in interface org.zkoss.zul.ext.Selectable<E>
isSelected
public boolean isSelected(Object obj)
- Specified by:
isSelected in interface org.zkoss.zul.ext.Selectable<E>
isSelectionEmpty
public boolean isSelectionEmpty()
- Specified by:
isSelectionEmpty in interface org.zkoss.zul.ext.Selectable<E>
addToSelection
public boolean addToSelection(E obj)
- Specified by:
addToSelection in interface org.zkoss.zul.ext.Selectable<E>
removeFromSelection
public boolean removeFromSelection(Object obj)
- Specified by:
removeFromSelection in interface org.zkoss.zul.ext.Selectable<E>
clearSelection
public void clearSelection()
- Specified by:
clearSelection in interface org.zkoss.zul.ext.Selectable<E>
setMultiple
public void setMultiple(boolean multiple)
- Specified by:
setMultiple in interface org.zkoss.zul.ext.Selectable<E>
isMultiple
public boolean isMultiple()
- Specified by:
isMultiple in interface org.zkoss.zul.ext.Selectable<E>
indexesOf
public int[] indexesOf(Object elm)
- Description copied from interface:
BindingListModelExt
- Returns indexes of the given object inside a ListModel.
- Specified by:
indexesOf in interface BindingListModelExt<E>
- Parameters:
elm - the specified object
- Returns:
- indexes that contains the given object; return empty array if none found.
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<E>
- Returns:
- true if all objects inside this ListModel is distinct; otherwise, return false.
Copyright © 2013. All Rights Reserved.