Basics
Guides
API Reference
Basics
Guides
API Reference
[19:7] extends: State
Wraps FXGL's Scene (com.almasb.fxgl.scene.Scene), the abstract base for every FXGL scene type. A Scene has its own scene-local Input, Timer, and content Pane (contentRoot). FXGLScene, GameScene, LoadingScene, FXGLMenu, and SubScene all extend it. Scene is abstract; Aussom users hold a Scene wrapper via adopt after obtaining one from the running engine (for example fxgl.getSceneService().getCurrentScene in chunk 6). The shared accessors here apply to every concrete scene type.
Scene ()
Empty default constructor; populated by adopt.
adopt (object Ajo)
Wraps an existing Scene AussomJavaObject.
Ajo is an AussomJavaObject around an FXGL Scene.A new wrapper.getContentRoot ()
Returns the scene's content root Pane (the parent of every node added through addChild).
An AussomJavaObject around a javafx.scene.layout.Pane.getInput ()
Returns the scene-local Input service.
An AussomJavaObject around an FXGL Input.getTimer ()
Returns the scene-local Timer service.
An AussomJavaObject around an FXGL Timer.addChild (object NodeObj)
Adds a JavaFX Node to this scene's contentRoot.
NodeObj is a wrapper exposing the node via .obj.this objectremoveChild (object NodeObj)
Removes a JavaFX Node from this scene's contentRoot.
NodeObj is a wrapper exposing the node via .obj.this objectaddListener (object ListenerObj)
Adds an Updatable listener that fires on every scene update tick.
ListenerObj is an AussomJavaObject around an Updatable.this objectremoveListener (object ListenerObj)
Removes a previously added Updatable listener.
ListenerObj is the AussomJavaObject originally passed to addListener.this objectisSubState ()
Returns true when this Scene is a SubScene.
A bool.isAllowConcurrency ()
Returns true when concurrent SubScenes are allowed on top of this Scene.
A bool.getRoot ()
Returns the scene's content-root Pane AJO.
bindSize (object WidthProp, object HeightProp, object ScaleRatioXProp, object ScaleRatioYProp)
Binds the scene size and scale to the supplied window-size DoubleProperties. Used by the engine to keep the scene laid out as the window resizes; rarely called directly.
WidthProp is a DoubleProperty AJO.HeightProp is a DoubleProperty AJO.ScaleRatioXProp is a DoubleProperty AJO.ScaleRatioYProp is a DoubleProperty AJO.onCreate ()
Lifecycle hook: invoked when the scene is created.
onDestroy ()
Lifecycle hook: invoked when the scene is destroyed.

Aussom
Write once. Embed everywhere.
Copyright 2026 Austin Lehman. All rights reserved.