Limited Double Property
open class LimitedDoubleProperty( lowerBoundInclusive: Number = Double.NEGATIVE_INFINITY, upperBoundInclusive: Number = Double.POSITIVE_INFINITY, initialValue: Number = lowerBoundInclusive) : Property<Double>
Content copied to clipboard
A limited DoubleProperty to a value range. Value will be checked to be in range lowerBoundInclusive to upperBoundInclusive.
Therefore upperBoundInclusive must be greater or equal to lowerBoundInclusive. The Range is constant and cannot be altered after object creation.
Parameters
lower Bound Inclusive
Lower bound inclusive. Default: -inf.
upper Bound Inclusive
Upper bound inclusive. Default: +inf.
initial Value
Initial Value. Default: lowerBoundInclusive.
Throws
If a value out of range is set as initialValue.
Constructors
Link copied to clipboard
fun LimitedDoubleProperty( lowerBoundInclusive: Number = Double.NEGATIVE_INFINITY, upperBoundInclusive: Number = Double.POSITIVE_INFINITY, initialValue: Number = lowerBoundInclusive)
Content copied to clipboard
Creates a LimitedDoubleProperty with given bounds and initial value.
Functions
Link copied to clipboard
Adds a listener silently.
Link copied to clipboard
fun addListenerAndInvoke(initialValue: Double, listener: (Double, Double) -> Unit)
Content copied to clipboard
Adds a listener and calls ValueObserver.update on this new listener with given initial value.
Link copied to clipboard
Removes all listeners.
Link copied to clipboard
Notifies all listeners with current value.
Link copied to clipboard
Removes a listener.