Class TriggerEvent

  • Direct Known Subclasses:
    FocusTriggerEvent, MouseTriggerEvent, TimingTriggerEvent

    public class TriggerEvent
    extends java.lang.Object
    Superclass for all TriggerEvents used in the Trigger classes. The methods here are mostly protected; it is expected that callers will not use this class directly, but will instead use subclasses with pre-defined event types. The purpose of this superclass is to provide the ability for Trigger to treat event types generically, rather than to have all even logic in the subclasses of Trigger.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected TriggerEvent​(java.lang.String name)
      Protected constructor; this helps ensure type-safe use of pre-define TriggerEvent objects.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      TriggerEvent getOppositeEvent()
      This method returns the 'opposite' event from itself.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TriggerEvent

        protected TriggerEvent​(java.lang.String name)
        Protected constructor; this helps ensure type-safe use of pre-define TriggerEvent objects.
    • Method Detail

      • getOppositeEvent

        public TriggerEvent getOppositeEvent()
        This method returns the 'opposite' event from itself. This is used by Trigger in running an auto-reversing animation, to determine whether an opposite event has occurred (and whether to stop/reverse the animation). Note that some events may have no opposite. Default behavior returns same event; subclasses with multiple/opposite events must override to do the right thing here.