ObjectProperty

Factory for [[scalafx.beans.property.ObjectProperty]] instances.

Factory for [[scalafx.beans.property.ObjectProperty]] instances.

Companion
class
class Object
trait Matchable
class Any

Value members

Concrete methods

def apply[T](initialValue: T): ObjectProperty[T]

Creates a new ObjectProperty.

Creates a new ObjectProperty.

Value Params
initialValue

the initial value.

def apply[J <: Object](value: SFXDelegate[J]): ObjectProperty[J]

Creates a new ObjectProperty with a scalafx.delegate.SFXDelegate as initial value.

Creates a new ObjectProperty with a scalafx.delegate.SFXDelegate as initial value.

Special case when value is an ScalaFX wrapper, to be used as a work around for https://github.com/scalafx/scalafx/issues/14. Created object property will have value type of the wrapped JavaFX type to simplify use with binding.

Type Params
J

the JavaFX type of the value hold by this object property.

Value Params
value

the initial value.

def apply[T](bean: Object, name: String): ObjectProperty[T]

Creates a new ObjectProperty with its reference bean and name.

Creates a new ObjectProperty with its reference bean and name.

Value Params
bean

The bean of this ObjectProperty

name

The name of this ObjectProperty

def apply[T](bean: Object, name: String, initialValue: T): ObjectProperty[T]

Creates a new ObjectProperty with with its reference bean and name and initial value.

Creates a new ObjectProperty with with its reference bean and name and initial value.

Value Params
bean

The bean of this ObjectProperty

initialValue

The initial value of the wrapped value

name

The name of this ObjectProperty

def apply[J <: Object](bean: Object, name: String, initialValue: SFXDelegate[J]): ObjectProperty[J]

Creates a new ObjectProperty with with its reference bean and name and a scalafx.delegate.SFXDelegate as initial value.

Creates a new ObjectProperty with with its reference bean and name and a scalafx.delegate.SFXDelegate as initial value.

Special case when value is an ScalaFX wrapper, to be used as a work around for https://github.com/scalafx/scalafx/issues/14. Created object property will have value type of the wrapped JavaFX type to simplify use with binding.

Type Params
J

the JavaFX type of the value hold by this object property.

Value Params
bean

The bean of this ObjectProperty

initialValue

The initial value of the wrapped value

name

The name of this ObjectProperty

def fillProperty[J <: AnyRef](property: ObjectProperty[J], value: SFXDelegate[J]): Unit

Helper method for setting a value of an ObjectProperty, it gracefully deals with value that could be null, without causing NullPointerException.

Helper method for setting a value of an ObjectProperty, it gracefully deals with value that could be null, without causing NullPointerException.

Handles situation when value is of ScalaFX type, to avoid implicit conversion and NPE is value is null.

Type Params
J

ObjectProperty type

Value Params
property

ObjectProperty to be filled.

value

Value to be injected in ObjectProperty, to avoid implicit conversion and NPE is value is null.

def fillProperty[J <: AnyRef](property: ObjectProperty[J], value: J): Unit

Helper method for setting a value of an ObjectProperty, it gracefully deals with value that could be null, without causing NullPointerException.

Helper method for setting a value of an ObjectProperty, it gracefully deals with value that could be null, without causing NullPointerException.

Handles situation when value is of JavaFX type, to avoid implicit conversion and NPE is value is null.

Type Params
J

ObjectProperty type

Value Params
property

ObjectProperty to be filled.

value

Value to be injected in ObjectProperty.

Implicits

Implicits

implicit def sfxObjectProperty2jfx[T](op: ObjectProperty[T]): ObjectProperty[T]

Implicit conversion from a ScalaFX's ObjectProperty to a JavaFX's `ObjectProperty`, extracting its delegate.

Implicit conversion from a ScalaFX's ObjectProperty to a JavaFX's `ObjectProperty`, extracting its delegate.

Value Params
op

ScalaFX's ObjectProperty

Returns

JavaFX's ObjectProperty, extracted from op's delegate.