object ObservableIntegerArray extends ObservableArrayCompanionBase[Int, ObservableIntegerArray, javafx.collections.ObservableIntegerArray]
Companion Object for scalafx.collections.ObservableIntegerArray.
- Alphabetic
- By Inheritance
- ObservableIntegerArray
- ObservableArrayCompanionBase
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def apply(v: Int*): ObservableIntegerArray
Create new
ObservableArray
from a vararg list.Create new
ObservableArray
from a vararg list.- v
Value varargs.
- returns
New
ObservableArray
storingv
- Definition Classes
- ObservableIntegerArray → ObservableArrayCompanionBase
- def apply(a: Array[Int]): ObservableIntegerArray
Create new
ObservableArray
from an existing array.Create new
ObservableArray
from an existing array.- a
Array to be converted..
- returns
New
ObservableArray
storinga
.
- Definition Classes
- ObservableArrayCompanionBase
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- def empty(): ObservableIntegerArray
Return an empty
ObservableArray
Return an empty
ObservableArray
- returns
New empty
ObservableArray
- Definition Classes
- ObservableArrayCompanionBase
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def fill(n: Int)(elem: => Int): ObservableIntegerArray
Returns an observable array containing the results of some element computation.
Returns an observable array containing the results of some element computation.
Note that
elem
is computedn
times in total; it is not simply calculated once and reused.- n
Size of the new array. If this value is less than 1, an empty array is returned (matching the behavior of Scala's Array[T].fill function).
- elem
Computation to be calculated for each element.
- returns
Observable array of size
n
, with each element containing the result of computationelem
.
- Definition Classes
- ObservableArrayCompanionBase
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def iterate(start: Int, n: Int)(f: (Int) => Int): ObservableIntegerArray
Return an array returning repeated applications of a function to a start value.
Return an array returning repeated applications of a function to a start value.
- start
Start value of the array.
- n
Size of the new array. If this value is less than 1, an empty array is returned (matching the behavior of Scala's Array[T].iterate function).
- f
Function to be repeatedly applied to previous element's value.
- returns
Array containing elements
start, f(start), f(f(start)), ...
.
- Definition Classes
- ObservableArrayCompanionBase
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def ofDim(n: Int): ObservableIntegerArray
Create an observable array with given dimension.
Create an observable array with given dimension.
- n
Size of the new array. This value cannot be negative.
- returns
An observable array with the specified dimension and zeroed elements.
- Definition Classes
- ObservableArrayCompanionBase
- Exceptions thrown
NegativeArraySizeException
ifn
is negative.
- def range(start: Int, end: Int, step: Int = 1): ObservableIntegerArray
Returns an array containing equally spaced values in some integer interval.
Returns an array containing equally spaced values in some integer interval.
- start
Start value of the array.
- end
End value of the array, exclusive (that is, first value not included in array). If
start
exceedsend
(>=end
ifstep
is positive or <=end
ifstep
is negative), then an empty array will result.- step
Increment value of the array. This value can be negative, but not zero. If omitted, this value defaults to 1.
- returns
Observable array with values:
start, start + step, start + 2 * step, ...
, up to, but not including,end
.
- Exceptions thrown
IllegalArgumentException
ifstep
is 0.
- implicit def sfxObservableArray2jfxObservableArray(oa: ObservableIntegerArray): javafx.collections.ObservableIntegerArray
Extract a JavaFX
ObservableArray
from a ScalaFXObservableArray
.Extract a JavaFX
ObservableArray
from a ScalaFXObservableArray
.- oa
ScalaFX
ObservableArray
.- returns
JavaFX
ObservableArray
inside parameter.
- Definition Classes
- ObservableArrayCompanionBase
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def tabulate(n: Int)(f: (Int) => Int): ObservableIntegerArray
Returns an array containing the results of some element computation that takes the element index as an argument.
Returns an array containing the results of some element computation that takes the element index as an argument.
- n
Size of the new array. If this value is less than 1, an empty array is returned (matching the behavior of Scala's Array[T].tabulate function).
- f
Function to be used to initialize element whose index is passed as an argument.
- returns
Observable array of size
n
, with each element initialized byf
.
- Definition Classes
- ObservableArrayCompanionBase
- def toString(): String
- Definition Classes
- AnyRef → Any
- 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])
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.