Package org.zkoss.zkplus.databind
Class BindingListModelListModel<E>
- java.lang.Object
-
- org.zkoss.zkplus.databind.BindingListModelListModel<E>
-
- All Implemented Interfaces:
java.io.Serializable
,BindingListModel<E>
,BindingListModelExt<E>
,Selectable<E>
,ListModel<E>
public class BindingListModelListModel<E> extends java.lang.Object implements BindingListModel<E>, Selectable<E>, java.io.Serializable, BindingListModelExt<E>
Deprecated.As of release 7.0.0, replace with new ZK binding.This is the
BindingListModel
as aListModel
to be used withListbox
,Grid
, andDataBinder
. 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
-
-
Constructor Summary
Constructors Constructor Description BindingListModelListModel(ListModel<E> model)
Deprecated.BindingListModelListModel(ListModel<E> model, boolean distinct)
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addListDataListener(ListDataListener l)
Deprecated.Adds a listener to the list that's notified each time a change to the data model occurs.boolean
addToSelection(E obj)
Deprecated.Add the specified object into selection.void
clearSelection()
Deprecated.Change the selection to the empty set.E
getElementAt(int index)
Deprecated.Returns the value at the specified index.ListModel<E>
getInnerModel()
Deprecated.java.util.Set<E>
getSelection()
Deprecated.Returns the current selection.SelectionControl
getSelectionControl()
Deprecated.Returns the selection control for the selection model, if any.int
getSize()
Deprecated.Returns the length of the list.int[]
indexesOf(java.lang.Object elm)
Deprecated.Returns indexes of the given object inside a ListModel.int
indexOf(java.lang.Object obj)
Deprecated.Returns index of the given object inside a ListModel.boolean
isDistinct()
Deprecated.Returns true if all objects inside this ListModel is distinct.boolean
isMultiple()
Deprecated.Returns whether the current selection mode is multiple.boolean
isSelected(java.lang.Object obj)
Deprecated.Returns whether an object is selected.boolean
isSelectionEmpty()
Deprecated.Returns true if the selection is currently empty.boolean
removeFromSelection(java.lang.Object obj)
Deprecated.Remove the specified object from selection.void
removeListDataListener(ListDataListener l)
Deprecated.Removes a listener from the list that's notified each time a change to the data model occurs.void
setMultiple(boolean multiple)
Deprecated.Sets the selection mode to be multiple.void
setSelection(java.util.Collection<? extends E> selection)
Deprecated.Replace the current selection with the given set.void
setSelectionControl(SelectionControl ctrl)
Deprecated.Sets the selection control for the selection model-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.zkoss.zul.ListModel
getListDataListeners
-
-
-
-
Method Detail
-
indexOf
public int indexOf(java.lang.Object obj)
Deprecated.Description copied from interface:BindingListModel
Returns index of the given object inside a ListModel.- Specified by:
indexOf
in interfaceBindingListModel<E>
-
getElementAt
public E getElementAt(int index)
Deprecated.Description copied from interface:ListModel
Returns the value at the specified index.- Specified by:
getElementAt
in interfaceListModel<E>
-
getSize
public int getSize()
Deprecated.Description copied from interface:ListModel
Returns the length of the list.
-
addListDataListener
public void addListDataListener(ListDataListener l)
Deprecated.Description copied from interface:ListModel
Adds a listener to the list that's notified each time a change to the data model occurs.- Specified by:
addListDataListener
in interfaceListModel<E>
-
removeListDataListener
public void removeListDataListener(ListDataListener l)
Deprecated.Description copied from interface:ListModel
Removes a listener from the list that's notified each time a change to the data model occurs.- Specified by:
removeListDataListener
in interfaceListModel<E>
-
setSelectionControl
public void setSelectionControl(SelectionControl ctrl)
Deprecated.Description copied from interface:Selectable
Sets the selection control for the selection model- Specified by:
setSelectionControl
in interfaceSelectable<E>
-
getSelectionControl
public SelectionControl getSelectionControl()
Deprecated.Description copied from interface:Selectable
Returns the selection control for the selection model, if any.- Specified by:
getSelectionControl
in interfaceSelectable<E>
-
getSelection
public java.util.Set<E> getSelection()
Deprecated.Description copied from interface:Selectable
Returns the current selection. It is readonly. Don't modify it directly- Specified by:
getSelection
in interfaceSelectable<E>
- Returns:
- the current selection.
-
setSelection
public void setSelection(java.util.Collection<? extends E> selection)
Deprecated.Description copied from interface:Selectable
Replace the current selection with the given set.If this represents a change to the current selection then notify each ListDataListener, including UI.
- Specified by:
setSelection
in interfaceSelectable<E>
-
isSelected
public boolean isSelected(java.lang.Object obj)
Deprecated.Description copied from interface:Selectable
Returns whether an object is selected.- Specified by:
isSelected
in interfaceSelectable<E>
-
isSelectionEmpty
public boolean isSelectionEmpty()
Deprecated.Description copied from interface:Selectable
Returns true if the selection is currently empty.- Specified by:
isSelectionEmpty
in interfaceSelectable<E>
-
addToSelection
public boolean addToSelection(E obj)
Deprecated.Description copied from interface:Selectable
Add the specified object into selection.If this represents a change to the current selection then notify each ListDataListener, including UI.
- Specified by:
addToSelection
in interfaceSelectable<E>
- Parameters:
obj
- the object to be as selection.- Returns:
- true if it is added successfully; false if
obj
is not part of the data, or was already selected.
-
removeFromSelection
public boolean removeFromSelection(java.lang.Object obj)
Deprecated.Description copied from interface:Selectable
Remove the specified object from selection.If this represents a change to the current selection then notify each ListDataListener, including UI.
- Specified by:
removeFromSelection
in interfaceSelectable<E>
- Parameters:
obj
- the object to be remove from selection.- Returns:
- whether it is removed successfully
-
clearSelection
public void clearSelection()
Deprecated.Description copied from interface:Selectable
Change the selection to the empty set.If this represents a change to the current selection then notify each ListDataListener, including UI.
- Specified by:
clearSelection
in interfaceSelectable<E>
-
setMultiple
public void setMultiple(boolean multiple)
Deprecated.Description copied from interface:Selectable
Sets the selection mode to be multiple.- Specified by:
setMultiple
in interfaceSelectable<E>
-
isMultiple
public boolean isMultiple()
Deprecated.Description copied from interface:Selectable
Returns whether the current selection mode is multiple.- Specified by:
isMultiple
in interfaceSelectable<E>
- See Also:
Selectable.setMultiple(boolean)
-
indexesOf
public int[] indexesOf(java.lang.Object elm)
Deprecated.Description copied from interface:BindingListModelExt
Returns indexes of the given object inside a ListModel.- Specified by:
indexesOf
in interfaceBindingListModelExt<E>
- Parameters:
elm
- the specified object- Returns:
- indexes that contains the given object; return empty array if none found.
-
isDistinct
public boolean isDistinct()
Deprecated.Description copied from interface:BindingListModelExt
Returns true if all objects inside this ListModel is distinct. This is forDataBinder
performance so there is no need to scan the whole ListModel as long as find one.- Specified by:
isDistinct
in interfaceBindingListModelExt<E>
- Returns:
- true if all objects inside this ListModel is distinct; otherwise, return false.
-
-