org.zkoss.zul.ext
Interface Selectable<E>

All Known Implementing Classes:
AbstractListModel, AbstractTreeModel, DefaultTreeModel, GroupsListModel, ListModelArray, ListModelList, ListModelMap, ListModelSet, SimpleListModel

public interface Selectable<E>

Indicate a data model that supports selection. It is typically used with ListModel and Listbox.

Author:
henrichen
See Also:
ListModel, Listbox

Method Summary
 void addSelection(E obj)
          Add the specified object into selection.
 void clearSelection()
          Clear all selection.
 Set<E> getSelection()
          Returns current selection.
 void removeSelection(Object obj)
          Remove the specified object from selection.
 

Method Detail

getSelection

Set<E> getSelection()
Returns current selection.

Returns:
current selection.

addSelection

void addSelection(E obj)
Add the specified object into selection.

Notice that this method is designed to be called by a component (such as Listbox). If it is called by an application, the component's selection status won't be changed.

Parameters:
obj - the object to be as selection.

removeSelection

void removeSelection(Object obj)
Remove the specified object from selection.

Notice that this method is designed to be called by a component (such as Listbox). If it is called by an application, the component's selection status won't be changed.

Parameters:
obj - the object to be remove from selection.

clearSelection

void clearSelection()
Clear all selection.

Notice that this method is designed to be called by a component (such as Listbox). If it is called by an application, the component's selection status won't be changed.



Copyright © 2011. All Rights Reserved.