public interface DataBoxSelectionModel
extends java.io.Serializable
A data box selection model object always comes with a data box object. The selection model work with the connected data box and monitor all contained elements to ensure all selected elements are in the selection model.
Selection model object also provides a set of methods to access all selected elements, and operate the selections.
Use method box.getSelectionModel()
to get the selection model
object for a data box.
Modifier and Type | Method and Description |
---|---|
void |
addDataBoxSelectionListener(DataBoxSelectionListener l)
Add a data box selection model listener on this model.
|
void |
appendSelection(java.util.Collection elements)
Append all given elements into this model.
|
void |
appendSelection(Element element)
Append the element into this selection model.
|
void |
clearSelection()
Clear this selection model.
|
boolean |
contains(Element element)
Whether this selection model contains given element.
|
Element |
firstElement()
Gets the first selected element.
|
java.util.List |
getAllSelectedElement()
Gets all selected elements, that is, return all
elements of this selection model.
|
TDataBox |
getDataBox()
Gets the connected data box.
|
java.util.List |
getDataBoxSelectionListeners() |
SelectionChangedInterceptor |
getSelectionChangedInterceptor() |
java.util.List |
getToppestSelectedElement()
Gets all toppest selected elements.
|
boolean |
isAdjusting()
Returns true if current box selection value is
undergoing a series of changes.
|
boolean |
isEmpty()
Returns true if this model is empty.
|
Element |
lastElement()
get the last selected element.
|
void |
removeDataBoxSelectionListener(DataBoxSelectionListener l)
Remove specified listener from this selection model.
|
void |
removeSelection(java.util.Collection elements)
Remove specified elements from this model.
|
void |
removeSelection(Element element)
Remove specified element from this model.
|
void |
selectAll() |
java.util.Iterator |
selection()
Return a element iterator of this selection model.
|
void |
setSelection(java.util.Collection elements)
Clear this selection model first, then add
all given elements into this model.
|
void |
setSelection(Element element)
Clear this selection model first, then add
the specified element into this mode.
|
void |
setSelectionChangedInterceptor(SelectionChangedInterceptor selectionChangedInterceptor) |
int |
size()
Return the total number of current selection model.
|
TDataBox getDataBox()
void addDataBoxSelectionListener(DataBoxSelectionListener l)
l
- DataBoxSelectionListener the listener will
be added into the model.java.util.List getDataBoxSelectionListeners()
void removeDataBoxSelectionListener(DataBoxSelectionListener l)
l
- the listener need to be removed.void appendSelection(Element element)
element
- the new selected elementvoid appendSelection(java.util.Collection elements)
elements
- all new selected elements.boolean contains(Element element)
element
- the specified element.Element lastElement()
Element firstElement()
void setSelection(Element element)
element
- the new selected element.void setSelection(java.util.Collection elements)
elements
- all new selected elements.void clearSelection()
java.util.Iterator selection()
int size()
boolean isAdjusting()
boolean isEmpty()
void removeSelection(Element element)
element
- the element need to be removedvoid removeSelection(java.util.Collection elements)
elements
- the elements need to be removed.java.util.List getToppestSelectedElement()
java.util.List getAllSelectedElement()
SelectionChangedInterceptor getSelectionChangedInterceptor()
void setSelectionChangedInterceptor(SelectionChangedInterceptor selectionChangedInterceptor)
void selectAll()
Copyright © 2002 - 2010 Serva Software. All Rights Reserved.