Basics
Guides
API Reference
Basics
Guides
API Reference
[15:7] extends: FxObj
Wraps FXGL's EventBus, the synchronous JavaFX-based event dispatcher used across the engine. Aussom users construct one directly or reach the engine instance through the FXGL DSL. Events are JavaFX Event subclasses identified by their EventType. addEventHandler returns a Subscriber that can be unsubscribed later or via removeAllEventHandlers.
EventBus (Ajo = null)
Creates an EventBus wrapper. With no argument constructs a new FXGL EventBus; with an AussomJavaObject wraps an existing one (used by fxgl.getEventBus).
Ajo is an optional AussomJavaObject around an FXGL EventBus.adopt (object Ajo)
Wraps an existing EventBus AussomJavaObject.
Ajo is an AussomJavaObject around an EventBus.A new wrapper.addEventHandler (object EventType, callback Handler)
Registers an EventHandler for the given EventType. Returns a Subscriber whose unsubscribe method detaches the handler.
EventType is an AussomJavaObject around a javafx.event.EventType.Handler is a callback that takes the event as its argument.An AussomJavaObject wrapping a Subscriber.removeEventHandler (object EventType, object Handler)
Removes a previously registered handler for the given EventType.
EventType is the same EventType passed to addEventHandler.Handler is the same AussomJavaObject returned by aji.closure.this objectremoveAllEventHandlers ()
Unsubscribes every handler this bus currently holds.
this objectfireEvent (object Event)
Fires the given Event synchronously to every matching handler.
Event is an AussomJavaObject around a javafx.event.Event.this objectsetLoggingEnabled (bool Enabled)
Sets whether debug logging is enabled for fired events.
Enabled is a bool.this object
Aussom
Write once. Embed everywhere.
Copyright 2026 Austin Lehman. All rights reserved.