Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: SceneEventSubscriber

[18:7] extends: FxObj

Wraps FXGL's SceneEventSubscriber (com.almasb.fxgl.app.SceneEventSubscriber), a small handle returned by Scene event-filter / handler registrations. Holds the JavaFX Scene, the event type, the event handler, and a flag that distinguishes filter from handler. Call unsubscribe() to remove the registration. Adopt-only — instances come from the engine when a scene-event subscription is opened.

Methods

  • SceneEventSubscriber ()

    Empty default constructor; populated by adopt.

  • adopt (object Ajo)

    Wraps an existing SceneEventSubscriber AussomJavaObject.

    • @p Ajo is an AussomJavaObject around a SceneEventSubscriber.
  • getFxScene ()

    Returns the JavaFX Scene the subscription is attached to.

  • getEventType ()

    Returns the JavaFX EventType the handler listens for.

  • getEventHandler ()

    Returns the registered EventHandler AJO.

  • isFilter ()

    Returns true when the subscription was added as an event filter (early dispatch), false when added as a regular event handler.

  • unsubscribe ()

    Removes this subscription from the scene. The event handler stops firing immediately.