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

abstract class ObservableArray[V, T <: ObservableArray[V, T, D], D <: javafx.collections.ObservableArray[D]] extends Builder[V, T] with Observable with SFXDelegate[D]

Abstract ObservableArray base class.

Source
ObservableArray.scala
Linear Supertypes
Type Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ObservableArray
  2. Observable
  3. SFXDelegate
  4. Builder
  5. Growable
  6. Clearable
  7. AnyRef
  8. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new ObservableArray(delegate: D)(implicit arg0: ClassTag[V])

Abstract Value Members

  1. abstract def addAll(src: T, srcIdx: Int, length: Int): Unit

    Append portion of given regular array to the end of this array.

    Append portion of given regular array to the end of this array.

    Capacity is increased, if necessary, to match the new size of the data.

    src

    Elements to be appended.

    srcIdx

    Start position in the src array.

    length

    Number of data elements to be appended.

    Exceptions thrown

    java.lang.ArrayIndexOutOfBoundsException if copying would cause access out of src array bounds.

    java.lang.ArrayStoreException if element in src array could not be stored in this array due to a type mismatch.

    java.lang.NullPointerException if src is null.

  2. abstract def addAll(src: Array[V], srcIdx: Int, length: Int): Unit

    Append portion of given regular array to the end of this array.

    Append portion of given regular array to the end of this array.

    Capacity is increased, if necessary, to match the new size of the data.

    src

    Elements to be appended.

    srcIdx

    Start position in the src array.

    length

    Number of data elements to be appended.

    Exceptions thrown

    java.lang.ArrayIndexOutOfBoundsException if copying would cause access out of src array bounds.

    java.lang.ArrayStoreException if element in src array could not be stored in this array due to a type mismatch.

    java.lang.NullPointerException if src is null.

  3. abstract def addAll(elems: V*): Unit

    Append given elements to the end of this array.

    Append given elements to the end of this array.

    Capacity is increased, if necessary, to match the new size of the data.

    elems

    Elements to be appended.

    Exceptions thrown

    java.lang.ArrayStoreException if element in elements could not be stored in this array due to a type mismatch.

    java.lang.NullPointerException if elements is null.

  4. abstract def addAll(src: T): Unit

    Append given observable array to the end of this array.

    Append given observable array to the end of this array.

    Capacity is increased, if necessary, to match the new size of the data.

    src

    Elements to be appended.

    Exceptions thrown

    java.lang.ArrayStoreException if element in src array could not be stored in this array due to a type mismatch.

    java.lang.NullPointerException if src is null.

  5. abstract def copyTo(srcIdx: Int, dest: T, destIdx: Int, length: Int): Unit

    Copy specified portion of this observable array to dest observable array.

    Copy specified portion of this observable array to dest observable array.

    srcIdx

    Start position in this array.

    dest

    Array into which the portion of this array is to be copied.

    destIdx

    Start position in the dest array.

    length

    Number of data elements to be copied.

    Exceptions thrown

    java.lang.ArrayIndexOutOfBoundsException if copying would cause access out of either array bounds.

    java.lang.ArrayStoreException if element in this array could not be stored in dest array due to a type mismatch.

    java.lang.NullPointerException if dest is null.

  6. abstract def copyTo(srcIdx: Int, dest: Array[V], destIdx: Int, length: Int): Unit

    Copy specified portion of this observable array to dest regular array.

    Copy specified portion of this observable array to dest regular array.

    srcIdx

    Start position in this array.

    dest

    Array into which the portion of this array is to be copied.

    destIdx

    Start position in the dest array.

    length

    Number of data elements to be copied.

    Exceptions thrown

    java.lang.ArrayIndexOutOfBoundsException if copying would cause access out of either array bounds.

    java.lang.ArrayStoreException if element in this array could not be stored in dest array due to a type mismatch.

    java.lang.NullPointerException if dest is null.

  7. abstract def get(idx: Int): V

    Select the element at idx in the array.

    Select the element at idx in the array.

    idx

    Index of selected element.

    returns

    Element at given idx.

    Exceptions thrown

    java.lang.ArrayIndexOutOfBoundsException if idx does not satisfy 0 <= idx < length.

  8. abstract def set(destIdx: Int, src: T, srcIdx: Int, length: Int): Unit

    Copy a portion of given observable array into this array, replacing affected contents.

    Copy a portion of given observable array into this array, replacing affected contents.

    destIdx

    Start position in this array.

    src

    Array containing data to be copied.

    srcIdx

    Start position in src array.

    length

    Number of data elements to be copied.

    Exceptions thrown

    java.lang.ArrayIndexOutOfBoundsException if copying would cause access out of array bounds.

    java.lang.ArrayStoreException if element in src could not be stored in this array due to a type mismatch.

    java.lang.NullPointerException if src is null.

  9. abstract def set(destIdx: Int, src: Array[V], srcIdx: Int, length: Int): Unit

    Copy a portion of given regular array into this array, replacing affected contents.

    Copy a portion of given regular array into this array, replacing affected contents.

    destIdx

    Start position in this array.

    src

    Array containing data to be copied.

    srcIdx

    Start position in src array.

    length

    Number of data elements to be copied.

    Exceptions thrown

    java.lang.ArrayIndexOutOfBoundsException if copying would cause access out of array bounds.

    java.lang.ArrayStoreException if element in src could not be stored in this array due to a type mismatch.

    java.lang.NullPointerException if src is null.

  10. abstract def set(idx: Int, value: V): Unit

    Set the element at idx in the array to value.

    Set the element at idx in the array to value.

    idx

    Index of element to be changed.

    value

    New value for element at idx.

    Exceptions thrown

    java.lang.ArrayIndexOutOfBoundsException if idx does not satisfy 0 <= idx < length.

  11. abstract def setAll(src: T, srcIdx: Int, length: Int): Unit

    Replace the contents of this array with portion of the given observable array.

    Replace the contents of this array with portion of the given observable array.

    Capacity is increased, if necessary, to match the new size of the data.

    src

    Array to replace contents this array.

    srcIdx

    Start position in the src array.

    length

    Number of data elements to be copied.

    Exceptions thrown

    java.lang.ArrayIndexOutOfBoundsException if copying would cause access out of array bounds.

    java.lang.ArrayStoreException if element in src could not be stored in this array due to a type mismatch.

    java.lang.NullPointerException if src is null.

  12. abstract def setAll(src: Array[V], srcIdx: Int, length: Int): Unit

    Replace the contents of this array with portion of the given regular array.

    Replace the contents of this array with portion of the given regular array.

    Capacity is increased, if necessary, to match the new size of the data.

    src

    Array to replace contents this array.

    srcIdx

    Start position in the src array.

    length

    Number of data elements to be copied.

    Exceptions thrown

    java.lang.ArrayIndexOutOfBoundsException if copying would cause access out of array bounds.

    java.lang.ArrayStoreException if element in src could not be stored in this array due to a type mismatch.

    java.lang.NullPointerException if src is null.

  13. abstract def setAll(src: T): Unit

    Replace the contents of this array with the given observable array.

    Replace the contents of this array with the given observable array.

    Capacity is increased, if necessary, to match the new size of the data.

    src

    Array to replace contents this array.

    Exceptions thrown

    java.lang.ArrayStoreException if element in src could not be stored in this array due to a type mismatch.

    java.lang.NullPointerException if src is null.

  14. abstract def setAll(elems: V*): Unit

    Replace the contents of this array with the given elements.

    Replace the contents of this array with the given elements.

    Capacity is increased, if necessary, to match the new size of the data.

    elems

    New contents of this array.

    Exceptions thrown

    java.lang.ArrayStoreException if element in elements could not be stored in this array due to a type mismatch.

    java.lang.NullPointerException if elements is null.

  15. abstract def toArray(srcIdx: Int, dest: Array[V], length: Int): Array[V]

    Write a portion of this array's contents into the specified array, if it is large enough, or a new array if it is not.

    Write a portion of this array's contents into the specified array, if it is large enough, or a new array if it is not.

    srcIdx

    Start position in this array.

    dest

    Array into which this array will be written, if large enough to hold this array's contents. If null, this argument is ignored.

    length

    Number of data elements to be copied.

    returns

    The dest array if it is large enough to hold this array's data, or a new array, containing this array's copied contents.

    Exceptions thrown

    java.lang.ArrayStoreException if element in src could not be stored in this array due to a type mismatch.

  16. abstract def toArray(dest: Array[V]): Array[V]

    Write the contents of this array into the specified array, if it is large enough, or a new array if it is not.

    Write the contents of this array into the specified array, if it is large enough, or a new array if it is not.

    dest

    Array into which this array will be written, if large enough to hold this array's contents. If null, this argument is ignored.

    returns

    The dest array if it is large enough to hold this array's data, or a new array, containing this array's copied contents.

    Exceptions thrown

    java.lang.ArrayStoreException if element in src could not be stored in this array due to a type mismatch.

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. def ++=(src: T): T

    Append another observable array to this array.

    Append another observable array to this array.

    src

    Array to be appended to this array.

    returns

    This array, expanded to contain the indicated array.

  4. def ++=(src: Array[V]): T

    Append another array to this array.

    Append another array to this array.

    src

    Array to be appended to this array.

    returns

    This array, expanded to contain the indicated array.

  5. final def ++=(xs: IterableOnce[V]): ObservableArray.this.type
    Definition Classes
    Growable
    Annotations
    @inline()
  6. final def +=(elem: V): ObservableArray.this.type
    Definition Classes
    Growable
    Annotations
    @inline()
  7. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  8. def addAll(xs: IterableOnce[V]): ObservableArray.this.type
    Definition Classes
    Growable
  9. def addOne(elem: V): ObservableArray.this.type

    Append new element to this ObservableArray.

    Append new element to this ObservableArray.

    elem

    Element to be added to end of this array.

    returns

    This ObservableArray.

    Definition Classes
    ObservableArray → Growable
  10. def apply(idx: Int): V

    Select an element by its index in the array.

    Select an element by its index in the array.

    idx

    Index of selected element.

    returns

    Element at given idx.

    Exceptions thrown

    java.lang.ArrayIndexOutOfBoundsException if idx does not satisfy 0 <= idx < length.

  11. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  12. def clear(): Unit

    Empty array, clearing builder contents, resizing it to zero.

    Empty array, clearing builder contents, resizing it to zero.

    Capacity is unchanged.

    Definition Classes
    ObservableArray → Builder → Clearable
  13. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  14. val delegate: D

    JavaFX object to be wrapped.

    JavaFX object to be wrapped.

    Definition Classes
    ObservableArray → SFXDelegate
  15. def ensureCapacity(capacity: Int): Unit

    Grow array capacity if currently smaller than given capacity; do nothing otherwise.

    Grow array capacity if currently smaller than given capacity; do nothing otherwise.

    capacity

    Required capacity.

  16. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  17. def equals(ref: Any): Boolean

    Verifies if a object is equals to this delegate.

    Verifies if a object is equals to this delegate.

    ref

    Object to be compared.

    returns

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

    Definition Classes
    SFXDelegate → AnyRef → Any
  18. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  19. def hashCode(): Int

    returns

    The delegate hashcode

    Definition Classes
    SFXDelegate → AnyRef → Any
  20. def isEmpty: Boolean

    Tests whether the collection is empty.

    Tests whether the collection is empty.

    returns

    true if the collection contains no elements, false otherwise.

  21. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  22. def knownSize: Int
    Definition Classes
    Growable
  23. def length: Int

    Alias for size

  24. def mapResult[NewTo](f: (T) => NewTo): Builder[V, NewTo]
    Definition Classes
    Builder
  25. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  26. def nonEmpty: Boolean

    Tests whether the collection is not empty.

    Tests whether the collection is not empty.

    returns

    true if the collection contains at least one element, false otherwise.

  27. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  28. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  29. def onChange(op: => Unit): Subscription

    Add a listener function to Array's changes.

    Add a listener function to Array's changes.

    op

    Function that will handle this ObservableArray's modifications data, to be activated when some change is made.

    Note

    This function will not handle this array's modifications data. That is, it will be notified that an array it is associated with has changed, but not which array the which data within it was changed.

  30. def onChange(op: (T, Change) => Unit): Subscription

    Add a listener function to Array's changes.

    Add a listener function to Array's changes.

    op

    Function that will handle this ObservableArray's modifications data, to be activated when some change is made.

    Note

    This function will handle this array's modifications data. That is, it will be notified which array has been modified and which array elements have been changed.

  31. def onInvalidate(op: => Unit): Subscription

    Adds a no argument function as a JavaFX InvalidationListener.

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

    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.

    Definition Classes
    Observable
  32. def onInvalidate(op: (Observable) => Unit): Subscription

    Adds a function as a JavaFX InvalidationListener.

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

    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.

    Definition Classes
    Observable
  33. def result(): T

    Produces collection from builder.

    Produces collection from builder.

    returns

    This ObservableArray.

    Definition Classes
    ObservableArray → Builder
  34. def size: Int

    Retrieve length of data in this array.

    Retrieve length of data in this array.

    returns

    Length of data in this array.

  35. final def sizeHint(coll: IterableOnce[_], delta: Int): Unit
    Definition Classes
    Builder
  36. def sizeHint(size: Int): Unit
    Definition Classes
    Builder
  37. final def sizeHintBounded(size: Int, boundingColl: Iterable[_]): Unit
    Definition Classes
    Builder
  38. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  39. def toArray: Array[V]

    Translate this observable array to a regular array.

    Translate this observable array to a regular array.

    returns

    Regular array containing this array's contents.

  40. def toString(): String

    returns

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

    Definition Classes
    SFXDelegate → AnyRef → Any
  41. def trimToSize(): Unit

    Shrinks capacity to current length of data in this array.

  42. def update(idx: Int, value: V): Unit

    Set the element at idx in the array to value.

    Set the element at idx in the array to value.

    idx

    Index of element to be changed.

    value

    New value for element at idx.

    Exceptions thrown

    java.lang.ArrayIndexOutOfBoundsException if idx does not satisfy 0 <= idx < length.

  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. final def +=(elem1: V, elem2: V, elems: V*): ObservableArray.this.type
    Definition Classes
    Growable
    Annotations
    @deprecated @inline()
    Deprecated

    (Since version 2.13.0) Use ++= (addAll) instead of varargs +=

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

    (Since version ) see corresponding Javadoc for more information.

Inherited from Observable

Inherited from SFXDelegate[D]

Inherited from Builder[V, T]

Inherited from Growable[V]

Inherited from Clearable

Inherited from AnyRef

Inherited from Any

Ungrouped