Top Description Inners Fields Constructors Methods
javafx.scene

public Class Scene

extends Object
implements EventTarget
Class Inheritance
All Implemented Interfaces
javafx.event.EventTarget
Annotations
@DefaultProperty:root
Imports
com.sun.glass.ui.Application, .Accessible, com.sun.javafx.scene.traversal.TraversalMethod, .Direction, .SceneTraversalEngine, .TopMostTraversalEngine, com.sun.javafx.util.Logging, .Utils, com.sun.javafx.application.PlatformImpl, com.sun.javafx.collections.TrackableObservableList, com.sun.javafx.css.StyleManager, com.sun.javafx.cursor.CursorFrame, com.sun.javafx.event.EventQueue, .EventUtil, com.sun.javafx.geom.PickRay, .Vec3d, com.sun.javafx.geom.transform.BaseTransform, com.sun.javafx.perf.PerformanceTracker, com.sun.javafx.scene.CssFlags, .LayoutFlags, .SceneEventDispatcher, .SceneHelper, .InputMethodStateManager, .NodeHelper, com.sun.javafx.scene.input.DragboardHelper, .ExtendedInputMethodRequests, .InputEventUtils, .PickResultChooser, .ClipboardHelper, .TouchPointHelper, com.sun.javafx.stage.EmbeddedWindow, .WindowHelper, com.sun.javafx.sg.prism.NGCamera, .NGLightBase, com.sun.javafx.tk.*, com.sun.prism.impl.PrismSettings, javafx.animation.KeyFrame, .Timeline, javafx.application.ConditionalFeature, .Platform, javafx.beans.DefaultProperty, .InvalidationListener, .NamedArg, javafx.beans.property.*, javafx.collections.FXCollections, .ListChangeListener.Change, .ObservableList, .ObservableMap, javafx.css.CssMetaData, .PseudoClass, .StyleableObjectProperty, .Stylesheet, javafx.event.*, javafx.geometry.*, javafx.scene.image.WritableImage, javafx.scene.input.*, javafx.scene.paint.Color, .Paint, javafx.stage.PopupWindow, .Stage, .StageStyle, .Window, javafx.util.Callback, .Duration, com.sun.javafx.logging.PlatformLogger, .PlatformLogger.Level, .PulseLogger, java.io.File, java.util.*, java.util.concurrent.CopyOnWriteArrayList, java.util.stream.Stream, java.lang.ref.WeakReference

The JavaFX Scene class is the container for all content in a scene graph. The background of the scene is filled as specified by the fill property.

The application must specify the root Node for the scene graph by setting the root property. If a Group is used as the root, the contents of the scene graph will be clipped by the scene's width and height and changes to the scene's size (if user resizes the stage) will not alter the layout of the scene graph. If a resizable node (layout Region or Control) is set as the root, then the root's size will track the scene's size, causing the contents to be relayed out as necessary.

The scene's size may be initialized by the application during construction. If no size is specified, the scene will automatically compute its initial size based on the preferred size of its content. If only one dimension is specified, the other dimension is computed using the specified dimension, respecting content bias of a root.

An application may request depth buffer support or scene anti-aliasing support at the creation of a Scene. A scene with only 2D shapes and without any 3D transforms does not need a depth buffer nor scene anti-aliasing support. A scene containing 3D shapes or 2D shapes with 3D transforms may use depth buffer support for proper depth sorted rendering; to avoid depth fighting (also known as Z fighting), disable depth testing on 2D shapes that have no 3D transforms. See depthTest for more information. A scene with 3D shapes may enable scene anti-aliasing to improve its rendering quality.

The depthBuffer and antiAliasing flags are conditional features. With the respective default values of: false and SceneAntialiasing.DISABLED. See ConditionalFeature.SCENE3D for more information.

A default headlight will be added to a scene that contains one or more Shape3D nodes, but no light nodes. This light source is a Color.WHITE PointLight placed at the camera position.

A Scene may be created and modified on any thread until it is attached to a Window that is showing. After that, it must be modified only on the JavaFX Application Thread. Note that Scene is not thread-safe; modifying a Scene on multiple threads at the same time will lead to unpredictable results and must be avoided.

The JavaFX Application Thread is created as part of the startup process for the JavaFX runtime. See the javafx.application.Application class and the Platform#startup(Runnable) method for more information.

Example:

import javafx.scene.*;
import javafx.scene.paint.*;
import javafx.scene.shape.*;

Group root = new Group();
Scene s = new Scene(root, 300, 300, Color.BLACK);

Rectangle r = new Rectangle(25,25,250,250);
r.setFill(Color.BLUE);

root.getChildren().add(r);
 
Since
JavaFX 2.0

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class
pack-priv static class
private static enum
pack-priv class
Scene.DnDGesture

A Drag and Drop gesture has a lifespan that lasts from mouse PRESSED event to mouse RELEASED event.

private static enum
Scene.DragDetectedState

State of a drag gesture with regards to DRAG_DETECTED event.

pack-priv class
pack-priv class
pack-priv class
private class
private class
pack-priv class
pack-priv class
pack-priv class
private class
pack-priv class
private static class
private static class
private static class

Field Summary

Modifier and TypeField and Description
private Accessible
private Map<Node, Accessible>
private static boolean
private final SceneAntialiasing
private ObjectProperty<Camera>
camera

Specifies the type of camera use for rendering this Scene.

private final Set<Node>
clearInitialCssStateNodes

A list of nodes that have expressed their interest to be notified when the next CSS pass is completed.

private Scene.ClickGenerator
private ObjectProperty<Cursor>
cursor

Defines the mouse cursor for this Scene.

private Point2D
private Point2D
private Camera
private static final NodeOrientation
private final boolean
private EnumSet<Scene.DirtyBits>
private Node[]
dirtyNodes

Set of dirty nodes; processed once per frame by the synchronizer.

private int
pack-priv Scene.DnDGesture
pack-priv Scene.DragGestureListener
private NodeOrientation
private Scene.EffectiveOrientationProperty
private ObjectProperty<EventDispatcher>
eventDispatcher

Specifies the event dispatcher for this scene.

private ObjectProperty<Paint>
fill

Defines the background fill of this Scene.

private boolean
focusDirty

Set to true if something has happened to the focused node that makes it no longer eligible to have the focus.

private Scene.FocusOwnerProperty
focusOwner

The scene's current focus owner node.

private ReadOnlyDoubleWrapper
height

The height of this Scene

private double
private static boolean
private InputMethodStateManager
inputMethodStateManager

A non-popup scene creates a state manager to coordinate input method handling with popups.

private static boolean
private SceneEventDispatcher
private List<LightBase>
private static final int
private Scene.MouseHandler
private TouchEvent
private ObjectProperty<NodeOrientation>
nodeOrientation

Node orientation describes the flow of visual data within a node.

pack-priv Parent
private ObjectProperty<EventHandler<? super ContextMenuEvent>>
onContextMenuRequested

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

private ObjectProperty<EventHandler<? super MouseEvent>>
onDragDetected

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

private ObjectProperty<EventHandler<? super DragEvent>>
private ObjectProperty<EventHandler<? super DragEvent>>
private ObjectProperty<EventHandler<? super DragEvent>>
private ObjectProperty<EventHandler<? super DragEvent>>
private ObjectProperty<EventHandler<? super DragEvent>>
private ObjectProperty<EventHandler<? super InputMethodEvent>>
onInputMethodTextChanged

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

private ObjectProperty<EventHandler<? super KeyEvent>>
onKeyPressed

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

private ObjectProperty<EventHandler<? super KeyEvent>>
onKeyReleased

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

private ObjectProperty<EventHandler<? super KeyEvent>>
onKeyTyped

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

private ObjectProperty<EventHandler<? super MouseEvent>>
onMouseClicked

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

private ObjectProperty<EventHandler<? super MouseDragEvent>>
onMouseDragEntered

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

private ObjectProperty<EventHandler<? super MouseDragEvent>>
onMouseDragExited

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

private ObjectProperty<EventHandler<? super MouseEvent>>
onMouseDragged

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

private ObjectProperty<EventHandler<? super MouseDragEvent>>
onMouseDragOver

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

private ObjectProperty<EventHandler<? super MouseDragEvent>>
onMouseDragReleased

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

private ObjectProperty<EventHandler<? super MouseEvent>>
onMouseEntered

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

private ObjectProperty<EventHandler<? super MouseEvent>>
onMouseExited

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

private ObjectProperty<EventHandler<? super MouseEvent>>
onMouseMoved

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

private ObjectProperty<EventHandler<? super MouseEvent>>
onMousePressed

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

private ObjectProperty<EventHandler<? super MouseEvent>>
onMouseReleased

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

private ObjectProperty<EventHandler<? super RotateEvent>>
onRotate

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

private ObjectProperty<EventHandler<? super RotateEvent>>
onRotationFinished

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

private ObjectProperty<EventHandler<? super RotateEvent>>
onRotationStarted

Defines a function to be called when a rotating gesture is detected.

private ObjectProperty<EventHandler<? super ScrollEvent>>
onScroll

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

private ObjectProperty<EventHandler<? super ScrollEvent>>
onScrollFinished

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

private ObjectProperty<EventHandler<? super ScrollEvent>>
onScrollStarted

Defines a function to be called when a scrolling gesture is detected.

private ObjectProperty<EventHandler<? super SwipeEvent>>
onSwipeDown

Defines a function to be called when an downward swipe gesture happens in this scene.

private ObjectProperty<EventHandler<? super SwipeEvent>>
onSwipeLeft

Defines a function to be called when an leftward swipe gesture happens in this scene.

private ObjectProperty<EventHandler<? super SwipeEvent>>
onSwipeRight

Defines a function to be called when an rightward swipe gesture happens in this scene.

private ObjectProperty<EventHandler<? super SwipeEvent>>
onSwipeUp

Defines a function to be called when an upward swipe gesture happens in this scene.

private ObjectProperty<EventHandler<? super TouchEvent>>
onTouchMoved

Defines a function to be called when a touch point is moved.

private ObjectProperty<EventHandler<? super TouchEvent>>
onTouchPressed

Defines a function to be called when a new touch point is pressed.

private ObjectProperty<EventHandler<? super TouchEvent>>
onTouchReleased

Defines a function to be called when a new touch point is pressed.

private ObjectProperty<EventHandler<? super TouchEvent>>
onTouchStationary

Defines a function to be called when a touch point stays pressed and still.

private ObjectProperty<EventHandler<? super ZoomEvent>>
onZoom

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

private ObjectProperty<EventHandler<? super ZoomEvent>>
onZoomFinished

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

private ObjectProperty<EventHandler<? super ZoomEvent>>
onZoomStarted

Defines a function to be called when a zooming gesture is detected.

private TKScene
peer

The peer of this scene

private static int
private static final boolean
PLATFORM_DRAG_GESTURE_INITIATION

If true, use the platform's drag gesture detection else use Scene-level detection as per DnDGesture.process(MouseEvent, List)

private List<Runnable>
private List<Runnable>
private ObservableMap<Object, Object>
private ObjectProperty<Parent>
root

Defines the root Node of the scene graph.

private final Scene.TouchGesture
pack-priv Scene.ScenePulseListener
scenePulseListener

The scene pulse listener that gets called on toolkit pulses

private final InvalidationListener
private final Scene.TouchGesture
private boolean
private static TKPulseListener
private static List<Runnable>
private static List<Runnable>
private static List<Runnable>
private final ObservableList<String>
stylesheets

A ObservableList of string URLs linking to the stylesheets to use with this scene's contents.

private final Scene.TouchGesture
pack-priv Runnable
testPulseListener

A listener for pulses, used for testing.

private Scene.TargetWrapper
private int
private Scene.TouchMap
private int
private TouchPoint[]
private Map<Integer, EventTarget>
private PerformanceTracker
private static final Object
private Node
transientFocusContainer

A node that is temporarily responsible for the FOCUS_NODE accessibility attribute.

private TopMostTraversalEngine
private static final Object
private ObjectProperty<String>
private ReadOnlyDoubleWrapper
width

The width of this Scene

private double
private ReadOnlyObjectWrapper<Window>
window

The Window for this Scene

private boolean
windowFocused

Stores whether the window associated with this scene is currently focused.

private ReadOnlyDoubleWrapper
x

The horizontal location of this Scene on the Window.

private ReadOnlyDoubleWrapper
y

The vertical location of this Scene on the Window.

private final Scene.TouchGesture

Constructor Summary

AccessConstructor and Description
public
Scene(Parent
The root node of the scene graph
root
)

Creates a Scene for a specific root Node.

public
Scene(Parent
The root node of the scene graph
root
,
double
The width of the scene
width
,
double
The height of the scene
height
)

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

public
Scene(Parent
The parent
root
,
Paint
The fill
fill
)

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

public
Scene(Parent
The root node of the scene graph
root
,
double
The width of the scene
width
,
double
The height of the scene
height
,
Paint
The fill
fill
)

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

public
Scene(Parent
The root node of the scene graph
root
,
double
The width of the scene
width
,
double
The height of the scene
height
,
boolean
The depth buffer flag

The depthBuffer flag is a conditional feature and its default value is false. See ConditionalFeature.SCENE3D for more information.

depthBuffer
)

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.

public
Scene(Parent
The root node of the scene graph
root
,
double
The width of the scene
width
,
double
The height of the scene
height
,
boolean
The depth buffer flag
depthBuffer
,
SceneAntialiasing
The scene anti-aliasing attribute. A value of null is treated as DISABLED.

The depthBuffer and antiAliasing are conditional features. With the respective default values of: false and SceneAntialiasing.DISABLED. See ConditionalFeature.SCENE3D for more information.

antiAliasing
)

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 whether scene anti-aliasing is requested.

private
Scene(Parent root, double width, double height, Paint fill, boolean depthBuffer, SceneAntialiasing antiAliasing)

Method Summary

Modifier and TypeMethod and Description
pack-priv void
public final <T extends Event> void
addEventFilter(final EventType<T>
the type of the events received by the filter
eventType
,
final EventHandler<? super T>
the event filter
eventFilter
)

Overrides default javafx.event.EventTarget.addEventFilter.

Registers an event filter for this target.

public final <T extends Event> void
addEventHandler(final EventType<T>
the type of the events received by the handler
eventType
,
final EventHandler<? super T>
the event handler
eventHandler
)

Overrides default javafx.event.EventTarget.addEventHandler.

Registers an event handler for this target.

pack-priv final void
public void
addMnemonic(Mnemonic
The mnemonic
m
)

Registers the specified mnemonic.

public final void
addPostLayoutPulseListener(Runnable
The Runnable to be called when the pulse occurs.
r
)

Adds a new scene post layout pulse listener to this scene.

public final void
addPreLayoutPulseListener(Runnable
The Runnable to be called when the pulse occurs.
r
)

Adds a new scene pre layout pulse listener to this scene.

pack-priv static void
addSnapshotRunnable(final Runnable runnable)

pack-priv void
addToDirtyList(Node n)

Add the specified node to this scene's dirty list.

public EventDispatchChain
buildEventDispatchChain(EventDispatchChain
the initial chain to build from
tail
)

Implements javafx.event.EventTarget.buildEventDispatchChain.

Construct an event dispatch chain for this target.

private NodeOrientation
public final ObjectProperty<Camera>
private void
clearDirty()

Clear all dirty bits

pack-priv final void
private SceneEventDispatcher
public final ObjectProperty<Cursor>
private void
pack-priv void
pack-priv void
private void
pack-priv void
pack-priv static WritableImage
doSnapshot(Scene scene, SubScene subScene, double x, double y, double w, double h, Node root, BaseTransform transform, boolean depthBuffer, Paint fill, Camera camera, WritableImage wimg)

private WritableImage
doSnapshot(WritableImage img)

Implementation method for snapshot

public final ReadOnlyObjectProperty<NodeOrientation>

Returns:

the effective node orientation of this scene
effectiveNodeOrientationProperty
()

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

pack-priv void
enableInputMethodEvents(boolean enable)

public final ObjectProperty<EventDispatcher>
public final ObjectProperty<Paint>
pack-priv void
private void
focusIneligible(Node node)

Moves the focus to a reasonble location "near" the given node.

private void
focusInitial()

Moves the focus to a reasonable initial location.

public final ReadOnlyObjectProperty<Node>
pack-priv void
generateMouseExited(Node
Node which is going to be removed
removing
)

Generates mouse exited event for a node which is going to be removed and its children, where appropriate.

public ObservableMap<KeyCombination, Runnable>

Returns:

the list of accelerators
getAccelerators
()

Gets the list of accelerators for this Scene.

pack-priv Accessible
public final SceneAntialiasing

Returns:

the SceneAntialiasing for this scene
getAntiAliasing
()

Return the defined SceneAntialiasing for this Scene.

private boolean
public final Camera
public final Cursor
pack-priv Camera
public final NodeOrientation
public final EventDispatcher
public final Paint
public final Node
public final double
pack-priv InputMethodStateManager
private SceneEventDispatcher
public ObservableMap<KeyCombination, ObservableList<Mnemonic>>

Returns:

the list of mnemonics
getMnemonics
()

Gets the list of mnemonics for this Scene.

public final NodeOrientation
public final EventHandler<? super ContextMenuEvent>
public final EventHandler<? super MouseEvent>
public final EventHandler<? super DragEvent>
public final EventHandler<? super DragEvent>
public final EventHandler<? super DragEvent>
public final EventHandler<? super DragEvent>
public final EventHandler<? super DragEvent>
public final EventHandler<? super InputMethodEvent>
public final EventHandler<? super KeyEvent>
public final EventHandler<? super KeyEvent>
public final EventHandler<? super KeyEvent>
public final EventHandler<? super MouseEvent>
public final EventHandler<? super MouseDragEvent>
public final EventHandler<? super MouseDragEvent>
public final EventHandler<? super MouseEvent>
public final EventHandler<? super MouseDragEvent>
public final EventHandler<? super MouseDragEvent>
public final EventHandler<? super MouseEvent>
public final EventHandler<? super MouseEvent>
public final EventHandler<? super MouseEvent>
public final EventHandler<? super MouseEvent>
public final EventHandler<? super MouseEvent>
public final EventHandler<? super RotateEvent>
public final EventHandler<? super RotateEvent>
public final EventHandler<? super RotateEvent>
public final EventHandler<? super ScrollEvent>
public final EventHandler<? super ScrollEvent>
public final EventHandler<? super ScrollEvent>
public final EventHandler<? super SwipeEvent>
public final EventHandler<? super SwipeEvent>
public final EventHandler<? super SwipeEvent>
public final EventHandler<? super SwipeEvent>
public final EventHandler<? super TouchEvent>
public final EventHandler<? super TouchEvent>
public final EventHandler<? super TouchEvent>
public final EventHandler<? super TouchEvent>
public final EventHandler<? super ZoomEvent>
public final EventHandler<? super ZoomEvent>
public final EventHandler<? super ZoomEvent>
pack-priv TKScene
private static double
getPreferredHeight(Parent root, double forcedHeight, double width)

private static double
getPreferredWidth(Parent root, double forcedWidth, double height)

public final ObservableMap<Object, Object>

Returns:

an observable map of properties on this node for use primarily by application developers
getProperties
()

Returns an observable map of properties on this node for use primarily by application developers.

public final Parent
public final ObservableList<String>

Returns:

the list of stylesheets to use with this scene
getStylesheets
()

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

public final String

Returns:

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

Get the URL of the user-agent stylesheet that will be used by this Scene.

public Object

Returns:

The Object that was previously set, or null if no property has been set or if null was set.
getUserData
()

Returns a previously set Object property, or null if no such property has been set using the Scene#setUserData(java.lang.Object) method.

public final double
public final Window
public final double
getX()

public final double
getY()

public boolean

Returns:

true if node has properties.
hasProperties
()

Tests if Scene has properties.

public final ReadOnlyDoubleProperty
private ReadOnlyDoubleWrapper
private void
init(double width, double height)

private void
init()

pack-priv final void
pack-priv void
public final boolean

Returns:

the depth buffer attribute.
isDepthBuffer
()

Retrieves the depth buffer attribute for this scene.

pack-priv boolean
private boolean
isDirty(Scene.DirtyBits dirtyBit)

Test the specified dirty bit

private boolean
isDirtyEmpty()

Test whether the dirty bits are empty

pack-priv final boolean
private boolean
isInScene(double x, double y)

pack-priv static boolean
isPGAccessAllowed()

Used for debugging purposes.

pack-priv boolean

Returns:

boolean indicating whether the scene is quiescent
isQuiescent
()

Returns true if this scene is quiescent, i.e. it has no activity pending on it such as CSS processing or layout requests.

public Node

Returns:

the Node in the scene which matches the CSS selector, or null if none is found.
lookup
(String
The css selector to look up
selector
)

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

pack-priv void
pack-priv void
private void
markDirty(Scene.DirtyBits dirtyBit)

Set the specified dirty bit and mark the peer as dirty

public final ObjectProperty<NodeOrientation>
public final ObjectProperty<EventHandler<? super ContextMenuEvent>>
public final ObjectProperty<EventHandler<? super MouseEvent>>
public final ObjectProperty<EventHandler<? super DragEvent>>

Returns:

the function to be called when this scene is a drag and drop gesture source after its data has been dropped on a drop target
onDragDoneProperty
()

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.

public final ObjectProperty<EventHandler<? super DragEvent>>

Returns:

the function to be called when the mouse button is released on this scene during drag and drop gesture
onDragDroppedProperty
()

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

public final ObjectProperty<EventHandler<? super DragEvent>>

Returns:

function to be called when drag gesture enters this scene
onDragEnteredProperty
()

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

public final ObjectProperty<EventHandler<? super DragEvent>>

Returns:

the function to be called when drag gesture exits this scene
onDragExitedProperty
()

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

public final ObjectProperty<EventHandler<? super DragEvent>>

Returns:

the function to be called when drag gesture progresses within this scene
onDragOverProperty
()

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

public final ObjectProperty<EventHandler<? super InputMethodEvent>>
public final ObjectProperty<EventHandler<? super KeyEvent>>
public final ObjectProperty<EventHandler<? super KeyEvent>>
public final ObjectProperty<EventHandler<? super KeyEvent>>
public final ObjectProperty<EventHandler<? super MouseEvent>>
public final ObjectProperty<EventHandler<? super MouseDragEvent>>
public final ObjectProperty<EventHandler<? super MouseDragEvent>>
public final ObjectProperty<EventHandler<? super MouseEvent>>
public final ObjectProperty<EventHandler<? super MouseDragEvent>>
public final ObjectProperty<EventHandler<? super MouseDragEvent>>
public final ObjectProperty<EventHandler<? super MouseEvent>>
public final ObjectProperty<EventHandler<? super MouseEvent>>
public final ObjectProperty<EventHandler<? super MouseEvent>>
public final ObjectProperty<EventHandler<? super MouseEvent>>
public final ObjectProperty<EventHandler<? super MouseEvent>>
public final ObjectProperty<EventHandler<? super RotateEvent>>
public final ObjectProperty<EventHandler<? super RotateEvent>>
public final ObjectProperty<EventHandler<? super RotateEvent>>
public final ObjectProperty<EventHandler<? super ScrollEvent>>
public final ObjectProperty<EventHandler<? super ScrollEvent>>
public final ObjectProperty<EventHandler<? super ScrollEvent>>
public final ObjectProperty<EventHandler<? super SwipeEvent>>
public final ObjectProperty<EventHandler<? super SwipeEvent>>
public final ObjectProperty<EventHandler<? super SwipeEvent>>
public final ObjectProperty<EventHandler<? super SwipeEvent>>
public final ObjectProperty<EventHandler<? super TouchEvent>>
public final ObjectProperty<EventHandler<? super TouchEvent>>
public final ObjectProperty<EventHandler<? super TouchEvent>>
public final ObjectProperty<EventHandler<? super TouchEvent>>
public final ObjectProperty<EventHandler<? super ZoomEvent>>
public final ObjectProperty<EventHandler<? super ZoomEvent>>
public final ObjectProperty<EventHandler<? super ZoomEvent>>
private void
private PickResult
pick(final double x, final double y)

private void
pick(Scene.TargetWrapper target, final double x, final double y)

pack-priv void
private void
private void
pack-priv boolean
private void
processMenuEvent(double x2, double y2, double xAbs, double yAbs, boolean isKeyboardTrigger)

pack-priv void
private void
pack-priv void
pack-priv Accessible
public final <T extends Event> void
removeEventFilter(final EventType<T>
the event type from which to unregister
eventType
,
final EventHandler<? super T>
the event filter
eventFilter
)

Overrides default javafx.event.EventTarget.removeEventFilter.

Unregisters a previously registered event filter from this target.

public final <T extends Event> void
removeEventHandler(final EventType<T>
the event type from which to unregister
eventType
,
final EventHandler<? super T>
the event handler
eventHandler
)

Overrides default javafx.event.EventTarget.removeEventHandler.

Unregisters a previously registered event handler from this target.

pack-priv final void
public void
removeMnemonic(Mnemonic
The mnemonic
m
)

Unregisters the specified mnemonic.

public final void
removePostLayoutPulseListener(Runnable
The Runnable that should no longer be called when the pulse occurs for this scene.
r
)

Removes a previously registered scene post layout pulse listener from listening to pulses in this scene.

public final void
removePreLayoutPulseListener(Runnable
The Runnable that should no longer be called when the pulse occurs for this scene.
r
)

Removes a previously registered scene pre layout pulse listener from listening to pulses in this scene.

pack-priv void
requestFocus(Node node, boolean focusVisible)

pack-priv void
resizeRootOnSceneSizeChange(double newWidth, double newHeight)

pack-priv final void
public final ObjectProperty<Parent>
private void
pack-priv static void
setAllowPGAccess(boolean flag)

public final void
public final void
private void
setDirty(Scene.DirtyBits dirtyBit)

Set the specified dirty bit

public final void
protected final <
the specific event class of the handler
T extends Event
>
void
setEventHandler(final EventType<T>
the event type to associate with the given eventHandler
eventType
,
final EventHandler<? super T>
the handler to register, or null to unregister
eventHandler
)

Sets the handler to use for this event type.

public final void
setFill(Paint value)

pack-priv final void
setFocusDirty(boolean value)

private void
setFocusOwner(Node node, boolean focusVisible)

private final void
setHeight(double value)

pack-priv void
public final void
public final void
public final void
public final void
public final void
public final void
public final void
public final void
public final void
public final void
public final void
public final void
public final void
public final void
public final void
public final void
public final void
public final void
public final void
public final void
public final void
public final void
public final void
public final void
public final void
public final void
public final void
public final void
public final void
public final void
public final void
public final void
public final void
public final void
public final void
public final void
public final void
public final void
public final void
public final void
public final void
setRoot(Parent value)

public final void
setUserAgentStylesheet(String
the URL of the user-agent stylesheet
url
)

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.

public void
setUserData(Object
The value to be stored - this can later be retrieved by calling Scene#getUserData().
value
)

Convenience method for setting a single Object property that can be retrieved at a later date.

private final void
setWidth(double value)

pack-priv void
private void
setWindowFocused(boolean value)

private final void
setX(double value)

private final void
setY(double value)

public WritableImage

Returns:

the rendered image
snapshot
(WritableImage
the writable image that will be used to hold the rendered scene. It may be null in which case a new WritableImage will be constructed. If the image is non-null, the scene will be rendered into the existing image. In this case, the width and height of the image determine the area that is rendered instead of the width and height of the scene.
image
)

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

public void
snapshot(Callback<SnapshotResult, Void>
a class whose call method will be called when the image is ready. The SnapshotResult that is passed into the call method of the callback will contain the rendered image and the source scene that was rendered. The callback parameter must not be null.
callback
,
WritableImage
the writable image that will be used to hold the rendered scene. It may be null in which case a new WritableImage will be constructed. If the image is non-null, the scene will be rendered into the existing image. In this case, the width and height of the image determine the area that is rendered instead of the width and height of the scene.
image
)

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

public Dragboard

Returns:

A Dragboard to place this Scene's data on
startDragAndDrop
(TransferMode...
The supported TransferMode(s) of this Node
transferModes
)

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

pack-priv Dragboard
startDragAndDrop(EventTarget source, TransferMode... transferModes)

public void
startFullDrag()

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

pack-priv void
private void
syncLights()

PG Light synchronizer.

pack-priv Node
test_pick(double x, double y)

Note

The only user of this method is in unit test: PickAndContainTest.

pack-priv boolean
traverse(Node node, Direction dir, TraversalMethod method)

Traverses focus from the given node in the given direction.

pack-priv void
public final ObjectProperty<String>

Returns:

the userAgentStylesheet property
userAgentStylesheetProperty
()

Gets the userAgentStylesheet property.

public final ReadOnlyDoubleProperty
private ReadOnlyDoubleWrapper
private void
windowForSceneChanged(Window oldWindow, Window newWindow)

public final ReadOnlyObjectProperty<Window>
private ReadOnlyObjectWrapper<Window>
public final ReadOnlyDoubleProperty
private ReadOnlyDoubleWrapper
public final ReadOnlyDoubleProperty
private ReadOnlyDoubleWrapper
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait