BufferProperty

scalafx.beans.property.BufferProperty
See theBufferProperty companion object
class BufferProperty[E](val delegate: ListProperty[E]) extends ReadOnlyBufferProperty[E], Property[ObservableBuffer[E], ObservableList[E]], SFXDelegate[ListProperty[E]]

Wraps a JavaFX [[ ListProperty.

Attributes

Companion
object
Graph
Supertypes
trait Property[ObservableBuffer[E], ObservableList[E]]
trait ReadOnlyProperty[ObservableBuffer[E], ObservableList[E]]
trait ObservableValue[ObservableBuffer[E], ObservableList[E]]
trait Observable
trait SFXDelegate[ListProperty[E]]
class BufferExpression[E]
class Object
trait Matchable
class Any
Show all
Known subtypes

Members list

Value members

Constructors

def this(value: ObservableBuffer[E])

The constructor of BufferProperty

The constructor of BufferProperty

Value parameters

value

the initial value of the wrapped value

Attributes

def this(bean: Any, name: String)

The constructor of BufferProperty

The constructor of BufferProperty

Value parameters

bean

the bean of this BufferProperty

name

the name of this BufferProperty

Attributes

def this(bean: Any, name: String, value: ObservableBuffer[E])

The constructor of BufferProperty

The constructor of BufferProperty

Value parameters

bean

the bean of this BufferProperty

name

the name of this BufferProperty

value

the initial value of the wrapped value

Attributes

def this(items: Seq[E])

Creates a new BufferProperty and a its value from a sequence of elements.

Creates a new BufferProperty and a its value from a sequence of elements.

Value parameters

items

Sequence of elements to assign to BufferProperty value

Attributes

Returns

new BufferProperty from items

def this(bean: Any, name: String, items: Seq[E])

Creates a new BufferProperty and a its value from a sequence of elements.

Creates a new BufferProperty and a its value from a sequence of elements.

Value parameters

bean

the bean of this BufferProperty

items

Sequence of elements to assign to BufferProperty value

name

the name of this BufferProperty

Attributes

Returns

new BufferProperty from items

Concrete methods

override def value_=(v: ObservableBuffer[E]): Unit

Set the wrapped value.

Set the wrapped value.

Value parameters

v

The new value

Attributes

Definition Classes

Inherited methods

def ++=(xs: Seq[E]): Boolean

Attributes

Inherited from:
BufferExpression
def ++=(elem1: E, elem2: E, elems: E*): Boolean

Attributes

Inherited from:
BufferExpression
def +=(element: E): Boolean

Attributes

Inherited from:
BufferExpression
def --=(xs: Seq[E]): Boolean

Attributes

Inherited from:
BufferExpression
def --=(elem1: E, elem2: E, elems: E*): Boolean

Attributes

Inherited from:
BufferExpression
def -=(element: E): Boolean

Attributes

Inherited from:
BufferExpression
def ->(endVal: ObservableList[E]): Tweenable[T, J]

Returns a new scalafx.animation.Tweenable from a End Value.

Returns a new scalafx.animation.Tweenable from a End Value.

Value parameters

endVal

End Value

Attributes

Returns

a new Tweenable with this Property and end value passed.

Inherited from:
Property
def <==(v: ObservableValue[_ <: ObservableBuffer[E], _ <: ObservableList[E]]): Unit

Create a unidirectional binding for this Property.

Create a unidirectional binding for this Property.

Value parameters

v

ScalaFX ObservableValue this Property should be bound to.

Attributes

Inherited from:
Property
def <==(v: ObservableValue[_ <: ObservableList[E]]): Unit

Create a unidirectional binding for this Property.

Create a unidirectional binding for this Property.

Value parameters

v

JavaFX ObservableValue this Property should be bound to.

Attributes

Inherited from:
Property
def <==>(v: Property[ObservableList[E]]): Unit

Create a bidirectional binding between this Property and another JavaFX Property.

Create a bidirectional binding between this Property and another JavaFX Property.

Value parameters

v

the other JavaFX Property

Attributes

Inherited from:
Property
def <==>(v: Property[ObservableBuffer[E], ObservableList[E]]): Unit

Create a bidirectional binding between this Property and another ScalaFX Property.

Create a bidirectional binding between this Property and another ScalaFX Property.

Value parameters

v

the other ScalaFX Property

Attributes

Inherited from:
Property
def apply(): T

Returns ObservableValue

Returns ObservableValue

Attributes

Returns

ObservableValue

Inherited from:
ObservableValue
def bean: AnyRef

Returns the Object that contains this property.

Returns the Object that contains this property.

Attributes

Inherited from:
ReadOnlyProperty
def bindContent(buffer: ObservableBuffer[E]): Unit

Creates a content binding between the ObservableBuffer, that is wrapped in this ReadOnlyBufferProperty, and another ObservableBuffer.

Creates a content binding between the ObservableBuffer, that is wrapped in this ReadOnlyBufferProperty, and another ObservableBuffer.

A content binding ensures that the content of the wrapped ObservableBuffers is the same as that of the other buffer. If the content of the other buffer changes, the wrapped buffer will be updated automatically. Once the wrapped buffer is bound to another buffer, you must not change it directly.

Value parameters

buffer

the ObservableBuffer this property should be bound to

Attributes

Inherited from:
ReadOnlyBufferProperty

Creates a bidirectional content binding of the ObservableBuffer, that is wrapped in this ReadOnlyBufferProperty, and another ObservableBuffer.

Creates a bidirectional content binding of the ObservableBuffer, that is wrapped in this ReadOnlyBufferProperty, and another ObservableBuffer.

A bidirectional content binding ensures that the content of two ObservableBuffers is the same. If the content of one of the buffers changes, the other one will be updated automatically.

Value parameters

buffer

the ObservableBuffer this property should be bound to

Attributes

Inherited from:
ReadOnlyBufferProperty

A boolean property that is true, if the the buffer is empty.

A boolean property that is true, if the the buffer is empty.

Attributes

Inherited from:
BufferExpression
override def equals(ref: Any): Boolean

Verifies if a object is equals to this delegate.

Verifies if a object is equals to this delegate.

Value parameters

ref

Object to be compared.

Attributes

Returns

if the other object is equals to this delegate or not.

Definition Classes
SFXDelegate -> Any
Inherited from:
SFXDelegate
override def hashCode: Int

Attributes

Returns

The delegate hashcode

Definition Classes
SFXDelegate -> Any
Inherited from:
SFXDelegate

Creates a new BooleanBinding that holds true if this list is equal to another ObservableBuffer.

Creates a new BooleanBinding that holds true if this list is equal to another ObservableBuffer.

Value parameters

other

the other ObservableList

Attributes

Returns

the new BooleanBinding

Inherited from:
BufferExpression

Creates a new BooleanBinding that holds true if this list is not equal to another ObservableBuffer.

Creates a new BooleanBinding that holds true if this list is not equal to another ObservableBuffer.

Value parameters

other

the other ObservableList

Attributes

Returns

the new BooleanBinding

Inherited from:
BufferExpression
def name: String

Returns the name of this property.

Returns the name of this property.

Attributes

Inherited from:
ReadOnlyProperty
def onChange[J1 >: ObservableList[E]](op: => Unit): Subscription

Adds a function as a `ChangeListener`. This function has no arguments because it will not handle values changed.

Adds a function as a `ChangeListener`. This function has no arguments because it will not handle values changed.

Value parameters

op

A Function with no arguments. It will be called when value changes.

Attributes

Returns

A new scalafx.event.subscriptions.Subscription to remove ObservableValue.

Inherited from:
ObservableValue
def onChange[J1 >: ObservableList[E]](op: (ObservableValue[ObservableBuffer[E], ObservableList[E]], J1, J1) => Unit): Subscription

Adds a function as a `ChangeListener`. This function has all arguments from T, T) `changed` method from ChangeListener.

Adds a function as a `ChangeListener`. This function has all arguments from T, T) `changed` method from ChangeListener.

Type parameters

J1

J superclass.

Value parameters

op

Function that receives a `ObservableValue`, the old value and the new value. It will be called when value changes.

Attributes

Returns

A new scalafx.event.subscriptions.Subscription to remove ObservableValue.

Inherited from:
ObservableValue

Adds a no argument function as a JavaFX `InvalidationListener`. This function has no arguments because it will not handle invalidated values.

Adds a no argument function as a JavaFX `InvalidationListener`. This function has no arguments because it will not handle invalidated values.

Value parameters

op

A Function with no arguments. It will be called when value was invalidated.

Attributes

Returns

A new scalafx.event.subscriptions.Subscription to remove JavaFX InvalidationListener.

Inherited from:
Observable

Adds a function as a JavaFX `InvalidationListener`. This function has all arguments from `invalidated` method from InvalidationListener.

Adds a function as a JavaFX `InvalidationListener`. This function has all arguments from `invalidated` method from InvalidationListener.

Value parameters

op

Function that receives a ScalaFX Observable. It will be called when value was invalidated.

Attributes

Returns

A new scalafx.event.subscriptions.Subscription to remove JavaFX InvalidationListener.

Inherited from:
Observable
def retainAll(xs: Seq[E]): Boolean

Attributes

Inherited from:
BufferExpression
def retainAll(elem1: E, elem2: E, elems: E*): Boolean

Attributes

Inherited from:
BufferExpression
def setAll(xs: Seq[E]): Boolean

Clears the ObservableBuffer and add all elements from the collection.

Clears the ObservableBuffer and add all elements from the collection.

Attributes

Inherited from:
BufferExpression
def setAll(elem1: E, elem2: E, elems: E*): Boolean

Clears the ObservableBuffer and add all the elements passed as var-args.

Clears the ObservableBuffer and add all the elements passed as var-args.

Attributes

Inherited from:
BufferExpression

An integer property that represents the size of the buffer.

An integer property that represents the size of the buffer.

Attributes

Inherited from:
BufferExpression
def subBuffer(from: Int, to: Int): Buffer[E]

Attributes

Inherited from:
BufferExpression
override def toString: String

Attributes

Returns

Returns the original delegate's toString() adding a [SFX] prefix.

Definition Classes
SFXDelegate -> Any
Inherited from:
SFXDelegate
def unbind(v: Property[ObservableList[E]]): Unit

Remove a bidirectional binding between this Property and another JavaFX one. If no bidirectional binding between the properties exists, calling this method has no effect.

Remove a bidirectional binding between this Property and another JavaFX one. If no bidirectional binding between the properties exists, calling this method has no effect.

Value parameters

v
  • the other Property

Attributes

Inherited from:
Property
def unbind(v: Property[ObservableBuffer[E], ObservableList[E]]): Unit

Remove a bidirectional binding between this Property and another ScalaFX one. If no bidirectional binding between the properties exists, calling this method has no effect.

Remove a bidirectional binding between this Property and another ScalaFX one. If no bidirectional binding between the properties exists, calling this method has no effect.

Value parameters

v
  • the other Property

Attributes

Inherited from:
Property
def unbind(): Unit

Remove the unidirectional binding for this Property. If the Property is not bound, calling this method has no effect.

Remove the unidirectional binding for this Property. If the Property is not bound, calling this method has no effect.

Attributes

Inherited from:
Property
def unbindContent[T <: Object](sfx: SFXDelegate[T]): Unit

Deletes a content binding between the ObservableBuffer, that is wrapped in this ReadOnlyBufferProperty, and another Object.

Deletes a content binding between the ObservableBuffer, that is wrapped in this ReadOnlyBufferProperty, and another Object.

This is a helper method that calls the JavaFX counterpart with a delegate rather than the original object.

Value parameters

sfx

the SFXDelegate object to which the binding should be removed

Attributes

Inherited from:
ReadOnlyBufferProperty
def unbindContentBidirectional[T <: Object](sfx: SFXDelegate[T]): Unit

Deletes a bidirectional content binding between the ObservableBuffer, that is wrapped in this ReadOnlyBufferProperty, and another Object.

Deletes a bidirectional content binding between the ObservableBuffer, that is wrapped in this ReadOnlyBufferProperty, and another Object.

This is a helper method that calls the JavaFX counterpart with a delegate rather than the original object.

Value parameters

sfx

the SFXDelegate object to which the binding should be removed

Attributes

Inherited from:
ReadOnlyBufferProperty

Set the wrapped value.

Set the wrapped value.

Value parameters

v

The new value

Attributes

Inherited from:
Property
override def value: ObservableBuffer[E]

Returns ObservableValue

Returns ObservableValue

Attributes

Returns

ObservableValue

Definition Classes
Inherited from:
ReadOnlyBufferProperty
def when(condition: ObservableValue[Boolean, Boolean]): ObservableValue[J, J]

Returns an ObservableValue that holds this value and is updated only when condition holds true.

Returns an ObservableValue that holds this value and is updated only when condition holds true.

The returned ObservableValue only observes this value when condition holds true. This allows this ObservableValue and the conditional ObservableValue to be garbage collected if neither is otherwise strongly referenced when condition holds false. This is in contrast to the general behavior of bindings, where the binding is only eligible for garbage collection when not observed itself.

A condition holding null is treated as holding false.

For example:

  val condition         = BooleanProperty(true)
  val longLivedProperty = StringProperty("A")
  val whenProperty      = longLivedProperty.when(condition)

  // observe whenProperty, which will in turn observe longLivedProperty
  whenProperty.onChange((_, old, current) => println(s"whenProperty change : $old -> $current"));

  longLivedProperty.value = "B" // "B" is printed

  condition.value = false

  // After condition becomes false, whenProperty stops observing longLivedProperty; condition
  // and whenProperty may now be eligible for GC despite being observed by the ChangeListener
  longLivedProperty.value = "C" // nothing is printed
  longLivedProperty.value = "D" // nothing is printed

  condition.value = true // longLivedProperty is observed again, and "D" is printed

Value parameters

condition

a boolean ObservableValue, cannot be null

Attributes

Returns

an ObservableValue that holds this value whenever the given condition evaluates to true, otherwise holds the last seen value; never returns null

Since

20

Inherited from:
ObservableValue

Concrete fields

override val delegate: ListProperty[E]

JavaFX object to be wrapped.

JavaFX object to be wrapped.

Attributes