Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: Property

[27:7] extends: FxObj

Wraps JavaFX's javafx.beans.property.Property<T> — the shared surface every typed property (IntegerProperty, BooleanProperty, StringProperty, ObjectProperty, etc.) inherits. Holds the binding + listener API common to all properties: bind / unbind for one-way binding to an Observable, the bidirectional pair for two-way binding, addListener for both ChangeListener and InvalidationListener, plus the read-only surface getName / getBean / isBound that the abstract ReadOnlyProperty side contributes. Typed-value access (get / set / getValue / setValue) is left to each concrete subclass (IntegerProperty, etc.) so the parameter type matches the underlying primitive Java signature. Aussom users don't usually instantiate Property directly — use one of the concrete typed subclasses or adopt an existing AJO returned by a widget's xProperty() accessor.

Methods

  • Property ()

    Empty default constructor; populated by adopt or a subclass.

  • adopt (object Ajo)

    Wraps an existing Property AussomJavaObject.

    • @p Ajo is an AussomJavaObject around a javafx Property.
    • @r A new Property wrapper.
  • getValue ()

    Returns the property's value as a boxed AJO (Number for numeric properties, String, Boolean, or arbitrary Object).

    • @r An AussomJavaObject around the value.
  • bind (Observable)

    Binds this property to the given Observable. The property's value tracks the observable until unbind() is called.

    • @p Observable is another property wrapper or a raw AJO.
    • @r this object
  • unbind ()

    Removes any one-way binding established by bind().

    • @r this object
  • bindBidirectional (Other)

    Establishes a two-way binding with Other. Either side's value mirrors to the other.

    • @p Other is another property wrapper or raw AJO.
    • @r this object
  • unbindBidirectional (Other)

    Tears down a two-way binding created by bindBidirectional.

    • @p Other is the other property the binding was set up with.
    • @r this object
  • addListener (callback Cb)

    Registers a 3-arg ChangeListener callback and returns a listener reference the caller can pass back to removeListener.

    • @p Cb is (observable, oldValue, newValue) -> void.
    • @r A listener reference (for removeListener).
  • addInvalidationListener (callback Cb)

    Registers a 1-arg InvalidationListener callback and returns a listener reference the caller can pass back to removeListener.

    • @p Cb is (observable) -> void.
    • @r A listener reference (for removeListener).
  • removeListener (object Listener)

    Removes a previously-registered listener. Pass the listener reference returned by addListener or addInvalidationListener.

    • @p Listener is the listener reference previously returned.
    • @r this object
  • isBound ()

    True when bind() has wired this property to an Observable.

  • getName ()

    Returns the property's name (empty string by default).

  • getBean ()

    Returns the bean owning this property (null by default).