|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface SelectionModel
A model for graph selections. Listeners can add themselves to the model and are notified by SelectionEvents when the model is modified.
Field Summary | |
---|---|
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. |
Method Summary | |
---|---|
void |
addSelection(java.lang.Object sel)
Add an object to the selection. |
void |
addSelectionListener(SelectionListener l)
Add a selection listener to this model. |
void |
addSelections(java.lang.Object[] sel)
Add an array of objects to the selection. the model should highlight the selected objects. |
void |
clearSelection()
Clear the selection. |
boolean |
containsSelection(java.lang.Object sel)
Test if the selection contains the given object |
java.lang.Object |
getFirstSelection()
Return the first selection in the list. |
java.lang.Object |
getLastSelection()
Return the last selection in the list. |
java.util.Iterator |
getSelection()
Return an iterator over the selected objects. |
java.lang.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(java.lang.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. |
Field Detail |
---|
static final int SINGLE_SELECTION
static final int MULTIPLE_SELECTION
Method Detail |
---|
void addSelectionListener(SelectionListener l)
void addSelection(java.lang.Object sel)
void addSelections(java.lang.Object[] sel)
void clearSelection()
boolean containsSelection(java.lang.Object sel)
java.lang.Object getFirstSelection()
java.lang.Object getLastSelection()
java.util.Iterator getSelection()
java.lang.Object[] getSelectionAsArray()
int getSelectionCount()
int getSelectionMode()
void removeSelectionListener(SelectionListener l)
void removeSelection(java.lang.Object sel)
void setSelectionMode(int mode)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |