|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.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 SelectionModel
public void remove(java.lang.Object obj)
remove
in interface SelectionModel
public void clear()
SingleSelectionModel
clear
in interface SingleSelectionModel
public boolean contains(java.lang.Object obj)
contains
in interface SelectionModel
public int getMode()
getMode
in interface SelectionModel
public java.util.Set getSelection()
getSelection
in interface SelectionModel
public void setMode(int mode)
setMode
in interface SelectionModel
public void setSelection(java.util.Collection newSelection)
public void addAll(java.util.Collection c)
addAll
in interface SelectionModel
public boolean isSelectable(java.lang.Object item)
isSelectable
in interface SingleSelectionModel
SelectableFilter
,
setSelectableFilter(com.tonbeller.wcf.selection.SelectableFilter)
,
getSelectableFilter()
,
Unselectable
public java.lang.Object getSingleSelection()
SingleSelectionModel
getSingleSelection
in interface SingleSelectionModel
public void setSingleSelection(java.lang.Object selectedObject)
SingleSelectionModel
setSingleSelection
in interface SingleSelectionModel
public 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 SingleSelectionModel
context
- public void addSelectionListener(SelectionChangeListener l)
addSelectionListener
in interface SingleSelectionModel
public void removeSelectionListener(SelectionChangeListener l)
removeSelectionListener
in interface SingleSelectionModel
public boolean isEmpty()
isEmpty
in interface SingleSelectionModel
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |