|
JGraph |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.EventObject
org.jgraph.event.GraphSelectionEvent
public class GraphSelectionEvent
An event that characterizes a change in the current selection. The change is based on any number of cells. GraphSelectionListeners will generally query the source of the event for the new selected status of each potentially changed cell.
GraphSelectionListener
,
GraphSelectionModel
,
Serialized FormField Summary | |
---|---|
protected boolean[] |
areNew
For each cell identifies if that cell is in fact new. |
protected Object[] |
cells
Cells this event represents. |
Fields inherited from class java.util.EventObject |
---|
source |
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(int index)
Returns true if the cell identified by index was added to
the selection. |
boolean |
isAddedCell(Object cell)
Returns true if the cell identified by cell was added to the selection. |
Methods inherited from class java.util.EventObject |
---|
getSource, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected Object[] cells
protected boolean[] areNew
Constructor Detail |
---|
public GraphSelectionEvent(Object source, Object[] cells, boolean[] areNew)
source
- source of eventcells
- the paths that have changed in the selectionMethod Detail |
---|
public Object[] getCells()
public Object getCell()
public boolean isAddedCell()
public boolean isAddedCell(Object cell)
public boolean isAddedCell(int index)
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 if
index < 0 || >= getPaths
.length.
public Object cloneWithSource(Object newSource)
|
JGraph |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |