ObservableBuffer

object ObservableBuffer extends StrictOptimizedSeqFactory[[T] =>> ObservableBuffer[T]]
Companion
class
trait StrictOptimizedSeqFactory[[T] =>> ObservableBuffer[T]]
trait SeqFactory[[T] =>> ObservableBuffer[T]]
trait IterableFactory[[T] =>> ObservableBuffer[T]]
trait Serializable
class Object
trait Matchable
class Any

Type members

Classlikes

case class Add[T](position: Int, added: Iterable[T]) extends Change[T]

Indicates an Addition in an ObservableBuffer.

Indicates an Addition in an ObservableBuffer.

Value Params
added

elements added

position

Position from where new elements were added

See also
sealed trait Change[T]

Trait that indicates a Change in an ObservableBuffer. It is a simpler version of JavaFX's `ListChangeListener.Change`, where each subclass indicates a specific change operation. Unlike JavaFX, all subclasses are exclusive to each other. This enables using pattern matching:

Trait that indicates a Change in an ObservableBuffer. It is a simpler version of JavaFX's `ListChangeListener.Change`, where each subclass indicates a specific change operation. Unlike JavaFX, all subclasses are exclusive to each other. This enables using pattern matching:

items.onChange((_, changes) => {
 for (change <- changes)
   change match {
     case Add(pos, added)                => ...
     case Remove(pos, removed)           => ...
     case Reorder(from, to, permutation) => ...
     case Update(pos, updated)           => ...
   }
})

"replace" is represented as two changes Remove and Add.

case class Remove[T](position: Int, removed: Iterable[T]) extends Change[T]

Indicates a Removal in an ObservableBuffer.

Indicates a Removal in an ObservableBuffer.

Value Params
position

Position from where elements were removed

removed

elements removed

See also
case class Reorder[T](start: Int, end: Int, permutation: Int => Int) extends Change[T]

Indicates a Reordering in an ObservableBuffer.

Indicates a Reordering in an ObservableBuffer.

Value Params
end

The end of the change interval.

permutation

Function that indicates the permutation that happened. The argument indicates the old index that contained the element prior to this change. Its return is the new index of the same element.

start

The start of the change interval.

See also
case class Update[T](from: Int, to: Int) extends Change[T]

Indicates an Update in an ObservableBuffer.

Indicates an Update in an ObservableBuffer.

Value Params
from

Position from where elements were updated

to

Position to where elements were updated (exclusive)

See also

Value members

Concrete methods

override def empty[T]: ObservableBuffer[T]
Definition Classes
IterableFactory
def fillAll[T](buffer: ObservableBuffer[T], obj: T): Unit

Fills the provided Buffer with obj. Fires only one change notification on the Buffer.

Fills the provided Buffer with obj. Fires only one change notification on the Buffer.

Value Params
buffer

Buffer to Fill

obj

the object to fill the Buffer with

override def from[T](source: IterableOnce[T]): ObservableBuffer[T]
Definition Classes
IterableFactory
override def newBuilder[T]: Builder[T, ObservableBuffer[T]]
Definition Classes
IterableFactory
def revertBuffer[T](buffer: ObservableBuffer[T]): Unit

Revert the order in the ObservableBuffer. Fires only '''one''' change notification on the list.

Revert the order in the ObservableBuffer. Fires only '''one''' change notification on the list.

''Implementation note'': This method uses `reverse` method from `javafx.collections.FXCollections`. It is not called reverse to not confuse with method with same name from scala.collection.mutable.Buffer

Value Params
buffer

Buffer to be reverted.

def rotate[T](buffer: ObservableBuffer[T], distance: Int): Unit

Rotates the Buffer by distance. Fires only one change notification on the Buffer.

Rotates the Buffer by distance. Fires only one change notification on the Buffer.

Value Params
buffer

the Buffer to be rotated

distance

the distance of rotation

def shuffle[T](buffer: ObservableBuffer[T]): Unit

Shuffles all elements in the ObservableBuffer. Fires only '''one''' change notification on the Buffer.

Shuffles all elements in the ObservableBuffer. Fires only '''one''' change notification on the Buffer.

Value Params
buffer

Buffer to be shuffled

def shuffle[T](buffer: ObservableBuffer[T], rnd: Random): Unit

Shuffles all elements in the ObservableBuffer. Fires only '''one''' change notification on the Buffer.

Shuffles all elements in the ObservableBuffer. Fires only '''one''' change notification on the Buffer.

Value Params
buffer

Buffer to be shuffled

rnd

the random generator used for shuffling

Inherited methods

def apply[A](elems: A*): ObservableBuffer[A]
Inherited from
IterableFactory
override def concat[A](xss: Iterable[A]*): ObservableBuffer[A]
Definition Classes
StrictOptimizedSeqFactory -> IterableFactory
Inherited from
StrictOptimizedSeqFactory
override def fill[A](n: Int)(elem: => A): ObservableBuffer[A]
Definition Classes
StrictOptimizedSeqFactory -> IterableFactory
Inherited from
StrictOptimizedSeqFactory
def fill[A](n1: Int, n2: Int, n3: Int, n4: Int, n5: Int)(elem: => A): ObservableBuffer[ObservableBuffer[ObservableBuffer[ObservableBuffer[ObservableBuffer[A]]]]]
Inherited from
IterableFactory
def fill[A](n1: Int, n2: Int, n3: Int, n4: Int)(elem: => A): ObservableBuffer[ObservableBuffer[ObservableBuffer[ObservableBuffer[A]]]]
Inherited from
IterableFactory
def fill[A](n1: Int, n2: Int, n3: Int)(elem: => A): ObservableBuffer[ObservableBuffer[ObservableBuffer[A]]]
Inherited from
IterableFactory
def fill[A](n1: Int, n2: Int)(elem: => A): ObservableBuffer[ObservableBuffer[A]]
Inherited from
IterableFactory
def iterate[A](start: A, len: Int)(f: A => A): ObservableBuffer[A]
Inherited from
IterableFactory
def range[A](start: A, end: A, step: A)(Integral[A]): ObservableBuffer[A]
Inherited from
IterableFactory
def range[A](start: A, end: A)(Integral[A]): ObservableBuffer[A]
Inherited from
IterableFactory
override def tabulate[A](n: Int)(f: Int => A): ObservableBuffer[A]
Definition Classes
StrictOptimizedSeqFactory -> IterableFactory
Inherited from
StrictOptimizedSeqFactory
def tabulate[A](n1: Int, n2: Int, n3: Int, n4: Int, n5: Int)(f: (Int, Int, Int, Int, Int) => A): ObservableBuffer[ObservableBuffer[ObservableBuffer[ObservableBuffer[ObservableBuffer[A]]]]]
Inherited from
IterableFactory
def tabulate[A](n1: Int, n2: Int, n3: Int, n4: Int)(f: (Int, Int, Int, Int) => A): ObservableBuffer[ObservableBuffer[ObservableBuffer[ObservableBuffer[A]]]]
Inherited from
IterableFactory
def tabulate[A](n1: Int, n2: Int, n3: Int)(f: (Int, Int, Int) => A): ObservableBuffer[ObservableBuffer[ObservableBuffer[A]]]
Inherited from
IterableFactory
def tabulate[A](n1: Int, n2: Int)(f: (Int, Int) => A): ObservableBuffer[ObservableBuffer[A]]
Inherited from
IterableFactory
final def unapplySeq[A](x: ObservableBuffer[A]): UnapplySeqWrapper[A]
Inherited from
SeqFactory
def unfold[A, S](init: S)(f: S => Option[(A, S)]): ObservableBuffer[A]
Inherited from
IterableFactory

Implicits

Implicits

implicit def observableBuffer2ObservableList[T](ob: ObservableBuffer[T]): ObservableList[T]

Extracts an `ObservableList` from an ObservableBuffer.

Extracts an `ObservableList` from an ObservableBuffer.

Value Params
ob

ObservableBuffer

Inherited implicits

implicit def iterableFactory[A]: Factory[A, ObservableBuffer[A]]
Inherited from
IterableFactory