Injecting Custom Actions

Besides default actions, the Visualizer and the Diagrammer can be enriched by new actions. These injected action have to implement the IAction interface. It is recommended to subclass the Action class and override the needed methods without having to re-implement default methods. An action should at least implement three main methods activate, update and deactivate. The action execution is handled by the activate method, and the user should describe in this method the main function of his action. The deactivate method should describe the behavior when the user wants to deactivate his action, i.e all listeners should be removed and all allocated resources should be freed. The update method is called when the data is changed, in which the user should describe the new behavior of his action when any data change is detected. The user can define his own data that will be used to execute the action. this data will be described when registering the action. After creating an action the user should register it on the Visualizer.register().