|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface GraphSelectionModel
This interface represents the current state of the selection for the graph component.
A GraphSelectionModel can be configured to allow only one
cell (SINGLE_GRAPH_SELECTION
) or a number of
cells (MULTIPLE_GRAPH_SELECTION
).
Field Summary | |
---|---|
static int |
MULTIPLE_GRAPH_SELECTION
Selection can contain any number of items. |
static int |
SINGLE_GRAPH_SELECTION
Selection can only contain one cell at a time. |
Method Summary | |
---|---|
void |
addGraphSelectionListener(GraphSelectionListener x)
Adds x to the list of listeners that are notified each time the set of selected Objects changes. |
void |
addPropertyChangeListener(PropertyChangeListener listener)
Adds a PropertyChangeListener to the listener list. |
void |
addSelectionCell(Object cell)
Adds cell to the current selection. |
void |
addSelectionCells(Object[] cells)
Adds cells to the current selection. |
void |
clearSelection()
Empties the current selection. |
Object[] |
getSelectables()
Returns the cells that are currently selectable. |
Object |
getSelectionCell()
Returns the first cell in the selection. |
Object[] |
getSelectionCells()
Returns the cells in the selection. |
int |
getSelectionCount()
Returns the number of cells that are selected. |
int |
getSelectionMode()
Returns the current selection mode, either SINGLE_GRAPH_SELECTION or
MULTIPLE_GRAPH_SELECTION . |
boolean |
isCellSelected(Object cell)
Returns true if the cell, cell , is in the current
selection. |
boolean |
isChildrenSelectable()
Returns true if the selection model allows the selection of children. |
boolean |
isChildrenSelected(Object cell)
Returns true if the cell, cell ,
has selected children. |
boolean |
isSelectionEmpty()
Returns true if the selection is currently empty. |
void |
removeGraphSelectionListener(GraphSelectionListener x)
Removes x from the list of listeners that are notified each time the set of selected Objects changes. |
void |
removePropertyChangeListener(PropertyChangeListener listener)
Removes a PropertyChangeListener from the listener list. |
void |
removeSelectionCell(Object cell)
Removes cell from the selection. |
void |
removeSelectionCells(Object[] cells)
Removes cells from the selection. |
void |
setChildrenSelectable(boolean flag)
Sets if the selection model allows the selection of children. |
void |
setSelectionCell(Object cell)
Sets the selection to cell. |
void |
setSelectionCells(Object[] cells)
Sets the selection to cells. |
void |
setSelectionMode(int mode)
Sets the selection model, which must be either SINGLE_GRAPH_SELECTION or MULTIPLE_GRAPH_SELECTION. |
Field Detail |
---|
static final int SINGLE_GRAPH_SELECTION
static final int MULTIPLE_GRAPH_SELECTION
Method Detail |
---|
void setSelectionMode(int mode)
This may change the selection if the current selection is not valid for the new mode.
void setChildrenSelectable(boolean flag)
boolean isChildrenSelectable()
int getSelectionMode()
SINGLE_GRAPH_SELECTION
or
MULTIPLE_GRAPH_SELECTION
.
void setSelectionCell(Object cell)
cell
is
null, this has the same effect as invoking clearSelection
.
cell
- new cell to selectvoid setSelectionCells(Object[] cells)
cells
is
null, this has the same effect as invoking clearSelection
.
cells
- new selectionvoid addSelectionCell(Object cell)
cell
is null.
cell
- the new cell to add to the current selectionvoid addSelectionCells(Object[] cells)
cells
is null.
cells
- the new cells to add to the current selectionvoid removeSelectionCell(Object cell)
cell
is null.
cell
- the cell to remove from the selectionvoid removeSelectionCells(Object[] cells)
cells
are in the selection, the
GraphSelectionListeners are notified. This method has no
effect if cells
is null.
cells
- the cells to remove from the selectionObject[] getSelectables()
Object getSelectionCell()
Object[] getSelectionCells()
int getSelectionCount()
boolean isCellSelected(Object cell)
cell
, is in the current
selection.
boolean isChildrenSelected(Object cell)
cell
,
has selected children.
boolean isSelectionEmpty()
void clearSelection()
void addPropertyChangeListener(PropertyChangeListener listener)
A PropertyChangeEvent will get fired when the selection mode changes.
listener
- the PropertyChangeListener to be addedvoid removePropertyChangeListener(PropertyChangeListener listener)
listener
- the PropertyChangeListener to be removedvoid addGraphSelectionListener(GraphSelectionListener x)
x
- the new listener to be addedvoid removeGraphSelectionListener(GraphSelectionListener x)
x
- the listener to remove
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |