|
||||||||||
| 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 SelectionModelpublic abstract void add(java.lang.Object obj)
add in interface SelectionModelpublic abstract void remove(java.lang.Object obj)
remove in interface SelectionModelpublic abstract void clear()
SingleSelectionModel
clear in interface SingleSelectionModelpublic int getMode()
getMode in interface SelectionModelpublic void setMode(int mode)
setMode in interface SelectionModelpublic void addAll(java.util.Collection c)
addAll in interface SelectionModelpublic boolean contains(java.lang.Object obj)
contains in interface SelectionModelpublic java.lang.Object getSingleSelection()
SingleSelectionModel
getSingleSelection in interface SingleSelectionModelpublic void setSingleSelection(java.lang.Object obj)
SingleSelectionModel
setSingleSelection in interface SingleSelectionModelpublic boolean isEmpty()
isEmpty in interface SingleSelectionModelpublic boolean isSelectable(java.lang.Object item)
isSelectable in interface SingleSelectionModelUnselectablepublic void fireSelectionChanged(RequestContext context)
SingleSelectionModel
fireSelectionChanged in interface SingleSelectionModelcontext - public void addSelectionListener(SelectionChangeListener l)
addSelectionListener in interface SingleSelectionModelpublic void removeSelectionListener(SelectionChangeListener l)
removeSelectionListener in interface SingleSelectionModel
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||