Package com.j3d.engine.react.events
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 Summary
Modifier and TypeMethodDescriptionvoidattachListener(EventListener event) Registers an event listener into the list of listeners.<K> voidbroadcast(EventType eventType, EventPayload<K> properties) Calls all events with the given event type and broadcast propertiesvoidDeregisters all event listeners.voiddetachListener(EventListener event) Deregisters an event listener.booleanChecks if the given event listener is attached to this event emitter.
-
Method Details
-
attachListener
Registers an event listener into the list of listeners.- Parameters:
event- The listener to attach
-
detachListener
Deregisters an event listener.- Parameters:
event- The listener to detach.
-
detachAll
void detachAll()Deregisters all event listeners. -
broadcast
Calls all events with the given event type and broadcast properties- Parameters:
eventType- The event type.properties- Properties to pass onto the listener.
-
isAttached
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.
-