Module javafx.base

Class ReadOnlyFloatProperty

All Implemented Interfaces:
NumberExpression, Observable, ReadOnlyProperty<Number>, ObservableFloatValue, ObservableNumberValue, ObservableValue<Number>
Direct Known Subclasses:
FloatProperty, ReadOnlyFloatPropertyBase

public abstract class ReadOnlyFloatProperty
extends FloatExpression
implements ReadOnlyProperty<Number>
Superclass for all readonly properties wrapping a float.
Since:
JavaFX 2.0
See Also:
ObservableFloatValue, FloatExpression, ReadOnlyProperty
  • Constructor Details

    • ReadOnlyFloatProperty

      public ReadOnlyFloatProperty()
      The constructor of ReadOnlyFloatProperty.
  • Method Details

    • toString

      public String toString()
      Returns a string representation of this ReadOnlyFloatProperty object.
      Overrides:
      toString in class Object
      Returns:
      a string representation of this ReadOnlyFloatProperty object.
    • readOnlyFloatProperty

      public static <T extends Number> ReadOnlyFloatProperty readOnlyFloatProperty​(ReadOnlyProperty<T> property)
      Returns a ReadOnlyFloatProperty that wraps a ReadOnlyProperty. If the ReadOnlyProperty is already a ReadOnlyFloatProperty, it will be returned. Otherwise a new ReadOnlyFloatProperty is created that is bound to the ReadOnlyProperty. Note: null values will be interpreted as 0f
      Type Parameters:
      T - The type of Number to be wrapped
      Parameters:
      property - The source ReadOnlyProperty
      Returns:
      A ReadOnlyFloatProperty that wraps the ReadOnlyProperty if necessary
      Throws:
      NullPointerException - if property is null
      Since:
      JavaFX 8.0
    • asObject

      public ReadOnlyObjectProperty<Float> asObject()
      Creates a ReadOnlyObjectProperty that holds the value of this ReadOnlyFloatProperty. If the value of this ReadOnlyFloatProperty changes, the value of the ReadOnlyObjectProperty will be updated automatically.
      Overrides:
      asObject in class FloatExpression
      Returns:
      the new ReadOnlyObjectProperty
      Since:
      JavaFX 8.0