org.zkoss.zkplus.databind
Class BindingListModelListModel<E>

java.lang.Object
  extended by org.zkoss.zkplus.databind.BindingListModelListModel<E>
All Implemented Interfaces:
java.io.Serializable, BindingListModel<E>, BindingListModelExt<E>, Selectable<E>, ListModel<E>

Deprecated. As of release 7.0.0, replace with new ZK binding.

public class BindingListModelListModel<E>
extends java.lang.Object
implements BindingListModel<E>, Selectable<E>, java.io.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  ListModel<E> _model
          Deprecated.  
 
Constructor Summary
BindingListModelListModel(ListModel<E> model)
          Deprecated.  
BindingListModelListModel(ListModel<E> model, boolean distinct)
          Deprecated.  
 
Method Summary
 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.
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_model

protected ListModel<E> _model
Deprecated. 
Constructor Detail

BindingListModelListModel

public BindingListModelListModel(ListModel<E> model)
Deprecated. 

BindingListModelListModel

public BindingListModelListModel(ListModel<E> model,
                                 boolean distinct)
Deprecated. 
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 interface BindingListModel<E>

getElementAt

public E getElementAt(int index)
Deprecated. 
Description copied from interface: ListModel
Returns the value at the specified index.

Specified by:
getElementAt in interface ListModel<E>

getSize

public int getSize()
Deprecated. 
Description copied from interface: ListModel
Returns the length of the list.

Specified by:
getSize in interface ListModel<E>

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 interface ListModel<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 interface ListModel<E>

getInnerModel

public ListModel<E> getInnerModel()
Deprecated. 

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 interface Selectable<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 interface Selectable<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 interface Selectable<E>

isSelectionEmpty

public boolean isSelectionEmpty()
Deprecated. 
Description copied from interface: Selectable
Returns true if the selection is currently empty.

Specified by:
isSelectionEmpty in interface Selectable<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 interface Selectable<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 interface Selectable<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 interface Selectable<E>

setMultiple

public void setMultiple(boolean multiple)
Deprecated. 
Description copied from interface: Selectable
Sets the selection mode to be multiple.

Specified by:
setMultiple in interface Selectable<E>

isMultiple

public boolean isMultiple()
Deprecated. 
Description copied from interface: Selectable
Returns whether the current selection mode is multiple.

Specified by:
isMultiple in interface Selectable<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 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()
Deprecated. 
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 © 2005-2011 Potix Corporation. All Rights Reserved. SourceForge.net Logo