public interface SelectionModel
Modifier and Type | Field and Description |
---|---|
static int |
MULTIPLE_SELECTION
Allow multiple screen objects to be
selected at once.
|
static int |
SINGLE_SELECTION
Allow only one screen object to
be selected at a time.
|
Modifier and Type | Method and Description |
---|---|
void |
addSelection(Object sel)
Add an object to the selection.
|
void |
addSelectionListener(SelectionListener l)
Add a selection listener to this model.
|
void |
addSelections(Object[] sel)
Add an array of objects to the selection.
|
void |
clearSelection()
Clear the selection.
|
boolean |
containsSelection(Object sel)
Test if the selection contains the given object
|
Object |
getFirstSelection()
Return the first selection in the list.
|
Object |
getLastSelection()
Return the last selection in the list.
|
Iterator |
getSelection()
Return an iterator over the selected objects.
|
Object[] |
getSelectionAsArray()
Return the contents of the selection as an array.
|
int |
getSelectionCount()
Return the number of selected objects.
|
int |
getSelectionMode()
Return the mode of the selection, either
SINGLE_SELECTION or MULTIPLE_SELECTION.
|
void |
removeSelection(Object sel)
Remove an object from the selection.
|
void |
removeSelectionListener(SelectionListener l)
Remove a listener from the list of listeners.
|
void |
setSelectionMode(int mode)
Set the selection mode, either
SINGLE_SELECTION or MULTIPLE_SELECTION.
|
static final int SINGLE_SELECTION
static final int MULTIPLE_SELECTION
void addSelectionListener(SelectionListener l)
void addSelection(Object sel)
void addSelections(Object[] sel)
void clearSelection()
boolean containsSelection(Object sel)
Object getFirstSelection()
Object getLastSelection()
Iterator getSelection()
Object[] getSelectionAsArray()
int getSelectionCount()
int getSelectionMode()
void removeSelectionListener(SelectionListener l)
void removeSelection(Object sel)
void setSelectionMode(int mode)
Copyright © 2024 Central Laboratory of the Research Councils. All Rights Reserved.