Search this API

y.view
Class Graph2DSelectionEvent

java.lang.Object
  extended by java.util.EventObject
      extended by y.view.Graph2DSelectionEvent
All Implemented Interfaces:
java.io.Serializable

public class Graph2DSelectionEvent
extends java.util.EventObject

An event which indicates that the selection state of an edge, an edge label, a bend, a node, a node label, or a node port in a Graph2D has changed.

This event is generated by an EdgeRealizer, an EdgeLabel, a Bend, a NodeRealizer, a NodeLabel, or a NodePort instance whose selection state changes.

The event is passed to every Graph2DSelectionListener instance that has been registered to receive such events using the corresponding graph's addGraph2DSelectionListener method.

Each Graph2DSelectionEvent has a subject whose selection state changed. The subject can be either of type EdgeRealizer, EdgeLabel, Bend, NodeRealizer, NodeLabel, or NodePort.

See Also:
Serialized Form
 

Field Summary
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
Graph2DSelectionEvent(Graph2D source, java.lang.Object subject)
          Creates a new Instance of GraphEvent with given type and data
 
Method Summary
 Graph2D getGraph2D()
          Returns the graph that is the emitter of this event.
 java.lang.Object getSubject()
          Returns the subject whose selection state changed.
 boolean isBendSelection()
          Returns whether or not the subject is of type Bend.
 boolean isEdgeSelection()
          Returns whether or not the subject is of type Edge.
 boolean isNodeSelection()
          Returns whether or not the subject is of type Node.
 
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
 

Constructor Detail

Graph2DSelectionEvent

public Graph2DSelectionEvent(Graph2D source,
                             java.lang.Object subject)
Creates a new Instance of GraphEvent with given type and data

Method Detail

isNodeSelection

public boolean isNodeSelection()
Returns whether or not the subject is of type Node.


isEdgeSelection

public boolean isEdgeSelection()
Returns whether or not the subject is of type Edge.


isBendSelection

public boolean isBendSelection()
Returns whether or not the subject is of type Bend.


getSubject

public java.lang.Object getSubject()
Returns the subject whose selection state changed. The subject is either of type Node or of type Edge.


getGraph2D

public Graph2D getGraph2D()
Returns the graph that is the emitter of this event.


© Copyright 2000-2022,
yWorks GmbH.
All rights reserved.