Interface EventEmitterInterface

All Known Implementing Classes:
AlwaysMouseOwner, BooleanSetting, Camera, CommandPaletteStep, Commands, ComplexSetting, DoubleClickStep, DoubleSetting, EnumSetting, EventEmitter, GCurve, GLine, GObject, GPoint, GTri, GuideFlow, GuideInfo, IntSetting, MouseOwner, NoMouseOwner, ObjectExplainerStep, OrbitMouseOwner, QTranslateMouseOwner, ReactivePoint, RotateMouseOwner, ScaleMouseOwner, SceneExplStep, SelectionMouseOwner, SelectionStep, Setting, SnapMouseOwner, StringSetting, TransformMouseOwner, TranslateMouseOwner, UIExplainerStep, WelcomeStep

public interface EventEmitterInterface
EventEmitterInterface is an interface that allows for other classes to attach events that they can broadcast to at any time. This is available for classes that cannot extend EventEmitter `but still want to have event broadcasting capabilities.
  • Method Details

    • attachListener

      void attachListener(EventListener event)
      Registers an event listener into the list of listeners.
      Parameters:
      event - The listener to attach
    • detachListener

      void detachListener(EventListener event)
      Deregisters an event listener.
      Parameters:
      event - The listener to detach.
    • detachAll

      void detachAll()
      Deregisters all event listeners.
    • broadcast

      <K> void broadcast(EventType eventType, EventPayload<K> properties)
      Calls all events with the given event type and broadcast properties
      Parameters:
      eventType - The event type.
      properties - Properties to pass onto the listener.
    • isAttached

      boolean isAttached(EventListener e)
      Checks if the given event listener is attached to this event emitter.
      Parameters:
      e - The event listener to check.
      Returns:
      True if the event listener is attached, false otherwise.