Wrapper class to JavaFX's `ObservableList`.
Wrapper class to JavaFX's `ObservableList`.
- Type Params
- T
Type of this
Buffer
- Companion
- object
Value members
Concrete methods
Creates a new ObservableBuffer
with all the elements of this collection except elem
. The new ObservableBuffer
won't have Change and Invalidation Listeners from original Buffer
.
Creates a new ObservableBuffer
with all the elements of this collection except elem
. The new ObservableBuffer
won't have Change and Invalidation Listeners from original Buffer
.
- Value Params
- elem
Element to remove
- Returns
A new
ObservableBuffer
consisting of all the elements of thisBuffer
exceptelem
. The newObservableBuffer
won't have Change and Invalidation Listeners from originalBuffer
.
Creates a new ObservableBuffer
with all the elements of this Buffer
except those provided by
the specified iterable object. The new ObservableBuffer
won't have Change and Invalidation Listeners from original Buffer
.
Creates a new ObservableBuffer
with all the elements of this Buffer
except those provided by
the specified iterable object. The new ObservableBuffer
won't have Change and Invalidation Listeners from original Buffer
.
- Value Params
- xs
The iterable object.
- Returns
A new
ObservableBuffer
with all the elements of thisBuffer
except those inxs
. The newObservableBuffer
won't have Change and Invalidation Listeners from originalBuffer
.
Adds all elements produced by a IterableOnce to this ObservableBuffer
. Overridden method to make it behave like a wrapped ObservableList
.
Adds all elements produced by a IterableOnce to this ObservableBuffer
. Overridden method to make it behave like a wrapped ObservableList
.
- Value Params
- xs
iterable object.
- Returns
The
ObservableBuffer
itself.- Definition Classes
- Growable
A convenience method for var-arg addition of elements.
A convenience method for var-arg addition of elements.
- Value Params
- elem
elements the elements to add
- Returns
The
ObservableBuffer
itself.
Appends a single element to this ObservableBuffer
. Overridden method to make it behave like a wrapped ObservableList
.
Appends a single element to this ObservableBuffer
. Overridden method to make it behave like a wrapped ObservableList
.
- Value Params
- elem
the element to add.
- Returns
The
ObservableBuffer
itself.- Definition Classes
- Growable
Selects an element by its index in the buffer.
Selects an element by its index in the buffer.
- Value Params
- n
index
- Returns
Element at position
n
- Definition Classes
- SeqOps -> Function1
Clears the ObservableBuffer
's contents. After this operation, the Buffer
is empty.
Clears the ObservableBuffer
's contents. After this operation, the Buffer
is empty.
- Definition Classes
- Clearable
Inserts new elements at a given index into this Buffer
.
Inserts new elements at a given index into this Buffer
.
- Value Params
- elems
the iterable collection containing the elements to insert.
- n
the index where new elements are inserted.
- Definition Classes
- Buffer
The number of elements in this collection.
The number of elements in this collection.
- Definition Classes
- IndexedSeqOps -> Buffer -> Growable -> IterableOnce
Add a listener function to list's changes. This function '''will handle''' this buffer's modifications data.
Add a listener function to list's changes. This function '''will handle''' this buffer's modifications data.
- Value Params
- op
Function that will handle this
ObservableBuffer
's modifications data to be activated when some change was made.
- Returns
A subscription object
Add a listener function to list's changes. This function '''will not handle''' this buffer's modifications data.
Add a listener function to list's changes. This function '''will not handle''' this buffer's modifications data.
- Value Params
- op
No-argument function to be activated when some change in this
ObservableBuffer
was made.
- Returns
A
subscription
object
Prepends a single element to this buffer. Overridden method to make it behave like a wrapped ObservableList
.
Prepends a single element to this buffer. Overridden method to make it behave like a wrapped ObservableList
.
- Value Params
- elem
Element to prepend
- Returns
The
ObservableBuffer
itself.- Definition Classes
- Buffer
Removes the element at a given index from this ObservableBuffer
.
Removes the element at a given index from this ObservableBuffer
.
- Value Params
- n
index the index of the element to be removed
- Returns
Removed element
- Definition Classes
- Buffer
Removes a number of elements from a given index position. Overridden method to make it behave like a wrapped ObservableList
.
Removes a number of elements from a given index position. Overridden method to make it behave like a wrapped ObservableList
.
'''Note''': This method conflicts with method with same signature in
`ObservableList`.
There the arguments indicate a range of index of elements to be removed. Here the arguments indicate the first
index of range and the quantity of elements to be removed. If you want a functionality equivalent to JavaFX
ObservableList
, use removeRange
.
- Value Params
- count
the number of elements to remove.
- n
the index which refers to the first element to remove.
- Definition Classes
- Buffer
Remove a range of elements. Use this method if you want a functionality such as
the method
with same signature in ObservableList
.
Remove a range of elements. Use this method if you want a functionality such as
the method
with same signature in ObservableList
.
- Value Params
- from
the start of the range to remove (inclusive)
- to
the end of the range to remove (exclusive)
Replace all oldVal elements in the list with newVal element. Fires only '''one''' change notification on the list.
Replace all oldVal elements in the list with newVal element. Fires only '''one''' change notification on the list.
- Value Params
- newVal
The replacement
- oldVal
The element that is going to be replace
- Returns
true
if the list was modified
Retains only the provided elements. In other words, removes from this list all the elements that are not listed.
Retains only the provided elements. In other words, removes from this list all the elements that are not listed.
- Value Params
- elems
the elements to be retained in this list
Retains only the elements in this list that are contained in the specified collection. In other words, removes from this list all the elements that are not contained in the specified collection.
Retains only the elements in this list that are contained in the specified collection. In other words, removes from this list all the elements that are not contained in the specified collection.
- Value Params
- elems
the iterable collection containing elements to be retained in this list
Sorts this ObservableBuffer
if its type implements "natural ordering" using using JavaFX FXCollections.sort
.
Sorts this ObservableBuffer
if its type implements "natural ordering" using using JavaFX FXCollections.sort
.
It is similar to Scala's sortInPlace()
.
It will produce the same result,
but may produce different number of change notifications as different sorting algorithms are used.
Sorts this ObservableBuffer
using a comparator function using JavaFX FXCollections.sort
.
Sorts this ObservableBuffer
using a comparator function using JavaFX FXCollections.sort
.
It is similar to Scala's sortInPlaceWith(c)
.
It will produce the same result,
but may produce different number of change notifications as different sorting algorithms are used.
- Value Params
- lt
comparator function that returns
true
if first element was lesser than second orfalse
otherwise.
Deprecated methods
Removes two or more elements from this ObservableBuffer
.
Removes two or more elements from this ObservableBuffer
.
- Value Params
- elem1
First element to remove
- elem2
Second element to remove
- elems
Other elements to remove
- Returns
The
ObservableBuffer
itself.- Deprecated
- Definition Classes
- Shrinkable
Inherited methods
- Definition Classes
- StrictOptimizedIterableOps -> IterableOps -> IterableOnceOps
- Inherited from
- StrictOptimizedIterableOps
- Inherited from
- IterableOnceOps
- Inherited from
- IterableOnceOps
Verifies if a object is equals to this delegate.
Verifies if a object is equals to this delegate.
- Value Params
- ref
Object to be compared.
- Returns
if the other object is equals to this delegate or not.
- Definition Classes
- SFXDelegate -> Any
- Inherited from
- SFXDelegate
- Definition Classes
- StrictOptimizedIterableOps -> IterableOps -> IterableOnceOps
- Inherited from
- StrictOptimizedIterableOps
- Definition Classes
- StrictOptimizedIterableOps -> IterableOps -> IterableOnceOps
- Inherited from
- StrictOptimizedIterableOps
- Definition Classes
- StrictOptimizedIterableOps -> IterableOps -> IterableOnceOps
- Inherited from
- StrictOptimizedIterableOps
- Definition Classes
- StrictOptimizedIterableOps -> IterableOps -> IterableOnceOps
- Inherited from
- StrictOptimizedIterableOps
- Inherited from
- SeqOps
- Inherited from
- SeqOps
- Inherited from
- SeqOps
- Inherited from
- SeqOps
- Inherited from
- SeqOps
- Definition Classes
- StrictOptimizedIterableOps -> IterableOps -> IterableOnceOps
- Inherited from
- StrictOptimizedIterableOps
- Inherited from
- IterableOnceOps
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 Params
- op
A Function with no arguments. It will be called when value was invalidated.
- 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 Params
- op
Function that receives a ScalaFX
Observable
. It will be called when value was invalidated.
- Returns
A new scalafx.event.subscriptions.Subscription to remove JavaFX
InvalidationListener
.- Inherited from
- Observable
- Definition Classes
- StrictOptimizedIterableOps -> IterableOps
- Inherited from
- StrictOptimizedIterableOps
- Definition Classes
- StrictOptimizedIterableOps -> IterableOps -> IterableOnceOps
- Inherited from
- StrictOptimizedIterableOps
- Definition Classes
- StrictOptimizedIterableOps -> IterableOps -> IterableOnceOps
- Inherited from
- StrictOptimizedIterableOps
- Definition Classes
- StrictOptimizedIterableOps -> IterableOps -> IterableOnceOps
- Inherited from
- StrictOptimizedIterableOps
- Returns
Returns the original delegate's
toString()
adding a[SFX]
prefix.- Definition Classes
- SFXDelegate -> Any
- Inherited from
- SFXDelegate
- Definition Classes
- StrictOptimizedIterableOps -> IterableOps
- Inherited from
- StrictOptimizedIterableOps
Deprecated and Inherited methods
- Deprecated
- Inherited from
- Growable
- Deprecated
- Inherited from
- IterableOnceOps
- Deprecated
- Inherited from
- IterableOnceOps
- Deprecated
- Inherited from
- IterableOps
- Deprecated
- Inherited from
- IterableOnceOps
- Deprecated
- Inherited from
- IterableOnceOps
- Deprecated
- Inherited from
- SeqOps
- Deprecated
- Inherited from
- IterableOps
- Deprecated
- Inherited from
- SeqOps
- Deprecated
- Inherited from
- Iterable
- Deprecated
- Inherited from
- IterableOnceOps
- Deprecated
- Inherited from
- IterableOnceOps
- Deprecated
- Inherited from
- SeqOps