Event Logging

If you have a look at our previous examples, you will see that many implemented methods log event descriptions to the console. All graph event classes implement interface GraphRootEvent respectively VisualGraphRootEvent which define the method getDescription(). This method returns a textual description of the occurred event.

Example 8.4. Event Logging Source Listing

// Assuming you are using a logger like log4j         
logger.log(anyEvent.getDescription());