Scene

scalafx.scene.Scene
See theScene companion object
class Scene(val delegate: Scene) extends SFXDelegate[Scene]

Value parameters

delegate

JavaFX Scene delegated. Its default value is a JavaFX Scene with a Group as root Node.

Attributes

Constructor

Create a new ScalaFX Scene with JavaFX Scene as delegate.

Companion
object
Graph
Supertypes
trait SFXDelegate[Scene]
class Object
trait Matchable
class Any

Members list

Value members

Constructors

def this(width: Double, height: Double)

Creates a Scene with a Group as root Node with a specific size.

Creates a Scene with a Group as root Node with a specific size.

Value parameters

height

The height of the scene

width

The width of the scene

Attributes

def this(parent: Parent)

Creates a Scene for a specific root Node.

Creates a Scene for a specific root Node.

Value parameters

parent

The root node of the scene graph

Attributes

def this(parent: Parent, width: Double, height: Double)

Creates a Scene for a specific root Node with a specific size.

Creates a Scene for a specific root Node with a specific size.

Value parameters

height

The height of the scene

parent

The root node of the scene graph

width

The width of the scene

Attributes

def this(parent: Parent, width: Double, height: Double, depthBuffer: Boolean)

Constructs a scene consisting of a root, with a dimension of width and height, and specifies whether a depth buffer is created for this scene.

Constructs a scene consisting of a root, with a dimension of width and height, and specifies whether a depth buffer is created for this scene.

Value parameters

depthBuffer

The depth buffer flag

height

The height of the scene

parent

The root node of the scene graph

width

The width of the scene

Attributes

def this(width: Double, height: Double, depthBuffer: Boolean)

Creates a Scene with a Group as parent, with a dimension of width and height, and specifies whether a depth buffer is created for this scene.

Creates a Scene with a Group as parent, with a dimension of width and height, and specifies whether a depth buffer is created for this scene.

Value parameters

depthBuffer

The depth buffer flag

height

The height of the scene

width

The width of the scene

Attributes

def this(parent: Parent, width: Double, height: Double, depthBuffer: Boolean, antiAliasing: SceneAntialiasing)

Constructs a scene consisting of a root, with a dimension of width and height, specifies whether a depth buffer is created for this scene and specifies the required scene anti-aliasing.

Constructs a scene consisting of a root, with a dimension of width and height, specifies whether a depth buffer is created for this scene and specifies the required scene anti-aliasing.

Value parameters

antiAliasing

The required scene anti-aliasing.

depthBuffer

The depth buffer flag

height

The height of the scene

parent

The root node of the scene graph

width

The width of the scene

Attributes

def this(width: Double, height: Double, depthBuffer: Boolean, antiAliasing: SceneAntialiasing)

Creates a Scene with a Group as parent, with a dimension of width and height, specifies whether a depth buffer is created for this scene and specifies the required scene anti-aliasing.

Creates a Scene with a Group as parent, with a dimension of width and height, specifies whether a depth buffer is created for this scene and specifies the required scene anti-aliasing.

Value parameters

antiAliasing

The required scene anti-aliasing.

depthBuffer

The depth buffer flag

height

The height of the scene

width

The width of the scene

Attributes

def this(parent: Parent, width: Double, height: Double, fill: Paint)

Creates a Scene for a specific root Node with a specific size and fill.

Creates a Scene for a specific root Node with a specific size and fill.

Value parameters

fill

The fill

height

The height of the scene

parent

The root node of the scene graph

width

The width of the scene

Attributes

def this(parent: Parent, fill: Paint)

Creates a Scene for a specific root Node with a fill.

Creates a Scene for a specific root Node with a fill.

Value parameters

fill

The fill

parent

The root node of the scene graph

Attributes

Concrete methods

def accelerators: ObservableMap[KeyCombination, Runnable]

Gets the list of accelerators for this Scene.

Gets the list of accelerators for this Scene.

Attributes

Registers the specified mnemonic.

Registers the specified mnemonic.

Value parameters

m

The Mnemonic

Attributes

Returns scene's antialiasing setting.

Returns scene's antialiasing setting.

Attributes

def camera: ObjectProperty[Camera]

Specifies the type of camera use for rendering this Scene.

Specifies the type of camera use for rendering this Scene.

Attributes

def camera_=(v: Camera): Unit
def content: ObservableList[Node]

Returns Content's Node children from this Scene's root.

Returns Content's Node children from this Scene's root.

Attributes

Sets the list of Nodes children from this Scene's root, replacing the prior content. If you want append to current content, use add or similar.

Sets the list of Nodes children from this Scene's root, replacing the prior content. If you want append to current content, use add or similar.

Value parameters

c

list of Nodes children from this Scene's root to replace prior content.

Attributes

def content_=(n: Node): Unit

Sets a Node child, replacing the prior content. If you want append to current content, use add or similar.

Sets a Node child, replacing the prior content. If you want append to current content, use add or similar.

Value parameters

n

Node child to replace prior content.

Attributes

def cursor: ObjectProperty[Cursor]

Defines the mouse cursor for this Scene.

Defines the mouse cursor for this Scene.

Attributes

def cursor_=(v: Cursor): Unit

Retrieves the depth buffer attribute for this scene.

Retrieves the depth buffer attribute for this scene.

Attributes

The effective node orientation of a scene resolves the inheritance of node orientation, returning either left-to-right or right-to-left.

The effective node orientation of a scene resolves the inheritance of node orientation, returning either left-to-right or right-to-left.

Attributes

def eventDispatcher: ObjectProperty[EventDispatcher]

Specifies the event dispatcher for this scene.

Specifies the event dispatcher for this scene.

Attributes

def eventDispatcher_=(v: EventDispatcher): Unit
def fill: ObjectProperty[Paint]

Defines the background fill of this Scene.

Defines the background fill of this Scene.

Attributes

def fill_=(v: Paint): Unit

The scene's current focus owner node. This node's "focused" variable might be false if this scene has no window, or if the window is inactive (window.focused == false).

The scene's current focus owner node. This node's "focused" variable might be false if this scene has no window, or if the window is inactive (window.focused == false).

Attributes

Since

2.2

Returns Nodes children from this Scene's root.

Returns Nodes children from this Scene's root.

Attributes

def getMnemonics: ObservableMap[KeyCombination, ObservableList[Mnemonic]]

Gets the list of mnemonics for this Scene.

Gets the list of mnemonics for this Scene.

Attributes

The height of this Scene

The height of this Scene

Attributes

def lookup(selector: String): Option[Node]

Looks for any node within the scene graph based on the specified CSS selector.

Looks for any node within the scene graph based on the specified CSS selector.

Value parameters

selector

The css selector to look up

Attributes

Returns

A scala.Some containing the Node in the scene which matches the CSS selector, or scala.None if none is found.

def nodeOrientation: ObjectProperty[NodeOrientation]
def onContextMenuRequested: ObjectProperty[EventHandler[_ >: ContextMenuEvent]]

Defines a function to be called when a mouse button has been clicked (pressed and released) on this Scene.

Defines a function to be called when a mouse button has been clicked (pressed and released) on this Scene.

Attributes

def onContextMenuRequested_=(v: EventHandler[_ >: ContextMenuEvent]): Unit
def onDragDetected: ObjectProperty[EventHandler[_ >: MouseEvent]]

Defines a function to be called when drag gesture has been detected.

Defines a function to be called when drag gesture has been detected.

Attributes

def onDragDetected_=(v: EventHandler[_ >: MouseEvent]): Unit
def onDragDone: ObjectProperty[EventHandler[_ >: DragEvent]]

Defines a function to be called when this Scene is a drag and drop gesture source after its data has been dropped on a drop target.

Defines a function to be called when this Scene is a drag and drop gesture source after its data has been dropped on a drop target.

Attributes

def onDragDone_=(v: EventHandler[_ >: DragEvent]): Unit
def onDragDropped: ObjectProperty[EventHandler[_ >: DragEvent]]

Defines a function to be called when the mouse button is released on this Scene during drag and drop gesture.

Defines a function to be called when the mouse button is released on this Scene during drag and drop gesture.

Attributes

def onDragDropped_=(v: EventHandler[_ >: DragEvent]): Unit
def onDragEntered: ObjectProperty[EventHandler[_ >: DragEvent]]

Defines a function to be called when drag gesture enters this Scene.

Defines a function to be called when drag gesture enters this Scene.

Attributes

def onDragEntered_=(v: EventHandler[_ >: DragEvent]): Unit
def onDragExited: ObjectProperty[EventHandler[_ >: DragEvent]]

Defines a function to be called when drag gesture exits this Scene.

Defines a function to be called when drag gesture exits this Scene.

Attributes

def onDragExited_=(v: EventHandler[_ >: DragEvent]): Unit
def onDragOver: ObjectProperty[EventHandler[_ >: DragEvent]]

Defines a function to be called when drag gesture progresses within this Scene.

Defines a function to be called when drag gesture progresses within this Scene.

Attributes

def onDragOver_=(v: EventHandler[_ >: DragEvent]): Unit
def onInputMethodTextChanged: ObjectProperty[EventHandler[_ >: InputMethodEvent]]

Defines a function to be called when this Node has input focus and the input method text has changed.

Defines a function to be called when this Node has input focus and the input method text has changed.

Attributes

def onInputMethodTextChanged_=(v: EventHandler[_ >: InputMethodEvent]): Unit
def onKeyPressed: ObjectProperty[EventHandler[_ >: KeyEvent]]

Defines a function to be called when some Node of this Scene has input focus and a key has been pressed.

Defines a function to be called when some Node of this Scene has input focus and a key has been pressed.

Attributes

def onKeyPressed_=(v: EventHandler[_ >: KeyEvent]): Unit
def onKeyReleased: ObjectProperty[EventHandler[_ >: KeyEvent]]

Defines a function to be called when some Node of this Scene has input focus and a key has been released.

Defines a function to be called when some Node of this Scene has input focus and a key has been released.

Attributes

def onKeyReleased_=(v: EventHandler[_ >: KeyEvent]): Unit
def onKeyTyped: ObjectProperty[EventHandler[_ >: KeyEvent]]

Defines a function to be called when some Node of this Scene has input focus and a key has been typed.

Defines a function to be called when some Node of this Scene has input focus and a key has been typed.

Attributes

def onKeyTyped_=(v: EventHandler[_ >: KeyEvent]): Unit
def onMouseClicked: ObjectProperty[EventHandler[_ >: MouseEvent]]

Defines a function to be called when a mouse button has been clicked (pressed and released) on this Scene.

Defines a function to be called when a mouse button has been clicked (pressed and released) on this Scene.

Attributes

def onMouseClicked_=(v: EventHandler[_ >: MouseEvent]): Unit
def onMouseDragEntered: ObjectProperty[EventHandler[_ >: MouseDragEvent]]

Defines a function to be called when a full press-drag-release gesture enters this Scene.

Defines a function to be called when a full press-drag-release gesture enters this Scene.

Attributes

def onMouseDragEntered_=(v: EventHandler[_ >: MouseDragEvent]): Unit
def onMouseDragExited: ObjectProperty[EventHandler[_ >: MouseDragEvent]]

Defines a function to be called when a full press-drag-release gesture exits this Scene.

Defines a function to be called when a full press-drag-release gesture exits this Scene.

Attributes

def onMouseDragExited_=(v: EventHandler[_ >: MouseDragEvent]): Unit
def onMouseDragOver: ObjectProperty[EventHandler[_ >: MouseDragEvent]]

Defines a function to be called when a full press-drag-release gesture progresses within this Scene.

Defines a function to be called when a full press-drag-release gesture progresses within this Scene.

Attributes

def onMouseDragOver_=(v: EventHandler[_ >: MouseDragEvent]): Unit
def onMouseDragReleased: ObjectProperty[EventHandler[_ >: MouseDragEvent]]

Defines a function to be called when a full press-drag-release gesture ends within this Scene.

Defines a function to be called when a full press-drag-release gesture ends within this Scene.

Attributes

def onMouseDragReleased_=(v: EventHandler[_ >: MouseDragEvent]): Unit
def onMouseDragged: ObjectProperty[EventHandler[_ >: MouseEvent]]

Defines a function to be called when a mouse button is pressed on this Scene and then dragged.

Defines a function to be called when a mouse button is pressed on this Scene and then dragged.

Attributes

def onMouseDragged_=(v: EventHandler[_ >: MouseEvent]): Unit
def onMouseEntered: ObjectProperty[EventHandler[_ >: MouseEvent]]

Defines a function to be called when the mouse enters this Scene.

Defines a function to be called when the mouse enters this Scene.

Attributes

def onMouseEntered_=(v: EventHandler[_ >: MouseEvent]): Unit
def onMouseExited: ObjectProperty[EventHandler[_ >: MouseEvent]]

Defines a function to be called when the mouse exits this Scene.

Defines a function to be called when the mouse exits this Scene.

Attributes

def onMouseExited_=(v: EventHandler[_ >: MouseEvent]): Unit
def onMouseMoved: ObjectProperty[EventHandler[_ >: MouseEvent]]

Defines a function to be called when mouse cursor moves within this Scene but no buttons have been pushed.

Defines a function to be called when mouse cursor moves within this Scene but no buttons have been pushed.

Attributes

def onMouseMoved_=(v: EventHandler[_ >: MouseEvent]): Unit
def onMousePressed: ObjectProperty[EventHandler[_ >: MouseEvent]]

Defines a function to be called when a mouse button has been pressed on this Scene.

Defines a function to be called when a mouse button has been pressed on this Scene.

Attributes

def onMousePressed_=(v: EventHandler[_ >: MouseEvent]): Unit
def onMouseReleased: ObjectProperty[EventHandler[_ >: MouseEvent]]

Defines a function to be called when a mouse button has been released on this Scene.

Defines a function to be called when a mouse button has been released on this Scene.

Attributes

def onMouseReleased_=(v: EventHandler[_ >: MouseEvent]): Unit
def onRotate: ObjectProperty[EventHandler[_ >: RotateEvent]]

Defines a function to be called when user performs a rotation action.

Defines a function to be called when user performs a rotation action.

Attributes

Since

2.2

def onRotate_=(v: EventHandler[_ >: RotateEvent]): Unit
def onRotationFinished: ObjectProperty[EventHandler[_ >: RotateEvent]]

Defines a function to be called when a rotation gesture ends.

Defines a function to be called when a rotation gesture ends.

Attributes

Since

2.2

def onRotationFinished_=(v: EventHandler[_ >: RotateEvent]): Unit
def onRotationStarted: ObjectProperty[EventHandler[_ >: RotateEvent]]

Defines a function to be called when a rotation gesture starts.

Defines a function to be called when a rotation gesture starts.

Attributes

Since

2.2

def onRotationStarted_=(v: EventHandler[_ >: RotateEvent]): Unit
def onScroll: ObjectProperty[EventHandler[_ >: ScrollEvent]]

Defines a function to be called when user performs a scrolling action.

Defines a function to be called when user performs a scrolling action.

Attributes

def onScrollFinished: ObjectProperty[EventHandler[_ >: ScrollEvent]]

Defines a function to be called when a Scroll gesture ends.

Defines a function to be called when a Scroll gesture ends.

Attributes

Since

2.2

def onScrollFinished_=(v: EventHandler[_ >: ScrollEvent]): Unit
def onScrollStarted: ObjectProperty[EventHandler[_ >: ScrollEvent]]

Defines a function to be called when a Scroll gesture starts.

Defines a function to be called when a Scroll gesture starts.

Attributes

Since

2.2

def onScrollStarted_=(v: EventHandler[_ >: ScrollEvent]): Unit
def onScroll_=(v: EventHandler[_ >: ScrollEvent]): Unit
def onSwipeDown: ObjectProperty[EventHandler[_ >: SwipeEvent]]

Defines a function to be called when a Swipe Down gesture starts.

Defines a function to be called when a Swipe Down gesture starts.

Attributes

Since

2.2

def onSwipeDown_=(v: EventHandler[_ >: SwipeEvent]): Unit
def onSwipeLeft: ObjectProperty[EventHandler[_ >: SwipeEvent]]

Defines a function to be called when a Swipe Down gesture starts.

Defines a function to be called when a Swipe Down gesture starts.

Attributes

Since

2.2

def onSwipeLeft_=(v: EventHandler[_ >: SwipeEvent]): Unit
def onSwipeRight: ObjectProperty[EventHandler[_ >: SwipeEvent]]

Defines a function to be called when a Swipe Right gesture starts.

Defines a function to be called when a Swipe Right gesture starts.

Attributes

Since

2.2

def onSwipeRight_=(v: EventHandler[_ >: SwipeEvent]): Unit
def onSwipeUp: ObjectProperty[EventHandler[_ >: SwipeEvent]]

Defines a function to be called when a Swipe Up gesture starts.

Defines a function to be called when a Swipe Up gesture starts.

Attributes

Since

2.2

def onSwipeUp_=(v: EventHandler[_ >: SwipeEvent]): Unit
def onTouchMoved: ObjectProperty[EventHandler[_ >: TouchEvent]]

Defines a function to be called when user performs a Touch Moved action.

Defines a function to be called when user performs a Touch Moved action.

Attributes

Since

2.2

def onTouchMoved_=(v: EventHandler[_ >: TouchEvent]): Unit
def onTouchPressed: ObjectProperty[EventHandler[_ >: TouchEvent]]

Defines a function to be called when user performs a Touch Pressed action.

Defines a function to be called when user performs a Touch Pressed action.

Attributes

Since

2.2

def onTouchPressed_=(v: EventHandler[_ >: TouchEvent]): Unit
def onTouchReleased: ObjectProperty[EventHandler[_ >: TouchEvent]]

Defines a function to be called when user performs a Touch Released action.

Defines a function to be called when user performs a Touch Released action.

Attributes

Since

2.2

def onTouchReleased_=(v: EventHandler[_ >: TouchEvent]): Unit
def onTouchStationary: ObjectProperty[EventHandler[_ >: TouchEvent]]

Defines a function to be called when user performs a Touch Stationary action.

Defines a function to be called when user performs a Touch Stationary action.

Attributes

Since

2.2

def onTouchStationary_=(v: EventHandler[_ >: TouchEvent]): Unit
def onZoom: ObjectProperty[EventHandler[_ >: ZoomEvent]]

Defines a function to be called when user performs a Touch action.

Defines a function to be called when user performs a Touch action.

Attributes

Since

2.2

def onZoomFinished: ObjectProperty[EventHandler[_ >: ZoomEvent]]

Defines a function to be called when a Zoom gesture ends.

Defines a function to be called when a Zoom gesture ends.

Attributes

Since

2.2

def onZoomFinished_=(v: EventHandler[_ >: ZoomEvent]): Unit
def onZoomStarted: ObjectProperty[EventHandler[_ >: ZoomEvent]]

Defines a function to be called when a Zoom gesture starts.

Defines a function to be called when a Zoom gesture starts.

Attributes

Since

2.2

def onZoomStarted_=(v: EventHandler[_ >: ZoomEvent]): Unit
def onZoom_=(v: EventHandler[_ >: ZoomEvent]): Unit

Unregisters the specified mnemonic.

Unregisters the specified mnemonic.

Value parameters

m

The Mnemonic to be removed.

Attributes

def root: ObjectProperty[Parent]

Returns the root Node of the scene graph

Returns the root Node of the scene graph

Attributes

def root_=(v: Parent): Unit

Sets the root Node of the scene graph

Sets the root Node of the scene graph

Attributes

Takes a snapshot of this scene and returns the rendered image when it is ready.

Takes a snapshot of this scene and returns the rendered image when it is ready.

Value parameters

image

The writable image that will be used to hold the rendered scene.

Attributes

Returns

the rendered image

Since

2.2

def snapshot(callback: SnapshotResult => Unit, image: WritableImage): Unit

Takes a snapshot of this scene at the next frame and calls the specified callback method when the image is ready.

Takes a snapshot of this scene at the next frame and calls the specified callback method when the image is ready.

Value parameters

callback

A function to be called when the image is ready.

image

The writable image that will be used to hold the rendered scene.

Attributes

Since

2.2

def startDragAndDrop(transferModes: TransferMode*): Dragboard

Confirms a potential drag and drop gesture that is recognized over this Scene.

Confirms a potential drag and drop gesture that is recognized over this Scene.

Value parameters

transferModes

The supported TransferMode(s) of this Node

Attributes

Returns

A Dragboard to place this Scene's data on

Starts a full press-drag-release gesture with this scene as gesture source.

Starts a full press-drag-release gesture with this scene as gesture source.

Attributes

def stylesheets: ObservableList[String]

Gets an observable list of string URLs linking to the stylesheets to use with this Parent's contents.

Gets an observable list of string URLs linking to the stylesheets to use with this Parent's contents.

Attributes

Sets the list of stylesheets URLs, replacing the prior content. If you want append to current content, use add or similar.

Sets the list of stylesheets URLs, replacing the prior content. If you want append to current content, use add or similar.

Value parameters

c

list of stylesheets URLs to replace prior content.

Attributes

The URL of the user-agent stylesheet that will be used by this Scene in place of the the platform-default user-agent stylesheet. If the URL does not resolve to a valid location, the platform-default user-agent stylesheet will be used.

The URL of the user-agent stylesheet that will be used by this Scene in place of the the platform-default user-agent stylesheet. If the URL does not resolve to a valid location, the platform-default user-agent stylesheet will be used.

For additional information about using CSS with the scene graph, see the CSS Reference Guide.

Attributes

Returns

The URL of the user-agent stylesheet that will be used by this SubScene, or null if has not been set.

Set the URL of the user-agent stylesheet that will be used by this Scene in place of the the platform-default user-agent stylesheet. If the URL does not resolve to a valid location, the platform-default user-agent stylesheet will be used.

Set the URL of the user-agent stylesheet that will be used by this Scene in place of the the platform-default user-agent stylesheet. If the URL does not resolve to a valid location, the platform-default user-agent stylesheet will be used.

For additional information about using CSS with the scene graph, see the CSS Reference Guide.

Value parameters

url

The URL is a hierarchical URI of the form [scheme:][//authority][path]. If the URL does not have a [scheme:] component, the URL is considered to be the [path] component only. Any leading '/' character of the [path] is ignored and the [path] is treated as a path relative to the root of the application's classpath.

Attributes

The width of this Scene

The width of this Scene

Attributes

The Window for this Scene

The Window for this Scene

Attributes

The horizontal location of this Scene on the Window.

The horizontal location of this Scene on the Window.

Attributes

The vertical location of this Scene on the Window.

The vertical location of this Scene on the Window.

Attributes

Inherited methods

override def equals(ref: Any): Boolean

Verifies if a object is equals to this delegate.

Verifies if a object is equals to this delegate.

Value parameters

ref

Object to be compared.

Attributes

Returns

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

Definition Classes
SFXDelegate -> Any
Inherited from:
SFXDelegate
override def hashCode: Int

Attributes

Returns

The delegate hashcode

Definition Classes
SFXDelegate -> Any
Inherited from:
SFXDelegate
override def toString: String

Attributes

Returns

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

Definition Classes
SFXDelegate -> Any
Inherited from:
SFXDelegate

Concrete fields

override val delegate: Scene

JavaFX object to be wrapped.

JavaFX object to be wrapped.

Attributes