How to Get Notified of Changes in a Graph2D
Applies to: yFiles for Java 2.9, 2.8, 2.7, 2.6, 2.5 print article email article

Type: Questions & Answers

Fine-grained "is dirty" support for class Graph2D.

Getting notified of property changes for the displayed graph elements of a Graph2D can be realized in several ways. Apart from the support through the Graph2DListener interface, further realizer-centric as well as mouse gesture-centric schemes can be used to achieve fine-grained notifications for property changes.

Mouse gesture-centric means that the view mode that is responsible for handling a specific mouse gesture is used to get notifications. Realizer-centric means that node realizer or edge realizer classes are enhanced to initiate the notification.
Both these schemes are presented in the following Knowledge Base article: Listening to and Efficiently Handling Graphical Property Changes. (Creating and Firing Additional Event Types is another Knowledge Base article that presents an alternative mouse gesture-centric approach.)

Note
The view modes that are responsible for specific mouse gestures are most commonly specialized modes (also called child modes) of class EditMode.
The yFiles Developer's Guide lists the specialized view modes of class EditMode . Some of them are hierarchy-aware .

Keywords: dirty - Graph2D - graph - listener - event - events - property - change - changes

Provide feedback:
How useful was this article?    less 1 2 3 4 5 more
Email address (optional):
COPYRIGHT © 2012 yWorks · ALL RIGHTS RESERVED imprint | terms of use | privacy policy | home