Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: NumberProperty

[26:7] extends: Property

Wraps JavaFX's javafx.beans.binding.NumberExpressionBase surface that every numeric property (IntegerProperty, LongProperty, FloatProperty, DoubleProperty) inherits via its XxxExpression abstract base. The only addition over the plain Property wrapper is the asString family — three overloads on the Java side that produce a StringBinding observing this numeric property and formatting its value: asString() toString() of the value asString(format) printf-style format ("%d", "%.2f") asStringLocale(loc, fmt) same with explicit Locale Concrete numeric subclasses inherit this base and only add their typed get / set / setValue methods.

Methods

  • NumberProperty ()

    Empty default constructor; populated by adopt or a subclass.

  • adopt (object Ajo)

    Wraps an existing numeric Property AussomJavaObject.

    • @p Ajo is an AussomJavaObject around a javafx numeric Property.
    • @r A new NumberProperty wrapper.
  • asString (string Format = null)

    Returns a StringBinding that observes this numeric property and formats its value with the default toString. With a non-null Format parameter, formats with the given printf-style format string (e.g. "%d", "%.2f").

    • @p Format is an optional printf-style format string.
    • @r An AussomJavaObject around a StringBinding.
  • asStringLocale (object Locale, string Format)

    Returns a StringBinding that observes this numeric property and formats its value with the given Locale and printf-style format.

    • @p Locale is an AussomJavaObject around a java.util.Locale.
    • @p Format is a printf-style format string.
    • @r An AussomJavaObject around a StringBinding.