|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.tonbeller.wcf.selection.DefaultSelectionModel
default SelectionModel for Tree and Table
| 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 | |
DefaultSelectionModel()
|
|
DefaultSelectionModel(int mode)
|
|
| Method Summary | |
void |
add(java.lang.Object obj)
|
void |
addAll(java.util.Collection c)
|
void |
addSelectionListener(SelectionChangeListener l)
|
void |
clear()
clears the selection |
boolean |
contains(java.lang.Object obj)
|
void |
fireSelectionChanged(RequestContext context)
fires a SelectionChangeEvent. |
int |
getMode()
|
SelectableFilter |
getSelectableFilter()
returns the current SelectableFilter |
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)
return false if item implements the tagging Unselectable interface true if no SelectableFilter is set or if the SelectableFilter accepts the item. |
void |
remove(java.lang.Object obj)
|
void |
removeSelectionListener(SelectionChangeListener l)
|
void |
setComparator(java.util.Comparator comp)
|
void |
setMode(int mode)
|
void |
setSelectableFilter(SelectableFilter filter)
sets the current SelectableFilter. |
void |
setSelection(java.util.Collection newSelection)
|
void |
setSingleSelection(java.lang.Object selectedObject)
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 |
public DefaultSelectionModel()
public DefaultSelectionModel(int mode)
| Method Detail |
public void setComparator(java.util.Comparator comp)
public void add(java.lang.Object obj)
add in interface SelectionModelpublic void remove(java.lang.Object obj)
remove in interface SelectionModelpublic void clear()
SingleSelectionModel
clear in interface SingleSelectionModelpublic boolean contains(java.lang.Object obj)
contains in interface SelectionModelpublic int getMode()
getMode in interface SelectionModelpublic java.util.Set getSelection()
getSelection in interface SelectionModelpublic void setMode(int mode)
setMode in interface SelectionModelpublic void setSelection(java.util.Collection newSelection)
public void addAll(java.util.Collection c)
addAll in interface SelectionModelpublic boolean isSelectable(java.lang.Object item)
isSelectable in interface SingleSelectionModelSelectableFilter,
setSelectableFilter(com.tonbeller.wcf.selection.SelectableFilter),
getSelectableFilter(),
Unselectablepublic java.lang.Object getSingleSelection()
SingleSelectionModel
getSingleSelection in interface SingleSelectionModelpublic void setSingleSelection(java.lang.Object selectedObject)
SingleSelectionModel
setSingleSelection in interface SingleSelectionModelpublic SelectableFilter getSelectableFilter()
SelectableFilter,
isSelectable(java.lang.Object)public void setSelectableFilter(SelectableFilter filter)
filter - the new filter or null to accept all nodesSelectableFilter,
isSelectable(java.lang.Object)public 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 SingleSelectionModelpublic boolean isEmpty()
isEmpty in interface SingleSelectionModel
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||