class LinearGradient extends Paint with SFXDelegate[javafx.scene.paint.LinearGradient]
- Alphabetic
- By Inheritance
- LinearGradient
- Paint
- SFXDelegate
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new LinearGradient(startX: Double = 0, startY: Double = 0, endX: Double = 1, endY: Double = 1, proportional: Boolean = true, cycleMethod: CycleMethod = CycleMethod.NoCycle, stops: Seq[javafx.scene.paint.Stop] = Nil)
Creates a new instance of LinearGradient.
Creates a new instance of LinearGradient.
- startX
the X coordinate of the gradient axis start point. Default value = 0.0
- startY
the Y coordinate of the gradient axis start point. Default value = 0.0
- endX
the X coordinate of the gradient axis end point. Default value = 0.0
- endY
the Y coordinate of the gradient axis end point. Default value = 0.0
- proportional
whether the coordinates are proportional to the shape which this gradient fills. Default value = true
- cycleMethod
cycle method applied to the gradient. Default value = scalafx.scene.paint.CycleMethod.NoCycle
- stops
the gradient's color specification. Default value = scala.Nil
- new LinearGradient(delegate: javafx.scene.paint.LinearGradient)
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
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- def cycleMethod: CycleMethod
Defines which of the following cycle method is applied to the LinearGradient: scalafx.scene.paint.CycleMethod.NoCycle, scalafx.scene.paint.CycleMethod.Reflect or scalafx.scene.paint.CycleMethod.Repeat.
- val delegate: javafx.scene.paint.LinearGradient
JavaFX object to be wrapped.
JavaFX object to be wrapped.
- Definition Classes
- LinearGradient → Paint → SFXDelegate
- def endX: Double
Defines the X coordinate of the gradient axis end point.
- def endY: Double
Defines the Y coordinate of the gradient axis end point.
- 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
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def hashCode(): Int
- returns
The delegate hashcode
- Definition Classes
- SFXDelegate → AnyRef → Any
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- 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 proportional: Boolean
Indicates whether start and end locations are proportional or absolute.
- def startX: Double
Defines the X coordinate of the gradient axis start point.
- def startY: Double
Defines the Y coordinate of the gradient axis start point.
- def stops: List[javafx.scene.paint.Stop]
A sequence of 2 or more Stop values specifying how to distribute the colors along the gradient.
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- returns
Returns the original delegate's
toString()
adding a[SFX]
prefix.
- Definition Classes
- SFXDelegate → 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
JFXApp
. 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.