Class UserActionListener<T extends UserAction<?>>

All Implemented Interfaces:

public abstract class UserActionListener<T extends UserAction<?>> extends ActionListener<T>
Abstract ActionListener.
T is the type of UserAction this listener listens to. If the check method returns true, the actions defined in before, concurrent and after will be executed

  • extend this class (define T!)
  • implement check method
  • add actions which should be executed if this.check(T action) return true
You can use the provided methods (of the super class ActionListener):
  • addBeforeEvent(CoreAction a)
  • addReplaceEvent(CoreAction a)
  • addAfterEvent(CoreAction a)
BeforeEvents will be executed before the target action, this events should be executed successfully before the target action can be executed
ReplaceEvent will be executed instead of the target action.
AfterEvents will be executed after a successful execution of the target/replace action.
  • Constructor Details

    • UserActionListener

      public UserActionListener(Class<T> targetClass)
      Creates a new user action listener.
      targetClass - the class of the user action