org.zkoss.zul
Class AbstractListModel

java.lang.Object
  extended by org.zkoss.zul.AbstractListModel
All Implemented Interfaces:
java.io.Serializable, Selectable, ListModel
Direct Known Subclasses:
GroupsListModel, ListModelArray, ListModelList, ListModelMap, ListModelSet, SimpleListModel

public abstract class AbstractListModel
extends java.lang.Object
implements ListModel, Selectable, java.io.Serializable

A skeletal implementation for ListModel.

Author:
tomyeh
See Also:
Serialized Form

Constructor Summary
AbstractListModel()
           
 
Method Summary
 void addListDataListener(ListDataListener l)
          Adds a listener to the list that's notified each time a change to the data model occurs.
 void addSelection(java.lang.Object obj)
          Add the specified object into selection.
 void clearSelection()
          Clear all selection.
protected  void fireEvent(int type, int index0, int index1)
          Fires a ListDataEvent for all registered listener (thru addListDataListener(org.zkoss.zul.event.ListDataListener).
 java.util.Set getSelection()
          Returns current selection.
protected  void removeAllSelection(java.util.Collection c)
           
 void removeListDataListener(ListDataListener l)
          Removes a listener from the list that's notified each time a change to the data model occurs.
 void removeSelection(java.lang.Object obj)
          Remove the specified object from selection.
protected  void retainAllSelection(java.util.Collection c)
           
 
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
getElementAt, getSize
 

Constructor Detail

AbstractListModel

public AbstractListModel()
Method Detail

fireEvent

protected void fireEvent(int type,
                         int index0,
                         int index1)
Fires a ListDataEvent for all registered listener (thru addListDataListener(org.zkoss.zul.event.ListDataListener).

Note: you can invoke this method only in an event listener.


addListDataListener

public void addListDataListener(ListDataListener l)
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

removeListDataListener

public void removeListDataListener(ListDataListener l)
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

getSelection

public java.util.Set getSelection()
Description copied from interface: Selectable
Returns current selection.

Specified by:
getSelection in interface Selectable
Returns:
current selection.

addSelection

public void addSelection(java.lang.Object obj)
Description copied from interface: Selectable
Add the specified object into selection.

Specified by:
addSelection in interface Selectable
Parameters:
obj - the object to be as selection.

removeSelection

public void removeSelection(java.lang.Object obj)
Description copied from interface: Selectable
Remove the specified object from selection.

Specified by:
removeSelection in interface Selectable
Parameters:
obj - the object to be remove from selection.

clearSelection

public void clearSelection()
Description copied from interface: Selectable
Clear all selection.

Specified by:
clearSelection in interface Selectable

removeAllSelection

protected void removeAllSelection(java.util.Collection c)

retainAllSelection

protected void retainAllSelection(java.util.Collection c)


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