Customizing actions behavior

In this section, we will discuss how the user can customize the existing actions.

All actions implement the IAction interface. Customizing an action refers to redefining the target and overriding the methods. To understand this process we should describe the life cycle of the action injection. An action should be registered on the visualizer with the Visualizer.registerAction() method. Once an action is registered, it will be handled by the visualizer that will execute it. Executing an action refers to calling the IAction.activate() method, so, if a user wants to personalize an action, he should modify the activate method. For example, in the DisplaceAction class, the activate() methods tries to launch the displacement movement of the target. If a user wants to draw the displacement path, he should modify this method.