How to Get Notified of Changes in a Graph2D |
| Applies to: yFiles for Java 2.9, 2.8, 2.7, 2.6, 2.5 |
Type: Questions & Answers
Categories this article belongs to:
| yFiles for Java | > yFiles Viewer | > Displaying and Editing Graphs | > Events and Listeners |
| yFiles for Java | > yFiles Viewer | > Displaying and Editing Graphs | > User Interaction |
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 |
| Keywords: | dirty - Graph2D - graph - listener - event - events - property - change - changes |


