Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: UpdatableObjectProperty

[16:7] extends: FxObj

Wraps FXGL's UpdatableObjectProperty (com.almasb.fxgl.core.collection.UpdatableObjectProperty), a SimpleObjectProperty subclass that lets the engine force a listener fire even when the underlying reference is unchanged. Used by sprite-sheet animation and other places where the same object instance is repeatedly mutated and downstream listeners still need a tick notification.

Methods

  • UpdatableObjectProperty (object InitialValue = null)

    Creates a new UpdatableObjectProperty wrapping InitialValue.

    • @p InitialValue is the property's starting value (any AJO).
  • adopt (object Ajo)

    Wraps an existing UpdatableObjectProperty AussomJavaObject.

    • @p Ajo is an AussomJavaObject around an UpdatableObjectProperty.
    • @r A new wrapper.
  • get ()

    Returns the current value as a raw AJO.

  • set (object Value)

    Replaces the property's value.

    • @p Value is the new value.
  • addListener (object ListenerAjo)

    Adds a ChangeListener AJO. Use aji.closure on javafx.beans.value.ChangeListener to build one from an Aussom callback.

  • removeListener (object ListenerAjo)

    Removes a previously added ChangeListener.

  • forceUpdateListeners (object OldValue, object NewValue)

    Fires every registered ChangeListener with the supplied (oldValue, newValue) pair, even when the property's current value did not change.

    • @p OldValue is the old value AJO.
    • @p NewValue is the new value AJO.