org.jgraph.event
public class GraphSelectionEvent extends EventObject
See Also: GraphSelectionListener
| Field Summary | |
|---|---|
| protected boolean[] | areNew
For each cell identifies whether or not that cell is newly selected. |
| protected Object[] | cells Cells this event represents. |
| Constructor Summary | |
|---|---|
| GraphSelectionEvent(Object source, Object[] cells, boolean[] areNew)
Represents a change in the selection of a GraphSelectionModel.
| |
| Method Summary | |
|---|---|
| Object | cloneWithSource(Object newSource)
Returns a copy of the receiver, but with the source being newSource.
|
| Object | getCell()
Returns the first cell.
|
| Object[] | getCells()
Returns the cells that have been added or removed from the selection.
|
| boolean | isAddedCell()
Returns true if the first cell has been added to the selection, a return
value of false means the first cell has been removed from the selection.
|
| boolean | isAddedCell(Object cell)
Returns true if the cell identified by cell was added to the selection. |
| boolean | isAddedCell(int index)
Returns true if the cell identified by index was added to
the selection. |
cells identifies the cells that have been either added or
removed from the selection.
Parameters: source source of event cells the paths that have changed in the selection areNew for each cell, defines whether or not that cell is newly selected
Parameters: newSource the new event source
Returns: the cloned event with the specified source
Returns: the first selected cell
Returns: added or removed cells
Returns: whether or not the first cell has been added or removed
Parameters: cell the cell that is to be indicated as newly selected or not
Returns: true if the specified cell is newly selected
index was added to
the selection. A return value of false means the cell was in the
selection but is no longer in the selection. This will raise an exception
if index < 0 || >=getPaths .length.
Parameters: index
the index of areNew of the cell that is to be
indicated as newly selected or not
Returns: whether or not the cell is newly selected or not