java.lang.Object
io.github.somesourcecode.someguiapi.scene.Scene

public class Scene extends Object
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 Details

    • Scene

      public Scene()
      Constructs a new empty scene.
    • Scene

      public Scene(Parent root)
      Constructs a new scene with the given root.
      Parameters:
      root - the root of the scene
  • Method Details

    • fireOnClick

      public void fireOnClick(NodeClickContext context)
      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

      public Parent getRoot()
      Returns the root of the scene.
      Returns:
      the root of the scene
    • setRoot

      public void setRoot(Parent root)
      Sets the root of the scene.
      Parameters:
      root - the new root of the scene
    • getBackground

      public Background getBackground()
      Returns the background of the scene.
      Returns:
      the background of the scene
    • setBackground

      public void setBackground(Background background)
      Sets the background of the scene.
      Parameters:
      background - the new background of the scene