Package | com.yworks.yfiles.base |
Class | public class GraphEvent |
Inheritance | GraphEvent EventObject YObject Object |
See also
Property | Defined By | ||
---|---|---|---|
data : Object [read-only]
Returns the data object associated with this graph event. | GraphEvent | ||
graph : Graph [read-only]
Returns the graph that is the emitter of this event. | GraphEvent | ||
source : Object [read-only]
Answers the event source. | EventObject | ||
type : int [read-only]
Returns the type of this GraphEvent. | GraphEvent |
Method | Defined By | ||
---|---|---|---|
GraphEvent(source:Graph, type:int, data:Object, init:Boolean = true)
Creates a new GraphEvent instance with given type and data. | GraphEvent | ||
equals(o:Object):Boolean | YObject | ||
getClass():Class [override] | GraphEvent | ||
hashCode():int | YObject | ||
newEventObject(source:Object):EventObject [static]
Constructs a new instance of this class. | EventObject | ||
[static]
Creates a new GraphEvent instance with given type and data. | GraphEvent | ||
toString():String [override]
Returns a String representation of this GraphEvent object's type. | GraphEvent |
Method | Defined By | ||
---|---|---|---|
initEventObject(source:Object):void
Initializes this object. | EventObject | ||
initGraphEvent(source:Graph, type:int, data:Object):void
Initializes this object. | GraphEvent |
Constant | Defined By | ||
---|---|---|---|
EDGE_CREATION : int = 1 [static]
Type constant that identifies an event that gets fired immediately after an edge has been created. | GraphEvent | ||
EDGE_REINSERTION : int = 7 [static]
Type constant that identifies an event that gets fired immediately after an edge has been reinserted into the graph. | GraphEvent | ||
NODE_CREATION : int = 0 [static]
Type constant that identifies an event that gets fired immediately after a node has been created. | GraphEvent | ||
NODE_REINSERTION : int = 6 [static]
Type constant that identifies an event that gets fired immediately after a node has been reinserted into the graph. | GraphEvent | ||
POST_EDGE_CHANGE : int = 9 [static]
Type constant that identifies an event that gets fired immediately after the end points of an edge have been changed. | GraphEvent | ||
POST_EDGE_REMOVAL : int = 5 [static]
Type constant that identifies an event that gets fired immediately after an edge has been removed from the graph. | GraphEvent | ||
POST_EVENT : int = 13 [static]
Type constant that signals the end of a some logically coherent event sequence. | GraphEvent | ||
POST_NODE_REMOVAL : int = 3 [static]
Type constant that identifies an event that gets fired immediately after a node has been removed from the graph. | GraphEvent | ||
PRE_EDGE_CHANGE : int = 8 [static]
Type constant that identifies an event that gets fired immediately before the end points of an edge will be changed. | GraphEvent | ||
PRE_EDGE_REMOVAL : int = 4 [static]
Type constant that identifies an event that gets fired immediately before an edge will be removed from the graph. | GraphEvent | ||
PRE_EVENT : int = 12 [static]
Type constant that signals the start of a some logically coherent event sequence. | GraphEvent | ||
PRE_NODE_REMOVAL : int = 2 [static]
Type constant that identifies an event that gets fired immediately before a node will be removed from the graph. | GraphEvent | ||
SUBGRAPH_INSERTION : int = 10 [static]
Type constant that identifies an event that gets fired after a subgraph of a graph G has been moved to the emitting graph. | GraphEvent | ||
SUBGRAPH_REMOVAL : int = 11 [static]
Type constant that identifies an event that gets fired after a subgraph of the emitting graph has been moved to a graph G. | GraphEvent |
data | property |
data:Object
[read-only] Returns the data object associated with this graph event. For a "Node"-associated event, it returns an object of type y.base.Node. For an "Edge"-associated event, it returns an object of type y.base.Edge. To check the type of event, see the method getType()
public function get data():Object
graph | property |
graph:Graph
[read-only] Returns the graph that is the emitter of this event.
public function get graph():Graph
type | property |
type:int
[read-only] Returns the type of this GraphEvent. It can be either of the type constants defined in this class.
public function get type():int
GraphEvent | () | Constructor |
public function GraphEvent(source:Graph, type:int, data:Object, init:Boolean = true)
Creates a new GraphEvent instance with given type and data.
Parameterssource:Graph | |
type:int | |
data:Object | |
init:Boolean (default = true ) — An internally used switch to help handle proper instance initialization in inheritance chains where classes can have multiple constructor-like factory methods.
This parameter can safely be ignored/omitted when calling the constructor.
|
getClass | () | method |
override public function getClass():Class
ReturnsClass |
initGraphEvent | () | method |
protected final function initGraphEvent(source:Graph, type:int, data:Object):void
Initializes this object. See the documentation of the corresponding factory method newGraphEvent()
for details.
Parameters
source:Graph | |
type:int | |
data:Object |
See also
newGraphEvent | () | method |
public static function newGraphEvent(source:Graph, type:int, data:Object):GraphEvent
Creates a new GraphEvent instance with given type and data.
Parameters
source:Graph | |
type:int | |
data:Object |
GraphEvent |
toString | () | method |
override public function toString():String
Returns a String representation of this GraphEvent object's type.
ReturnsString |
EDGE_CREATION | Constant |
public static const EDGE_CREATION:int = 1
Type constant that identifies an event that gets fired immediately after an edge has been created. The data of the event is the newly created edge.
EDGE_REINSERTION | Constant |
public static const EDGE_REINSERTION:int = 7
Type constant that identifies an event that gets fired immediately after an edge has been reinserted into the graph. The data of the event is the reinserted edge.
NODE_CREATION | Constant |
public static const NODE_CREATION:int = 0
Type constant that identifies an event that gets fired immediately after a node has been created. The data of the event is the newly created node.
NODE_REINSERTION | Constant |
public static const NODE_REINSERTION:int = 6
Type constant that identifies an event that gets fired immediately after a node has been reinserted into the graph. The data of the event is the reinserted node.
POST_EDGE_CHANGE | Constant |
public static const POST_EDGE_CHANGE:int = 9
Type constant that identifies an event that gets fired immediately after the end points of an edge have been changed. The data of the event is the redefined edge.
POST_EDGE_REMOVAL | Constant |
public static const POST_EDGE_REMOVAL:int = 5
Type constant that identifies an event that gets fired immediately after an edge has been removed from the graph. The data of the event is the removed edge.
POST_EVENT | Constant |
public static const POST_EVENT:int = 13
Type constant that signals the end of a some logically coherent event sequence. If specified, the data of this event is its ID.
POST_NODE_REMOVAL | Constant |
public static const POST_NODE_REMOVAL:int = 3
Type constant that identifies an event that gets fired immediately after a node has been removed from the graph. The data of the event is the removed node.
PRE_EDGE_CHANGE | Constant |
public static const PRE_EDGE_CHANGE:int = 8
Type constant that identifies an event that gets fired immediately before the end points of an edge will be changed. The data of the event is the edge to be redefined.
PRE_EDGE_REMOVAL | Constant |
public static const PRE_EDGE_REMOVAL:int = 4
Type constant that identifies an event that gets fired immediately before an edge will be removed from the graph. The data of the event is the edge to be removed.
PRE_EVENT | Constant |
public static const PRE_EVENT:int = 12
Type constant that signals the start of a some logically coherent event sequence. If specified, the data of this event is its ID.
PRE_NODE_REMOVAL | Constant |
public static const PRE_NODE_REMOVAL:int = 2
Type constant that identifies an event that gets fired immediately before a node will be removed from the graph. The data of the event is the node to be removed.
SUBGRAPH_INSERTION | Constant |
public static const SUBGRAPH_INSERTION:int = 10
Type constant that identifies an event that gets fired after a subgraph of a graph G has been moved to the emitting graph. The data of the event is a com.yworks.yfiles.base.NodeList containing the nodes that induce the moved subgraph.
This event gets fired just after the SUBGRAPH_REMOVAL event got fired on the subgraph's original graph G. Note that at the time the event gets fired, the nodes from the node list are already part of the emitting graph.See also
SUBGRAPH_REMOVAL | Constant |
public static const SUBGRAPH_REMOVAL:int = 11
Type constant that identifies an event that gets fired after a subgraph of the emitting graph has been moved to a graph G. The data of the event is a com.yworks.yfiles.base.NodeList containing the nodes that induce the moved subgraph.
This event gets fired just before the SUBGRAPH_INSERTION event will be fired on the subgraph's new graph G. Note that at the time the event gets fired, the nodes from the node list are already part of graph G.See also