Packages

  • package root

    ScalaFX is a UI DSL written within the Scala Language that sits on top of JavaFX 2.x and and JavaFX 8.

    ScalaFX is a UI DSL written within the Scala Language that sits on top of JavaFX 2.x and and JavaFX 8. This means that every ScalaFX application is also a valid Scala application. By extension it supports full interoperability with Java and can run anywhere the Java Virtual Machine (JVM) and JavaFX 2.0 or JavaFX 8 are supported.

    Package Structure

    ScalaFX package structure corresponds to JavaFX package structure, for instance scalafx.animation corresponds to javafx.animation.

    Example Usage

    A basic ScalaFX application is created creating an object that is an instance of JFXApp. Following Java FX theatre metaphor, it contains a stage that contains a scene. A stage roughly corresponds to a window in a typical UI environment. The scene holds UI content presented to the user. In the example below, the content is a pane with a single label component.

    package hello
    
    import scalafx.application.JFXApp
    import scalafx.application.JFXApp.PrimaryStage
    import scalafx.geometry.Insets
    import scalafx.scene.Scene
    import scalafx.scene.control.Label
    import scalafx.scene.layout.BorderPane
    
    object HelloWorld extends JFXApp {
      stage = new PrimaryStage {
        title = "Hello"
        scene = new Scene {
          root = new BorderPane {
            padding = Insets(25)
            center = new Label("Hello World")
          }
        }
      }
    }
    Definition Classes
    root
  • package scalafx

    Base package for ScalaFX classes.

    Base package for ScalaFX classes.

    Definition Classes
    root
  • package collections

    Wraps javafx.collections package, adding Scala's collections features to original JavaFX collections.

    Wraps javafx.collections package, adding Scala's collections features to original JavaFX collections.

    Definition Classes
    scalafx
  • package transformation
    Definition Classes
    collections
  • CollectionIncludes
  • ObservableArray
  • ObservableBuffer
  • ObservableBufferBase
  • ObservableFloatArray
  • ObservableHashMap
  • ObservableHashSet
  • ObservableIntegerArray
  • ObservableMap
  • ObservableSet

object ObservableBuffer extends StrictOptimizedSeqFactory[ObservableBuffer]

Source
ObservableBuffer.scala
Content Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ObservableBuffer
  2. StrictOptimizedSeqFactory
  3. SeqFactory
  4. IterableFactory
  5. Serializable
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. case class Add[T](position: Int, added: Iterable[T]) extends Change[T] with Product with Serializable

    Indicates an Addition in an ObservableBuffer.

    Indicates an Addition in an ObservableBuffer.

    position

    Position from where new elements were added

    added

    elements added

    See also

    ListChangeListener.Change.wasAdded()

    ListChangeListener.Change.getFrom()

    ListChangeListener.Change.getAddedSubList()

  2. sealed trait Change[T] extends AnyRef

    Trait that indicates a Change in an ObservableBuffer.

    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.

  3. case class Remove[T](position: Int, removed: Iterable[T]) extends Change[T] with Product with Serializable

    Indicates a Removal in an ObservableBuffer.

    Indicates a Removal in an ObservableBuffer.

    position

    Position from where elements were removed

    removed

    elements removed

    See also

    ListChangeListener.Change.wasRemoved()

    ListChangeListener.Change.getFrom()

    ListChangeListener.Change.getRemoved()

  4. case class Reorder[T](start: Int, end: Int, permutation: (Int) => Int) extends Change[T] with Product with Serializable

    Indicates a Reordering in an ObservableBuffer.

    Indicates a Reordering in an ObservableBuffer.

    start

    The start of the change interval.

    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.

    See also

    ListChangeListener.Change.wasPermutated()

    ListChangeListener.Change.getFrom()

    ListChangeListener.Change.getTo()

    ListChangeListener.Change.getPermutation(int)

  5. case class Update[T](from: Int, to: Int) extends Change[T] with Product with Serializable

    Indicates an Update in an ObservableBuffer.

    Indicates an Update in an ObservableBuffer.

    from

    Position from where elements were updated

    to

    Position to where elements were updated (exclusive)

    See also

    ListChangeListener.Change.wasUpdated()

    ListChangeListener.Change.getFrom()

    ListChangeListener.Change.getTo()

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def apply[A](elems: A*): ObservableBuffer[A]
    Definition Classes
    IterableFactory
  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  7. def concat[A](xss: Iterable[A]*): ObservableBuffer[A]
    Definition Classes
    StrictOptimizedSeqFactory → IterableFactory
  8. def empty[T]: ObservableBuffer[T]
    Definition Classes
    ObservableBuffer → IterableFactory
  9. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  10. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  11. def fill[A](n: Int)(elem: => A): ObservableBuffer[A]
    Definition Classes
    StrictOptimizedSeqFactory → IterableFactory
  12. def fill[A](n1: Int, n2: Int, n3: Int, n4: Int, n5: Int)(elem: => A): ObservableBuffer[ObservableBuffer[ObservableBuffer[ObservableBuffer[ObservableBuffer[A]]]]]
    Definition Classes
    IterableFactory
  13. def fill[A](n1: Int, n2: Int, n3: Int, n4: Int)(elem: => A): ObservableBuffer[ObservableBuffer[ObservableBuffer[ObservableBuffer[A]]]]
    Definition Classes
    IterableFactory
  14. def fill[A](n1: Int, n2: Int, n3: Int)(elem: => A): ObservableBuffer[ObservableBuffer[ObservableBuffer[A]]]
    Definition Classes
    IterableFactory
  15. def fill[A](n1: Int, n2: Int)(elem: => A): ObservableBuffer[ObservableBuffer[A]]
    Definition Classes
    IterableFactory
  16. def fillAll[T](buffer: ObservableBuffer[T], obj: T): Unit

    Fills the provided Buffer with obj.

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

    buffer

    Buffer to Fill

    obj

    the object to fill the Buffer with

  17. def from[T](source: IterableOnce[T]): ObservableBuffer[T]
    Definition Classes
    ObservableBuffer → IterableFactory
  18. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  19. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  20. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  21. implicit def iterableFactory[A]: Factory[A, ObservableBuffer[A]]
    Definition Classes
    IterableFactory
  22. def iterate[A](start: A, len: Int)(f: (A) => A): ObservableBuffer[A]
    Definition Classes
    IterableFactory
  23. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  24. def newBuilder[T]: Builder[T, ObservableBuffer[T]]
    Definition Classes
    ObservableBuffer → IterableFactory
  25. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  26. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  27. implicit def observableBuffer2ObservableList[T](ob: ObservableBuffer[T]): ObservableList[T]

    Extracts an ObservableList from an ObservableBuffer.

    Extracts an ObservableList from an ObservableBuffer.

    ob

    ObservableBuffer

  28. def range[A](start: A, end: A, step: A)(implicit arg0: Integral[A]): ObservableBuffer[A]
    Definition Classes
    IterableFactory
  29. def range[A](start: A, end: A)(implicit arg0: Integral[A]): ObservableBuffer[A]
    Definition Classes
    IterableFactory
  30. def revertBuffer[T](buffer: ObservableBuffer[T]): Unit

    Revert the order in the ObservableBuffer.

    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

    buffer

    Buffer to be reverted.

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

    Rotates the Buffer by distance.

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

    buffer

    the Buffer to be rotated

    distance

    the distance of rotation

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

    Shuffles all elements in the ObservableBuffer.

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

    buffer

    Buffer to be shuffled

    rnd

    the random generator used for shuffling

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

    Shuffles all elements in the ObservableBuffer.

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

    buffer

    Buffer to be shuffled

  34. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  35. def tabulate[A](n: Int)(f: (Int) => A): ObservableBuffer[A]
    Definition Classes
    StrictOptimizedSeqFactory → IterableFactory
  36. 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]]]]]
    Definition Classes
    IterableFactory
  37. def tabulate[A](n1: Int, n2: Int, n3: Int, n4: Int)(f: (Int, Int, Int, Int) => A): ObservableBuffer[ObservableBuffer[ObservableBuffer[ObservableBuffer[A]]]]
    Definition Classes
    IterableFactory
  38. def tabulate[A](n1: Int, n2: Int, n3: Int)(f: (Int, Int, Int) => A): ObservableBuffer[ObservableBuffer[ObservableBuffer[A]]]
    Definition Classes
    IterableFactory
  39. def tabulate[A](n1: Int, n2: Int)(f: (Int, Int) => A): ObservableBuffer[ObservableBuffer[A]]
    Definition Classes
    IterableFactory
  40. def toString(): String
    Definition Classes
    AnyRef → Any
  41. final def unapplySeq[A](x: ObservableBuffer[A]): UnapplySeqWrapper[A]
    Definition Classes
    SeqFactory
  42. def unfold[A, S](init: S)(f: (S) => Option[(A, S)]): ObservableBuffer[A]
    Definition Classes
    IterableFactory
  43. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  44. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  45. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped