Class Scene
java.lang.Object
io.github.somesourcecode.someguiapi.scene.Scene
The Scene class is the container for all content in a scene graph.
The background of the scene is filled as specified by the background property.
For content to be rendered the application must specify a root Node by setting the root property.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidfireOnClick(NodeClickContext context) Fires the onClick event for the node at the given coordinates.Returns the background of the scene.getRoot()Returns the root of the scene.voidsetBackground(Background background) Sets the background of the scene.voidSets the root of the scene.
-
Constructor Details
-
Scene
public Scene()Constructs a new empty scene. -
Scene
Constructs a new scene with the given root.- Parameters:
root- the root of the scene
-
-
Method Details
-
fireOnClick
Fires the onClick event for the node at the given coordinates. The listeners a called for the clicked node and all of its parents, respectively.- Parameters:
context- the click context
-
getRoot
Returns the root of the scene.- Returns:
- the root of the scene
-
setRoot
Sets the root of the scene.- Parameters:
root- the new root of the scene
-
getBackground
Returns the background of the scene.- Returns:
- the background of the scene
-
setBackground
Sets the background of the scene.- Parameters:
background- the new background of the scene
-