Module javafx.base

Class ReadOnlyDoubleProperty

All Implemented Interfaces:
NumberExpression, Observable, ReadOnlyProperty<Number>, ObservableDoubleValue, ObservableNumberValue, ObservableValue<Number>
Direct Known Subclasses:
DoubleProperty, ReadOnlyDoublePropertyBase

public abstract class ReadOnlyDoubleProperty
extends DoubleExpression
implements ReadOnlyProperty<Number>
Superclass for all readonly properties wrapping a double.
Since:
JavaFX 2.0
See Also:
ObservableDoubleValue, DoubleExpression, ReadOnlyProperty
  • Constructor Details

    • ReadOnlyDoubleProperty

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

    • toString

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

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

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