Packagecom.yworks.yfiles.base
Interfacepublic interface GraphListener

The listener interface for receiving graph events. A class that is interested in processing a graph event implements this interface. The object created with that class is then registered with a graph. When the graph structure changes, the listener object's onGraphEvent (onGraphEvent()) method is invoked.

The listener object's onGraphEvent method is also invoked on so-called PRE and POST events emitted by the graph. These events signal that a (possibly empty) sequence of graph events is about to be emitted (PRE event) or that the sequence is completed (POST event).

For example, if a node is about to be removed from a graph, then the following sequence of graph events can be observed:
  1. a PRE event
  2. a (possibly empty) sequence of edge removal events
  3. the actual node removal event
  4. a POST event
The POST event concludes the logically coherent sequence of structural graph changes that has been opened by the PRE event.

PRE and POST events must constitute a well-formed bracket-structure, e.g., ( ( () ) () ).

See also

onGraphEvent


Public Methods
 MethodDefined By
  
Invoked when the structure of the graph has changed.
GraphListener
Method Detail
onGraphEvent()method
public function onGraphEvent(e:GraphEvent):void

Invoked when the structure of the graph has changed. The code written for this method performs the operations that need to occur when the graph changes.

Parameters

e:GraphEvent