Interface ActionTask


  • public interface ActionTask

    Definition of an interface for the task of an action.

    Each FormAction object is associated with a target object, which will be called when the action is triggered. The default implementations support different types or target objects. One possibility is that the target object implements this interface. It defines a single run() method that expects the event object, which triggered the action, as argument.

    Action can also deal with plain Runnable objects. If the logic behind an action does not care about the triggering event, using just a Runnable may be easier.

    Version:
    $Id: ActionTask.java 205 2012-01-29 18:29:57Z oheger $
    Author:
    Oliver Heger
    See Also:
    FormAction
    • Method Detail

      • run

        void run​(FormAction action,
                 BuilderEvent event)
        Implements the logic behind an action. This method will be called when an action is triggered (when its execute() method is invoked). The passed in parameters can be used to further distinguish the operations to perform.
        Parameters:
        action - the calling action
        event - the event that triggered the action