Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: FXGLPane

[20:7] extends: Region

Wraps FXGL's FXGLPane (com.almasb.fxgl.app.FXGLPane), a JavaFX Region subclass that hosts the FXGL render surface inside a regular JavaFX scene graph. Use when embedding an FXGL game inside a wider JavaFX desktop app (e.g. an editor that owns the menu bar / palettes around the game viewport). Construct with the desired pixel render width / height; the pane exposes render-width / render-height / render-fill as bindable observable properties so the game viewport can resize with the host window.

Methods

  • FXGLPane (double Width = 800.0, double Height = 600.0)

    Creates a new FXGLPane sized to (Width, Height) pixels.

    • @p Width is the initial render width in pixels.
    • @p Height is the initial render height in pixels.
  • adopt (object Ajo)

    Wraps an existing FXGLPane AussomJavaObject.

  • getAllChildren ()

    Returns the live ObservableList of every child the pane holds (including the engine's render surface).

  • getRenderWidth ()

    Returns the current render width in pixels.

  • setRenderWidth (double V)

    Sets the render width in pixels.

  • getRenderHeight ()

    Returns the current render height in pixels.

  • setRenderHeight (double V)

    Sets the render height in pixels.

  • getRenderFill ()

    Returns the render Paint AJO (background fill).

  • setRenderFill (object PaintObj)

    Sets the render Paint (background fill).

    • @p PaintObj is a Paint AJO (e.g. a Color).
  • renderWidthProperty ()

    Returns the render-width DoubleProperty for binding.

  • renderHeightProperty ()

    Returns the render-height DoubleProperty for binding.

  • renderFillProperty ()

    Returns the render-fill ObjectProperty for binding.