|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.tonbeller.wcf.selection.AbstractSelectionModel
simplifies implementation of the SelectionModel
Field Summary |
Fields inherited from interface com.tonbeller.wcf.selection.SelectionModel |
MULTIPLE_SELECTION, MULTIPLE_SELECTION_BUTTON, MULTIPLE_SELECTION_HREF, NO_SELECTION, SINGLE_SELECTION, SINGLE_SELECTION_BUTTON, SINGLE_SELECTION_HREF |
Constructor Summary | |
protected |
AbstractSelectionModel(int mode)
|
Method Summary | |
abstract void |
add(java.lang.Object obj)
|
void |
addAll(java.util.Collection c)
|
void |
addSelectionListener(SelectionChangeListener l)
|
abstract void |
clear()
clears the selection |
boolean |
contains(java.lang.Object obj)
|
void |
fireSelectionChanged(RequestContext context)
fires a SelectionChangeEvent. |
int |
getMode()
|
abstract java.util.Set |
getSelection()
|
java.lang.Object |
getSingleSelection()
return the only selected object or null if the selection is empty. |
boolean |
isEmpty()
|
boolean |
isSelectable(java.lang.Object item)
returns true for all objects except Unselectable |
abstract void |
remove(java.lang.Object obj)
|
void |
removeSelectionListener(SelectionChangeListener l)
|
void |
setMode(int mode)
|
void |
setSingleSelection(java.lang.Object obj)
sets the only selected element |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
protected AbstractSelectionModel(int mode)
Method Detail |
public abstract java.util.Set getSelection()
getSelection
in interface SelectionModel
public abstract void add(java.lang.Object obj)
add
in interface SelectionModel
public abstract void remove(java.lang.Object obj)
remove
in interface SelectionModel
public abstract void clear()
SingleSelectionModel
clear
in interface SingleSelectionModel
public int getMode()
getMode
in interface SelectionModel
public void setMode(int mode)
setMode
in interface SelectionModel
public void addAll(java.util.Collection c)
addAll
in interface SelectionModel
public boolean contains(java.lang.Object obj)
contains
in interface SelectionModel
public java.lang.Object getSingleSelection()
SingleSelectionModel
getSingleSelection
in interface SingleSelectionModel
public void setSingleSelection(java.lang.Object obj)
SingleSelectionModel
setSingleSelection
in interface SingleSelectionModel
public boolean isEmpty()
isEmpty
in interface SingleSelectionModel
public boolean isSelectable(java.lang.Object item)
isSelectable
in interface SingleSelectionModel
Unselectable
public void fireSelectionChanged(RequestContext context)
SingleSelectionModel
fireSelectionChanged
in interface SingleSelectionModel
context
- public void addSelectionListener(SelectionChangeListener l)
addSelectionListener
in interface SingleSelectionModel
public void removeSelectionListener(SelectionChangeListener l)
removeSelectionListener
in interface SingleSelectionModel
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |