Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: Bindings

[26:14] static extends: object

Static helper around javafx.beans.binding.Bindings. Only the when(cond) entry point is exposed here, since that is the one Aussom callers asked for to build conditional bindings for UI properties. Returns a When wrapper that fluents into .then(value).otherwise(value). Use: binding = Bindings.when(button.hoverProperty()) .then(redObservable) .otherwise(blackObservable); label.textFillProperty().bind(binding.obj); The richer Bindings static surface (add, subtract, multiply, divide, equal, notEqual, min, max, etc.) is not wrapped yet; callers needing those can drop to aji.invokeStaticRaw("javafx.beans.binding.Bindings", ...) directly.

Methods

  • when (Condition)

    Starts a conditional binding driven by a JavaFX ObservableBooleanValue. The returned When wrapper supplies the then(value) continuation.

    • @p Condition is an Aussom wrapper around an ObservableBooleanValue, or a raw AussomJavaObject.
    • @r A new When wrapper.

class: ConditionBuilder

[100:7] extends: FxObj

Wraps the typed XxxConditionBuilder returned by When.then(value) (NumberConditionBuilder, BooleanConditionBuilder, StringConditionBuilder, or ObjectConditionBuilder). Final step in the Bindings.when chain: otherwise(value) returns the resulting Binding AJO.

Methods

  • ConditionBuilder ()

    Empty default constructor; populated by When.then.

  • adopt (object Ajo)

    Wraps an existing XxxConditionBuilder AussomJavaObject.

    • @p Ajo is an AussomJavaObject around a JavaFX condition builder.
    • @r A new ConditionBuilder wrapper.
  • otherwise (Value)

    Supplies the value used while the condition is false. Returns the final Binding AJO (NumberBinding / BooleanBinding / StringBinding / ObjectBinding) which can be bound to a JavaFX Property via Property.bind(...).

    • @p Value is the on-false value or observable.
    • @r An AussomJavaObject around the resulting Binding.

class: When

[56:7] extends: FxObj

Wraps a javafx.beans.binding.When builder produced by Bindings.when(cond). Use then(value) to pick the value applied when the condition is true; the returned ConditionBuilder then accepts the false-branch value via otherwise(value).

Methods

  • When ()

    Empty default constructor; populated by Bindings.when.

  • adopt (object Ajo)

    Wraps an existing When AussomJavaObject.

    • @p Ajo is an AussomJavaObject around a When builder.
    • @r A new When wrapper.
  • then (Value)

    Supplies the value used while the condition is true. JavaFX picks the matching typed builder (Number/Boolean/String/Object). The Value argument may be a primitive (int / double / bool / string), a JavaFX Observable AJO, or an Aussom wrapper whose .obj carries one.

    • @p Value is the on-true value or observable.
    • @r A new ConditionBuilder wrapper.