Class Event

java.lang.Object
java.util.EventObject
de.intarsys.tools.event.Event
All Implemented Interfaces:
IEvent, Serializable
Direct Known Subclasses:
ActivatedEvent, AttributeChangedEvent, CancelEvent, CancelRequestedEvent, CreatedEvent, DeactivatedEvent, DestroyedEvent, OkEvent, OkRequestedEvent, PreferencesChangeEvent, RequestEvent, ResumedEvent, SelectionEvent, StartedEvent, StoppedEvent, StopRequestedEvent, SuspendedEvent

public class Event extends EventObject implements IEvent
Abstract superclass for event implementations.
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected boolean
    Flag if the event is already handled.
    static final EventType
     
    static final Object
     
    protected boolean
    Flag if execution of the action that is announced by the event is interrupted by one of the listeners.

    Fields inherited from class java.util.EventObject

    source
  • Constructor Summary

    Constructors
    Constructor
    Description
    Event(Object source)
    Create a new event object.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Indicate that this event does not need to be propagated any further as it is already processed by some listener.
    A type for this event.
    A name for this event.
    boolean
     
    boolean
    true if this event is already consumed by some listener.
    boolean
    true if this event is already vetoed by some listener.
    void
    setRc(boolean value)
     
    void
    setVeto(boolean value)
     
    void
    Indicate that the behavior associated with this event should not be performed by the source.

    Methods inherited from class java.util.EventObject

    getSource, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface de.intarsys.tools.event.IEvent

    getSource
  • Field Details

    • ID_ALL

      public static final Object ID_ALL
    • ID

      public static final EventType ID
    • consumed

      protected boolean consumed
      Flag if the event is already handled.
    • veto

      protected boolean veto
      Flag if execution of the action that is announced by the event is interrupted by one of the listeners.
  • Constructor Details

    • Event

      public Event(Object source)
      Create a new event object.
      Parameters:
      source - The object that created the event.
  • Method Details

    • consume

      public void consume()
      Description copied from interface: IEvent
      Indicate that this event does not need to be propagated any further as it is already processed by some listener.
      Specified by:
      consume in interface IEvent
    • getEventType

      public EventType getEventType()
      Description copied from interface: IEvent
      A type for this event.
      Specified by:
      getEventType in interface IEvent
      Returns:
      A type for this event.
    • getName

      public String getName()
      Description copied from interface: IEvent
      A name for this event.
      Specified by:
      getName in interface IEvent
      Returns:
      A name for this event.
    • getRc

      public boolean getRc()
    • isConsumed

      public boolean isConsumed()
      Description copied from interface: IEvent
      true if this event is already consumed by some listener.
      Specified by:
      isConsumed in interface IEvent
      Returns:
      true if this event is already consumed by some listener.
    • isVetoed

      public boolean isVetoed()
      Description copied from interface: IEvent
      true if this event is already vetoed by some listener.
      Specified by:
      isVetoed in interface IEvent
      Returns:
      true if this event is already vetoed by some listener.
    • setRc

      public void setRc(boolean value)
    • setVeto

      public void setVeto(boolean value)
    • veto

      public void veto()
      Description copied from interface: IEvent
      Indicate that the behavior associated with this event should not be performed by the source.
      Specified by:
      veto in interface IEvent