class ObservableIntegerArray extends ObservableArray[Int, ObservableIntegerArray, javafx.collections.ObservableIntegerArray]
Wrapper class to JavaFX's ObservableIntegerArray
.
- Alphabetic
- By Inheritance
- ObservableIntegerArray
- ObservableArray
- Observable
- SFXDelegate
- Builder
- Growable
- Clearable
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new ObservableIntegerArray(n: Int)
Create
ObservableIntegerArray
with specified capacity.Create
ObservableIntegerArray
with specified capacity.Elements will be zeroed out.
- n
Size of new
ObservableIntegerArray
. This value cannot be negative.
- Exceptions thrown
NegativeArraySizeException
ifn
is negative.
- new ObservableIntegerArray(delegate: javafx.collections.ObservableIntegerArray = jfxc.FXCollections.observableIntegerArray())
- delegate
Wrapped JavaFX
ObservableIntegerArray
providing implementation.
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- def ++=(src: ObservableIntegerArray): ObservableIntegerArray
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.
- Definition Classes
- ObservableArray
- def ++=(src: Array[Int]): ObservableIntegerArray
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.
- Definition Classes
- ObservableArray
- final def ++=(xs: IterableOnce[Int]): ObservableIntegerArray.this.type
- Definition Classes
- Growable
- Annotations
- @inline()
- final def +=(elem: Int): ObservableIntegerArray.this.type
- Definition Classes
- Growable
- Annotations
- @inline()
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def addAll(src: ObservableIntegerArray, 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.
- Definition Classes
- ObservableIntegerArray → ObservableArray
- def addAll(src: Array[Int], 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.
- Definition Classes
- ObservableIntegerArray → ObservableArray
- def addAll(src: ObservableIntegerArray): 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.
- Definition Classes
- ObservableIntegerArray → ObservableArray
- def addAll(elems: Int*): 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.
- Definition Classes
- ObservableIntegerArray → ObservableArray
- def addAll(xs: IterableOnce[Int]): ObservableIntegerArray.this.type
- Definition Classes
- Growable
- def addOne(elem: Int): ObservableIntegerArray.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
- def apply(idx: Int): Int
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
.
- Definition Classes
- ObservableArray
- Exceptions thrown
java.lang.ArrayIndexOutOfBoundsException
ifidx
does not satisfy0 <= idx < length
.
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- 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
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- def copyTo(srcIdx: Int, dest: ObservableIntegerArray, 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.
- Definition Classes
- ObservableIntegerArray → ObservableArray
- def copyTo(srcIdx: Int, dest: Array[Int], 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.
- Definition Classes
- ObservableIntegerArray → ObservableArray
- val delegate: javafx.collections.ObservableIntegerArray
JavaFX object to be wrapped.
JavaFX object to be wrapped.
- Definition Classes
- ObservableArray → SFXDelegate
- 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.
- Definition Classes
- ObservableArray
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- 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
- def get(idx: Int): Int
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
.
- Definition Classes
- ObservableIntegerArray → ObservableArray
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def hashCode(): Int
- returns
The delegate hashcode
- Definition Classes
- SFXDelegate → AnyRef → Any
- 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.
- Definition Classes
- ObservableArray
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def knownSize: Int
- Definition Classes
- Growable
- def length: Int
Alias for size
Alias for size
- Definition Classes
- ObservableArray
- def mapResult[NewTo](f: (ObservableIntegerArray) => NewTo): Builder[Int, NewTo]
- Definition Classes
- Builder
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- 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.
- Definition Classes
- ObservableArray
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- 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.
- Definition Classes
- ObservableArray
- 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.
- def onChange(op: (ObservableIntegerArray, 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.
- Definition Classes
- ObservableArray
- 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.
- 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
- 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 frominvalidated
method fromInvalidationListener
.- 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
- def result(): ObservableIntegerArray
Produces collection from builder.
Produces collection from builder.
- returns
This
ObservableArray
.
- Definition Classes
- ObservableArray → Builder
- def set(destIdx: Int, src: ObservableIntegerArray, 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.
- Definition Classes
- ObservableIntegerArray → ObservableArray
- def set(destIdx: Int, src: Array[Int], 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.
- Definition Classes
- ObservableIntegerArray → ObservableArray
- def set(idx: Int, elem: Int): Unit
Set the element at
idx
in the array tovalue
.Set the element at
idx
in the array tovalue
.- idx
Index of element to be changed.
- Definition Classes
- ObservableIntegerArray → ObservableArray
- def setAll(src: ObservableIntegerArray, 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.
- Definition Classes
- ObservableIntegerArray → ObservableArray
- def setAll(src: Array[Int], 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.
- Definition Classes
- ObservableIntegerArray → ObservableArray
- def setAll(src: ObservableIntegerArray): 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.
- Definition Classes
- ObservableIntegerArray → ObservableArray
- def setAll(elements: Int*): 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.
- Definition Classes
- ObservableIntegerArray → ObservableArray
- def size: Int
Retrieve length of data in this array.
Retrieve length of data in this array.
- returns
Length of data in this array.
- Definition Classes
- ObservableArray
- final def sizeHint(coll: IterableOnce[_], delta: Int): Unit
- Definition Classes
- Builder
- def sizeHint(size: Int): Unit
- Definition Classes
- Builder
- final def sizeHintBounded(size: Int, boundingColl: Iterable[_]): Unit
- Definition Classes
- Builder
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toArray(srcIdx: Int, dest: Array[Int], length: Int): Array[Int]
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.
- Definition Classes
- ObservableIntegerArray → ObservableArray
- def toArray(dest: Array[Int]): Array[Int]
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.
- Definition Classes
- ObservableIntegerArray → ObservableArray
- def toArray: Array[Int]
Translate this observable array to a regular array.
Translate this observable array to a regular array.
- returns
Regular array containing this array's contents.
- Definition Classes
- ObservableArray
- def toString(): String
- returns
Returns the original delegate's
toString()
adding a[SFX]
prefix.
- Definition Classes
- SFXDelegate → AnyRef → Any
- def trimToSize(): Unit
Shrinks capacity to current length of data in this array.
Shrinks capacity to current length of data in this array.
- Definition Classes
- ObservableArray
- def update(idx: Int, value: Int): Unit
Set the element at
idx
in the array tovalue
.Set the element at
idx
in the array tovalue
.- idx
Index of element to be changed.
- value
New value for element at
idx
.
- Definition Classes
- ObservableArray
- Exceptions thrown
java.lang.ArrayIndexOutOfBoundsException
ifidx
does not satisfy0 <= idx < length
.
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- final def +=(elem1: Int, elem2: Int, elems: Int*): ObservableIntegerArray.this.type
- Definition Classes
- Growable
- Annotations
- @deprecated @inline()
- Deprecated
(Since version 2.13.0) Use
++=
akaaddAll
instead of varargs+=
; infix operations with an operand of multiple args will be deprecated
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
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 tojavafx.animation
.Example Usage
A basic ScalaFX application is created creating an object that is an instance of
JFXApp3
. Following Java FX theatre metaphor, it contains astage
that contains ascene
. Astage
roughly corresponds to a window in a typical UI environment. Thescene
holds UI content presented to the user. In the example below, the content is a pane with a singlelabel
component.