|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecteu.webtoolkit.jwt.WObject
eu.webtoolkit.jwt.WItemSelectionModel
public class WItemSelectionModel
A class that represents a selection for a WAbstractItemView.
This model is currently only used by WTreeView, and plays only a role
in drag & drop of an item selection.
When an item selection is dragged from a view widget, the generated drop
events will have as source object (see WDropEvent#getSource()) this selection model.
Although this class does not (yet) allow you to modify the selection, note that manipulations to the model may modify the selection (row insertions and removals may shift the selection, and row deletions may shrink the selection).
Note: Currently this class cannot be shared between multiple views.
WTreeView,
WTableView,
WAbstractItemModel| Method Summary | |
|---|---|
WAbstractItemModel |
getModel()
Returns the WAbstractItemModel. |
java.util.SortedSet<WModelIndex> |
getSelectedIndexes()
Returns the set of selected items. |
SelectionBehavior |
getSelectionBehavior()
Returns the selection behaviour. |
boolean |
isSelected(WModelIndex index)
Returns wheter an item is selected. |
void |
setSelectionBehavior(SelectionBehavior behavior)
Sets the selection behaviour. |
| Methods inherited from class eu.webtoolkit.jwt.WObject |
|---|
getId, getObjectName, remove, setObjectName, tr |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public WAbstractItemModel getModel()
WAbstractItemModel.
public java.util.SortedSet<WModelIndex> getSelectedIndexes()
The model indexes are returned as a set, topologically ordered (in the order they appear in the view).
public boolean isSelected(WModelIndex index)
getSelectedIndexes()public void setSelectionBehavior(SelectionBehavior behavior)
By default, the selection contains rows (
SelectRows), in which case model
indexes will always be have column 0, but represent the whole row.
Alternatively, you can allow selection for individual items (
SelectItems).
public SelectionBehavior getSelectionBehavior()
setSelectionBehavior(SelectionBehavior behavior)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||