@DefaultProperty(value="root")
public class Scene
extends java.lang.Object
implements javafx.event.EventTarget
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.
Scene objects must be constructed and modified on the JavaFX Application Thread.
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);
Type | Property and Description |
---|---|
javafx.beans.property.ObjectProperty<Camera> |
camera
Specifies the type of camera use for rendering this
Scene . |
javafx.beans.property.ObjectProperty<Cursor> |
cursor
Defines the mouse cursor for this
Scene . |
javafx.beans.property.ReadOnlyObjectProperty<javafx.geometry.NodeOrientation> |
effectiveNodeOrientation
The effective node orientation of a scene resolves the inheritance of
node orientation, returning either left-to-right or right-to-left.
|
javafx.beans.property.ObjectProperty<javafx.event.EventDispatcher> |
eventDispatcher
Specifies the event dispatcher for this scene.
|
javafx.beans.property.ObjectProperty<javafx.scene.paint.Paint> |
fill
Defines the background fill of this
Scene . |
javafx.beans.property.ReadOnlyObjectProperty<Node> |
focusOwner
The scene's current focus owner node.
|
javafx.beans.property.ReadOnlyDoubleProperty |
height
The height of this
Scene |
javafx.beans.property.ObjectProperty<javafx.geometry.NodeOrientation> |
nodeOrientation
Property holding NodeOrientation.
|
javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.ContextMenuEvent>> |
onContextMenuRequested
Defines a function to be called when a mouse button has been clicked
(pressed and released) on this
Scene . |
javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.MouseEvent>> |
onDragDetected
Defines a function to be called when drag gesture has been
detected.
|
javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.DragEvent>> |
onDragDone
Defines a function to be called when this @{code Scene} is a
drag and drop gesture source after its data has
been dropped on a drop target.
|
javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.DragEvent>> |
onDragDropped
Defines a function to be called when the mouse button is released
on this
Scene during drag and drop gesture. |
javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.DragEvent>> |
onDragEntered
Defines a function to be called when drag gesture
enters this
Scene . |
javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.DragEvent>> |
onDragExited
Defines a function to be called when drag gesture
exits this
Scene . |
javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.DragEvent>> |
onDragOver
Defines a function to be called when drag gesture progresses
within this
Scene . |
javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.InputMethodEvent>> |
onInputMethodTextChanged
Defines a function to be called when this
Node
has input focus and the input method text has changed. |
javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.KeyEvent>> |
onKeyPressed
Defines a function to be called when some
Node of this
Scene has input focus and a key has been pressed. |
javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.KeyEvent>> |
onKeyReleased
Defines a function to be called when some
Node of this
Scene has input focus and a key has been released. |
javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.KeyEvent>> |
onKeyTyped
Defines a function to be called when some
Node of this
Scene has input focus and a key has been typed. |
javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.MouseEvent>> |
onMouseClicked
Defines a function to be called when a mouse button has been clicked
(pressed and released) on this
Scene . |
javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.MouseDragEvent>> |
onMouseDragEntered
Defines a function to be called when a full press-drag-release gesture
enters this
Scene . |
javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.MouseDragEvent>> |
onMouseDragExited
Defines a function to be called when a full press-drag-release gesture
exits this
Scene . |
javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.MouseEvent>> |
onMouseDragged
Defines a function to be called when a mouse button is pressed
on this
Scene and then dragged. |
javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.MouseDragEvent>> |
onMouseDragOver
Defines a function to be called when a full press-drag-release gesture
progresses within this
Scene . |
javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.MouseDragEvent>> |
onMouseDragReleased
Defines a function to be called when a full press-drag-release gesture
ends within this
Scene . |
javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.MouseEvent>> |
onMouseEntered
Defines a function to be called when the mouse enters this
Scene . |
javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.MouseEvent>> |
onMouseExited
Defines a function to be called when the mouse exits this
Scene . |
javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.MouseEvent>> |
onMouseMoved
Defines a function to be called when mouse cursor moves within
this
Scene but no buttons have been pushed. |
javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.MouseEvent>> |
onMousePressed
Defines a function to be called when a mouse button
has been pressed on this
Scene . |
javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.MouseEvent>> |
onMouseReleased
Defines a function to be called when a mouse button
has been released on this
Scene . |
javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.RotateEvent>> |
onRotate
Defines a function to be called when user performs a rotating action.
|
javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.RotateEvent>> |
onRotationFinished
Defines a function to be called when a rotating gesture ends.
|
javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.RotateEvent>> |
onRotationStarted
Defines a function to be called when a rotating gesture is detected.
|
javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.ScrollEvent>> |
onScrollFinished
Defines a function to be called when a scrolling gesture ends.
|
javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.ScrollEvent>> |
onScroll
Defines a function to be called when user performs a scrolling action.
|
javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.ScrollEvent>> |
onScrollStarted
Defines a function to be called when a scrolling gesture is detected.
|
javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.SwipeEvent>> |
onSwipeDown
Defines a function to be called when an downward swipe gesture
happens in this scene.
|
javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.SwipeEvent>> |
onSwipeLeft
Defines a function to be called when an leftward swipe gesture
happens in this scene.
|
javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.SwipeEvent>> |
onSwipeRight
Defines a function to be called when an rightward swipe gesture
happens in this scene.
|
javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.SwipeEvent>> |
onSwipeUp
Defines a function to be called when an upward swipe gesture
happens in this scene.
|
javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.TouchEvent>> |
onTouchMoved
Defines a function to be called when a touch point is moved.
|
javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.TouchEvent>> |
onTouchPressed
Defines a function to be called when a new touch point is pressed.
|
javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.TouchEvent>> |
onTouchReleased
Defines a function to be called when a new touch point is pressed.
|
javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.TouchEvent>> |
onTouchStationary
Defines a function to be called when a touch point stays pressed and
still.
|
javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.ZoomEvent>> |
onZoomFinished
Defines a function to be called when a zooming gesture ends.
|
javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.ZoomEvent>> |
onZoom
Defines a function to be called when user performs a zooming action.
|
javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.ZoomEvent>> |
onZoomStarted
Defines a function to be called when a zooming gesture is detected.
|
javafx.beans.property.ObjectProperty<Parent> |
root
Defines the root
Node of the scene graph. |
javafx.beans.property.ReadOnlyDoubleProperty |
width
The width of this
Scene |
javafx.beans.property.ReadOnlyObjectProperty<javafx.stage.Window> |
window
The
Window for this Scene |
javafx.beans.property.ReadOnlyDoubleProperty |
x
The horizontal location of this
Scene on the Window . |
javafx.beans.property.ReadOnlyDoubleProperty |
y
The vertical location of this
Scene on the Window . |
Constructor and Description |
---|
Scene(Parent root)
Creates a Scene for a specific root Node.
|
Scene(Parent root,
double width,
double height)
Creates a Scene for a specific root Node with a specific size.
|
Scene(Parent root,
double width,
double height,
boolean 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.
|
Scene(Parent root,
double width,
double height,
boolean depthBuffer,
boolean 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.
|
Scene(Parent root,
double width,
double height,
javafx.scene.paint.Paint fill)
Creates a Scene for a specific root Node with a specific size and fill.
|
Scene(Parent root,
javafx.scene.paint.Paint fill)
Creates a Scene for a specific root Node with a fill.
|
Modifier and Type | Method and Description |
---|---|
<T extends javafx.event.Event> |
addEventFilter(javafx.event.EventType<T> eventType,
javafx.event.EventHandler<? super T> eventFilter)
Registers an event filter to this scene.
|
<T extends javafx.event.Event> |
addEventHandler(javafx.event.EventType<T> eventType,
javafx.event.EventHandler<? super T> eventHandler)
Registers an event handler to this scene.
|
void |
addMnemonic(javafx.scene.input.Mnemonic m)
Registers the specified mnemonic.
|
javafx.event.EventDispatchChain |
buildEventDispatchChain(javafx.event.EventDispatchChain tail)
Construct an event dispatch chain for this scene.
|
javafx.beans.property.ObjectProperty<Camera> |
cameraProperty()
Specifies the type of camera use for rendering this
Scene . |
javafx.beans.property.ObjectProperty<Cursor> |
cursorProperty()
Defines the mouse cursor for this
Scene . |
javafx.beans.property.ReadOnlyObjectProperty<javafx.geometry.NodeOrientation> |
effectiveNodeOrientationProperty()
The effective node orientation of a scene resolves the inheritance of
node orientation, returning either left-to-right or right-to-left.
|
javafx.beans.property.ObjectProperty<javafx.event.EventDispatcher> |
eventDispatcherProperty()
Specifies the event dispatcher for this scene.
|
javafx.beans.property.ObjectProperty<javafx.scene.paint.Paint> |
fillProperty()
Defines the background fill of this
Scene . |
javafx.beans.property.ReadOnlyObjectProperty<Node> |
focusOwnerProperty()
The scene's current focus owner node.
|
javafx.collections.ObservableMap<javafx.scene.input.KeyCombination,java.lang.Runnable> |
getAccelerators()
Gets the list of accelerators for this
Scene . |
Camera |
getCamera()
Gets the value of the property camera.
|
Cursor |
getCursor()
Gets the value of the property cursor.
|
javafx.geometry.NodeOrientation |
getEffectiveNodeOrientation()
Gets the value of the property effectiveNodeOrientation.
|
javafx.event.EventDispatcher |
getEventDispatcher()
Gets the value of the property eventDispatcher.
|
javafx.scene.paint.Paint |
getFill()
Gets the value of the property fill.
|
Node |
getFocusOwner()
Gets the value of the property focusOwner.
|
double |
getHeight()
Gets the value of the property height.
|
javafx.collections.ObservableMap<javafx.scene.input.KeyCombination,javafx.collections.ObservableList<javafx.scene.input.Mnemonic>> |
getMnemonics()
Gets the list of mnemonics for this
Scene . |
javafx.geometry.NodeOrientation |
getNodeOrientation()
Gets the value of the property nodeOrientation.
|
javafx.event.EventHandler<? super javafx.scene.input.ContextMenuEvent> |
getOnContextMenuRequested()
Gets the value of the property onContextMenuRequested.
|
javafx.event.EventHandler<? super javafx.scene.input.MouseEvent> |
getOnDragDetected()
Gets the value of the property onDragDetected.
|
javafx.event.EventHandler<? super javafx.scene.input.DragEvent> |
getOnDragDone()
Gets the value of the property onDragDone.
|
javafx.event.EventHandler<? super javafx.scene.input.DragEvent> |
getOnDragDropped()
Gets the value of the property onDragDropped.
|
javafx.event.EventHandler<? super javafx.scene.input.DragEvent> |
getOnDragEntered()
Gets the value of the property onDragEntered.
|
javafx.event.EventHandler<? super javafx.scene.input.DragEvent> |
getOnDragExited()
Gets the value of the property onDragExited.
|
javafx.event.EventHandler<? super javafx.scene.input.DragEvent> |
getOnDragOver()
Gets the value of the property onDragOver.
|
javafx.event.EventHandler<? super javafx.scene.input.InputMethodEvent> |
getOnInputMethodTextChanged()
Gets the value of the property onInputMethodTextChanged.
|
javafx.event.EventHandler<? super javafx.scene.input.KeyEvent> |
getOnKeyPressed()
Gets the value of the property onKeyPressed.
|
javafx.event.EventHandler<? super javafx.scene.input.KeyEvent> |
getOnKeyReleased()
Gets the value of the property onKeyReleased.
|
javafx.event.EventHandler<? super javafx.scene.input.KeyEvent> |
getOnKeyTyped()
Gets the value of the property onKeyTyped.
|
javafx.event.EventHandler<? super javafx.scene.input.MouseEvent> |
getOnMouseClicked()
Gets the value of the property onMouseClicked.
|
javafx.event.EventHandler<? super javafx.scene.input.MouseDragEvent> |
getOnMouseDragEntered()
Gets the value of the property onMouseDragEntered.
|
javafx.event.EventHandler<? super javafx.scene.input.MouseDragEvent> |
getOnMouseDragExited()
Gets the value of the property onMouseDragExited.
|
javafx.event.EventHandler<? super javafx.scene.input.MouseEvent> |
getOnMouseDragged()
Gets the value of the property onMouseDragged.
|
javafx.event.EventHandler<? super javafx.scene.input.MouseDragEvent> |
getOnMouseDragOver()
Gets the value of the property onMouseDragOver.
|
javafx.event.EventHandler<? super javafx.scene.input.MouseDragEvent> |
getOnMouseDragReleased()
Gets the value of the property onMouseDragReleased.
|
javafx.event.EventHandler<? super javafx.scene.input.MouseEvent> |
getOnMouseEntered()
Gets the value of the property onMouseEntered.
|
javafx.event.EventHandler<? super javafx.scene.input.MouseEvent> |
getOnMouseExited()
Gets the value of the property onMouseExited.
|
javafx.event.EventHandler<? super javafx.scene.input.MouseEvent> |
getOnMouseMoved()
Gets the value of the property onMouseMoved.
|
javafx.event.EventHandler<? super javafx.scene.input.MouseEvent> |
getOnMousePressed()
Gets the value of the property onMousePressed.
|
javafx.event.EventHandler<? super javafx.scene.input.MouseEvent> |
getOnMouseReleased()
Gets the value of the property onMouseReleased.
|
javafx.event.EventHandler<? super javafx.scene.input.RotateEvent> |
getOnRotate()
Gets the value of the property onRotate.
|
javafx.event.EventHandler<? super javafx.scene.input.RotateEvent> |
getOnRotationFinished()
Gets the value of the property onRotationFinished.
|
javafx.event.EventHandler<? super javafx.scene.input.RotateEvent> |
getOnRotationStarted()
Gets the value of the property onRotationStarted.
|
javafx.event.EventHandler<? super javafx.scene.input.ScrollEvent> |
getOnScroll()
Gets the value of the property onScroll.
|
javafx.event.EventHandler<? super javafx.scene.input.ScrollEvent> |
getOnScrollFinished()
Gets the value of the property onScrollFinished.
|
javafx.event.EventHandler<? super javafx.scene.input.ScrollEvent> |
getOnScrollStarted()
Gets the value of the property onScrollStarted.
|
javafx.event.EventHandler<? super javafx.scene.input.SwipeEvent> |
getOnSwipeDown()
Gets the value of the property onSwipeDown.
|
javafx.event.EventHandler<? super javafx.scene.input.SwipeEvent> |
getOnSwipeLeft()
Gets the value of the property onSwipeLeft.
|
javafx.event.EventHandler<? super javafx.scene.input.SwipeEvent> |
getOnSwipeRight()
Gets the value of the property onSwipeRight.
|
javafx.event.EventHandler<? super javafx.scene.input.SwipeEvent> |
getOnSwipeUp()
Gets the value of the property onSwipeUp.
|
javafx.event.EventHandler<? super javafx.scene.input.TouchEvent> |
getOnTouchMoved()
Gets the value of the property onTouchMoved.
|
javafx.event.EventHandler<? super javafx.scene.input.TouchEvent> |
getOnTouchPressed()
Gets the value of the property onTouchPressed.
|
javafx.event.EventHandler<? super javafx.scene.input.TouchEvent> |
getOnTouchReleased()
Gets the value of the property onTouchReleased.
|
javafx.event.EventHandler<? super javafx.scene.input.TouchEvent> |
getOnTouchStationary()
Gets the value of the property onTouchStationary.
|
javafx.event.EventHandler<? super javafx.scene.input.ZoomEvent> |
getOnZoom()
Gets the value of the property onZoom.
|
javafx.event.EventHandler<? super javafx.scene.input.ZoomEvent> |
getOnZoomFinished()
Gets the value of the property onZoomFinished.
|
javafx.event.EventHandler<? super javafx.scene.input.ZoomEvent> |
getOnZoomStarted()
Gets the value of the property onZoomStarted.
|
Parent |
getRoot()
Gets the value of the property root.
|
javafx.collections.ObservableList<java.lang.String> |
getStylesheets()
Gets an observable list of string URLs linking to the stylesheets to use
with this scene's contents.
|
double |
getWidth()
Gets the value of the property width.
|
javafx.stage.Window |
getWindow()
Gets the value of the property window.
|
double |
getX()
Gets the value of the property x.
|
double |
getY()
Gets the value of the property y.
|
javafx.beans.property.ReadOnlyDoubleProperty |
heightProperty()
The height of this
Scene |
boolean |
isAntiAliasing()
Return true if this
Scene is anti-aliased otherwise false. |
boolean |
isDepthBuffer()
Retrieves the depth buffer attribute for this scene.
|
Node |
lookup(java.lang.String selector)
Looks for any node within the scene graph based on the specified CSS selector.
|
javafx.beans.property.ObjectProperty<javafx.geometry.NodeOrientation> |
nodeOrientationProperty()
Property holding NodeOrientation.
|
javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.ContextMenuEvent>> |
onContextMenuRequestedProperty()
Defines a function to be called when a mouse button has been clicked
(pressed and released) on this
Scene . |
javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.MouseEvent>> |
onDragDetectedProperty()
Defines a function to be called when drag gesture has been
detected.
|
javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.DragEvent>> |
onDragDoneProperty()
Defines a function to be called when this @{code Scene} is a
drag and drop gesture source after its data has
been dropped on a drop target.
|
javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.DragEvent>> |
onDragDroppedProperty()
Defines a function to be called when the mouse button is released
on this
Scene during drag and drop gesture. |
javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.DragEvent>> |
onDragEnteredProperty()
Defines a function to be called when drag gesture
enters this
Scene . |
javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.DragEvent>> |
onDragExitedProperty()
Defines a function to be called when drag gesture
exits this
Scene . |
javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.DragEvent>> |
onDragOverProperty()
Defines a function to be called when drag gesture progresses
within this
Scene . |
javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.InputMethodEvent>> |
onInputMethodTextChangedProperty()
Defines a function to be called when this
Node
has input focus and the input method text has changed. |
javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.KeyEvent>> |
onKeyPressedProperty()
Defines a function to be called when some
Node of this
Scene has input focus and a key has been pressed. |
javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.KeyEvent>> |
onKeyReleasedProperty()
Defines a function to be called when some
Node of this
Scene has input focus and a key has been released. |
javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.KeyEvent>> |
onKeyTypedProperty()
Defines a function to be called when some
Node of this
Scene has input focus and a key has been typed. |
javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.MouseEvent>> |
onMouseClickedProperty()
Defines a function to be called when a mouse button has been clicked
(pressed and released) on this
Scene . |
javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.MouseDragEvent>> |
onMouseDragEnteredProperty()
Defines a function to be called when a full press-drag-release gesture
enters this
Scene . |
javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.MouseDragEvent>> |
onMouseDragExitedProperty()
Defines a function to be called when a full press-drag-release gesture
exits this
Scene . |
javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.MouseEvent>> |
onMouseDraggedProperty()
Defines a function to be called when a mouse button is pressed
on this
Scene and then dragged. |
javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.MouseDragEvent>> |
onMouseDragOverProperty()
Defines a function to be called when a full press-drag-release gesture
progresses within this
Scene . |
javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.MouseDragEvent>> |
onMouseDragReleasedProperty()
Defines a function to be called when a full press-drag-release gesture
ends within this
Scene . |
javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.MouseEvent>> |
onMouseEnteredProperty()
Defines a function to be called when the mouse enters this
Scene . |
javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.MouseEvent>> |
onMouseExitedProperty()
Defines a function to be called when the mouse exits this
Scene . |
javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.MouseEvent>> |
onMouseMovedProperty()
Defines a function to be called when mouse cursor moves within
this
Scene but no buttons have been pushed. |
javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.MouseEvent>> |
onMousePressedProperty()
Defines a function to be called when a mouse button
has been pressed on this
Scene . |
javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.MouseEvent>> |
onMouseReleasedProperty()
Defines a function to be called when a mouse button
has been released on this
Scene . |
javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.RotateEvent>> |
onRotateProperty()
Defines a function to be called when user performs a rotating action.
|
javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.RotateEvent>> |
onRotationFinishedProperty()
Defines a function to be called when a rotating gesture ends.
|
javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.RotateEvent>> |
onRotationStartedProperty()
Defines a function to be called when a rotating gesture is detected.
|
javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.ScrollEvent>> |
onScrollFinishedProperty()
Defines a function to be called when a scrolling gesture ends.
|
javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.ScrollEvent>> |
onScrollProperty()
Defines a function to be called when user performs a scrolling action.
|
javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.ScrollEvent>> |
onScrollStartedProperty()
Defines a function to be called when a scrolling gesture is detected.
|
javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.SwipeEvent>> |
onSwipeDownProperty()
Defines a function to be called when an downward swipe gesture
happens in this scene.
|
javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.SwipeEvent>> |
onSwipeLeftProperty()
Defines a function to be called when an leftward swipe gesture
happens in this scene.
|
javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.SwipeEvent>> |
onSwipeRightProperty()
Defines a function to be called when an rightward swipe gesture
happens in this scene.
|
javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.SwipeEvent>> |
onSwipeUpProperty()
Defines a function to be called when an upward swipe gesture
happens in this scene.
|
javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.TouchEvent>> |
onTouchMovedProperty()
Defines a function to be called when a touch point is moved.
|
javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.TouchEvent>> |
onTouchPressedProperty()
Defines a function to be called when a new touch point is pressed.
|
javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.TouchEvent>> |
onTouchReleasedProperty()
Defines a function to be called when a new touch point is pressed.
|
javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.TouchEvent>> |
onTouchStationaryProperty()
Defines a function to be called when a touch point stays pressed and
still.
|
javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.ZoomEvent>> |
onZoomFinishedProperty()
Defines a function to be called when a zooming gesture ends.
|
javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.ZoomEvent>> |
onZoomProperty()
Defines a function to be called when user performs a zooming action.
|
javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.ZoomEvent>> |
onZoomStartedProperty()
Defines a function to be called when a zooming gesture is detected.
|
<T extends javafx.event.Event> |
removeEventFilter(javafx.event.EventType<T> eventType,
javafx.event.EventHandler<? super T> eventFilter)
Unregisters a previously registered event filter from this scene.
|
<T extends javafx.event.Event> |
removeEventHandler(javafx.event.EventType<T> eventType,
javafx.event.EventHandler<? super T> eventHandler)
Unregisters a previously registered event handler from this scene.
|
void |
removeMnemonic(javafx.scene.input.Mnemonic m)
Unregisters the specified mnemonic.
|
javafx.beans.property.ObjectProperty<Parent> |
rootProperty()
Defines the root
Node of the scene graph. |
void |
setCamera(Camera value)
Sets the value of the property camera.
|
void |
setCursor(Cursor value)
Sets the value of the property cursor.
|
void |
setEventDispatcher(javafx.event.EventDispatcher value)
Sets the value of the property eventDispatcher.
|
protected <T extends javafx.event.Event> |
setEventHandler(javafx.event.EventType<T> eventType,
javafx.event.EventHandler<? super T> eventHandler)
Sets the handler to use for this event type.
|
void |
setFill(javafx.scene.paint.Paint value)
Sets the value of the property fill.
|
void |
setNodeOrientation(javafx.geometry.NodeOrientation orientation)
Sets the value of the property nodeOrientation.
|
void |
setOnContextMenuRequested(javafx.event.EventHandler<? super javafx.scene.input.ContextMenuEvent> value)
Sets the value of the property onContextMenuRequested.
|
void |
setOnDragDetected(javafx.event.EventHandler<? super javafx.scene.input.MouseEvent> value)
Sets the value of the property onDragDetected.
|
void |
setOnDragDone(javafx.event.EventHandler<? super javafx.scene.input.DragEvent> value)
Sets the value of the property onDragDone.
|
void |
setOnDragDropped(javafx.event.EventHandler<? super javafx.scene.input.DragEvent> value)
Sets the value of the property onDragDropped.
|
void |
setOnDragEntered(javafx.event.EventHandler<? super javafx.scene.input.DragEvent> value)
Sets the value of the property onDragEntered.
|
void |
setOnDragExited(javafx.event.EventHandler<? super javafx.scene.input.DragEvent> value)
Sets the value of the property onDragExited.
|
void |
setOnDragOver(javafx.event.EventHandler<? super javafx.scene.input.DragEvent> value)
Sets the value of the property onDragOver.
|
void |
setOnInputMethodTextChanged(javafx.event.EventHandler<? super javafx.scene.input.InputMethodEvent> value)
Sets the value of the property onInputMethodTextChanged.
|
void |
setOnKeyPressed(javafx.event.EventHandler<? super javafx.scene.input.KeyEvent> value)
Sets the value of the property onKeyPressed.
|
void |
setOnKeyReleased(javafx.event.EventHandler<? super javafx.scene.input.KeyEvent> value)
Sets the value of the property onKeyReleased.
|
void |
setOnKeyTyped(javafx.event.EventHandler<? super javafx.scene.input.KeyEvent> value)
Sets the value of the property onKeyTyped.
|
void |
setOnMouseClicked(javafx.event.EventHandler<? super javafx.scene.input.MouseEvent> value)
Sets the value of the property onMouseClicked.
|
void |
setOnMouseDragEntered(javafx.event.EventHandler<? super javafx.scene.input.MouseDragEvent> value)
Sets the value of the property onMouseDragEntered.
|
void |
setOnMouseDragExited(javafx.event.EventHandler<? super javafx.scene.input.MouseDragEvent> value)
Sets the value of the property onMouseDragExited.
|
void |
setOnMouseDragged(javafx.event.EventHandler<? super javafx.scene.input.MouseEvent> value)
Sets the value of the property onMouseDragged.
|
void |
setOnMouseDragOver(javafx.event.EventHandler<? super javafx.scene.input.MouseDragEvent> value)
Sets the value of the property onMouseDragOver.
|
void |
setOnMouseDragReleased(javafx.event.EventHandler<? super javafx.scene.input.MouseDragEvent> value)
Sets the value of the property onMouseDragReleased.
|
void |
setOnMouseEntered(javafx.event.EventHandler<? super javafx.scene.input.MouseEvent> value)
Sets the value of the property onMouseEntered.
|
void |
setOnMouseExited(javafx.event.EventHandler<? super javafx.scene.input.MouseEvent> value)
Sets the value of the property onMouseExited.
|
void |
setOnMouseMoved(javafx.event.EventHandler<? super javafx.scene.input.MouseEvent> value)
Sets the value of the property onMouseMoved.
|
void |
setOnMousePressed(javafx.event.EventHandler<? super javafx.scene.input.MouseEvent> value)
Sets the value of the property onMousePressed.
|
void |
setOnMouseReleased(javafx.event.EventHandler<? super javafx.scene.input.MouseEvent> value)
Sets the value of the property onMouseReleased.
|
void |
setOnRotate(javafx.event.EventHandler<? super javafx.scene.input.RotateEvent> value)
Sets the value of the property onRotate.
|
void |
setOnRotationFinished(javafx.event.EventHandler<? super javafx.scene.input.RotateEvent> value)
Sets the value of the property onRotationFinished.
|
void |
setOnRotationStarted(javafx.event.EventHandler<? super javafx.scene.input.RotateEvent> value)
Sets the value of the property onRotationStarted.
|
void |
setOnScroll(javafx.event.EventHandler<? super javafx.scene.input.ScrollEvent> value)
Sets the value of the property onScroll.
|
void |
setOnScrollFinished(javafx.event.EventHandler<? super javafx.scene.input.ScrollEvent> value)
Sets the value of the property onScrollFinished.
|
void |
setOnScrollStarted(javafx.event.EventHandler<? super javafx.scene.input.ScrollEvent> value)
Sets the value of the property onScrollStarted.
|
void |
setOnSwipeDown(javafx.event.EventHandler<? super javafx.scene.input.SwipeEvent> value)
Sets the value of the property onSwipeDown.
|
void |
setOnSwipeLeft(javafx.event.EventHandler<? super javafx.scene.input.SwipeEvent> value)
Sets the value of the property onSwipeLeft.
|
void |
setOnSwipeRight(javafx.event.EventHandler<? super javafx.scene.input.SwipeEvent> value)
Sets the value of the property onSwipeRight.
|
void |
setOnSwipeUp(javafx.event.EventHandler<? super javafx.scene.input.SwipeEvent> value)
Sets the value of the property onSwipeUp.
|
void |
setOnTouchMoved(javafx.event.EventHandler<? super javafx.scene.input.TouchEvent> value)
Sets the value of the property onTouchMoved.
|
void |
setOnTouchPressed(javafx.event.EventHandler<? super javafx.scene.input.TouchEvent> value)
Sets the value of the property onTouchPressed.
|
void |
setOnTouchReleased(javafx.event.EventHandler<? super javafx.scene.input.TouchEvent> value)
Sets the value of the property onTouchReleased.
|
void |
setOnTouchStationary(javafx.event.EventHandler<? super javafx.scene.input.TouchEvent> value)
Sets the value of the property onTouchStationary.
|
void |
setOnZoom(javafx.event.EventHandler<? super javafx.scene.input.ZoomEvent> value)
Sets the value of the property onZoom.
|
void |
setOnZoomFinished(javafx.event.EventHandler<? super javafx.scene.input.ZoomEvent> value)
Sets the value of the property onZoomFinished.
|
void |
setOnZoomStarted(javafx.event.EventHandler<? super javafx.scene.input.ZoomEvent> value)
Sets the value of the property onZoomStarted.
|
void |
setRoot(Parent value)
Sets the value of the property root.
|
void |
snapshot(javafx.util.Callback<SnapshotResult,java.lang.Void> callback,
javafx.scene.image.WritableImage image)
Takes a snapshot of this scene at the next frame and calls the
specified callback method when the image is ready.
|
javafx.scene.image.WritableImage |
snapshot(javafx.scene.image.WritableImage image)
Takes a snapshot of this scene and returns the rendered image when
it is ready.
|
javafx.scene.input.Dragboard |
startDragAndDrop(javafx.scene.input.TransferMode... transferModes)
Confirms a potential drag and drop gesture that is recognized over this
Scene . |
void |
startFullDrag()
Starts a full press-drag-release gesture with this scene as gesture
source.
|
javafx.beans.property.ReadOnlyDoubleProperty |
widthProperty()
The width of this
Scene |
javafx.beans.property.ReadOnlyObjectProperty<javafx.stage.Window> |
windowProperty()
The
Window for this Scene |
javafx.beans.property.ReadOnlyDoubleProperty |
xProperty()
The horizontal location of this
Scene on the Window . |
javafx.beans.property.ReadOnlyDoubleProperty |
yProperty()
The vertical location of this
Scene on the Window . |
public final javafx.beans.property.ReadOnlyObjectProperty<javafx.stage.Window> windowProperty
Window
for this Scene
getWindow()
public final javafx.beans.property.ReadOnlyDoubleProperty xProperty
Scene
on the Window
.getX()
public final javafx.beans.property.ReadOnlyDoubleProperty yProperty
Scene
on the Window
.getY()
public final javafx.beans.property.ReadOnlyDoubleProperty widthProperty
Scene
getWidth()
public final javafx.beans.property.ReadOnlyDoubleProperty heightProperty
Scene
getHeight()
public final javafx.beans.property.ObjectProperty<Camera> cameraProperty
Scene
.
If camera
is null, a parallel camera is used for rendering.
Note: this is a conditional feature. See
ConditionalFeature.SCENE3D
for more information.
getCamera()
,
setCamera(Camera)
public final javafx.beans.property.ObjectProperty<javafx.scene.paint.Paint> fillProperty
Scene
. Both a null
value meaning paint no background and a Paint
with transparency are supported, but what is painted behind it will
depend on the platform. The default value is the color white.getFill()
,
setFill(Paint)
public final javafx.beans.property.ObjectProperty<Parent> rootProperty
Node
of the scene graph.
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.
Scene doesn't accept null root.getRoot()
,
setRoot(Parent)
public final javafx.beans.property.ObjectProperty<Cursor> cursorProperty
Scene
.getCursor()
,
setCursor(Cursor)
public final javafx.beans.property.ReadOnlyObjectProperty<Node> focusOwnerProperty
getFocusOwner()
public final javafx.beans.property.ObjectProperty<javafx.event.EventDispatcher> eventDispatcherProperty
EventDispatcher
, the new dispatcher should forward
events to the replaced dispatcher to keep the scene's default event
handling behavior.public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.ContextMenuEvent>> onContextMenuRequestedProperty
Scene
.public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.MouseEvent>> onMouseClickedProperty
Scene
.public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.MouseEvent>> onMouseDraggedProperty
Scene
and then dragged.public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.MouseEvent>> onMouseEnteredProperty
Scene
.public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.MouseEvent>> onMouseExitedProperty
Scene
.public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.MouseEvent>> onMouseMovedProperty
Scene
but no buttons have been pushed.public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.MouseEvent>> onMousePressedProperty
Scene
.public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.MouseEvent>> onMouseReleasedProperty
Scene
.public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.MouseEvent>> onDragDetectedProperty
public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.MouseDragEvent>> onMouseDragOverProperty
Scene
.public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.MouseDragEvent>> onMouseDragReleasedProperty
Scene
.public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.MouseDragEvent>> onMouseDragEnteredProperty
Scene
.public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.MouseDragEvent>> onMouseDragExitedProperty
Scene
.public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.ScrollEvent>> onScrollStartedProperty
public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.ScrollEvent>> onScrollProperty
getOnScroll()
,
setOnScroll(EventHandler)
public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.ScrollEvent>> onScrollFinishedProperty
public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.RotateEvent>> onRotationStartedProperty
public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.RotateEvent>> onRotateProperty
getOnRotate()
,
setOnRotate(EventHandler)
public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.RotateEvent>> onRotationFinishedProperty
public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.ZoomEvent>> onZoomStartedProperty
public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.ZoomEvent>> onZoomProperty
getOnZoom()
,
setOnZoom(EventHandler)
public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.ZoomEvent>> onZoomFinishedProperty
public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.SwipeEvent>> onSwipeUpProperty
getOnSwipeUp()
,
setOnSwipeUp(EventHandler)
public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.SwipeEvent>> onSwipeDownProperty
getOnSwipeDown()
,
setOnSwipeDown(EventHandler)
public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.SwipeEvent>> onSwipeLeftProperty
getOnSwipeLeft()
,
setOnSwipeLeft(EventHandler)
public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.SwipeEvent>> onSwipeRightProperty
public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.TouchEvent>> onTouchPressedProperty
public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.TouchEvent>> onTouchMovedProperty
public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.TouchEvent>> onTouchReleasedProperty
public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.TouchEvent>> onTouchStationaryProperty
public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.DragEvent>> onDragEnteredProperty
Scene
.public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.DragEvent>> onDragExitedProperty
Scene
.public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.DragEvent>> onDragOverProperty
Scene
.getOnDragOver()
,
setOnDragOver(EventHandler)
public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.DragEvent>> onDragDroppedProperty
Scene
during drag and drop gesture. Transfer of data from
the DragEvent
's dragboard
should
happen in this function.public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.DragEvent>> onDragDoneProperty
transferMode
of the
event shows what just happened at the drop target.
If transferMode
has the value MOVE
, then the source can
clear out its data. Clearing the source's data gives the appropriate
appearance to a user that the data has been moved by the drag and drop
gesture. A transferMode
that has the value NONE
indicates that no data was transferred during the drag and drop gesture.getOnDragDone()
,
setOnDragDone(EventHandler)
public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.KeyEvent>> onKeyPressedProperty
Node
of this
Scene
has input focus and a key has been pressed. The function
is called only if the event hasn't been already consumed during its
capturing or bubbling phase.public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.KeyEvent>> onKeyReleasedProperty
Node
of this
Scene
has input focus and a key has been released. The function
is called only if the event hasn't been already consumed during its
capturing or bubbling phase.public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.KeyEvent>> onKeyTypedProperty
Node
of this
Scene
has input focus and a key has been typed. The function
is called only if the event hasn't been already consumed during its
capturing or bubbling phase.getOnKeyTyped()
,
setOnKeyTyped(EventHandler)
public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.InputMethodEvent>> onInputMethodTextChangedProperty
Node
has input focus and the input method text has changed. If this
function is not defined in this Node
, then it
receives the result string of the input method composition as a
series of onKeyTyped
function calls.
When the Node
loses the input focus, the JavaFX runtime
automatically commits the existing composed text if any.public final javafx.beans.property.ObjectProperty<javafx.geometry.NodeOrientation> nodeOrientationProperty
Node orientation describes the flow of visual data within a node. In the English speaking world, visual data normally flows from left-to-right. In an Arabic or Hebrew world, visual data flows from right-to-left. This is consistent with the reading order of text in both worlds. The default value is left-to-right.
public final javafx.beans.property.ReadOnlyObjectProperty<javafx.geometry.NodeOrientation> effectiveNodeOrientationProperty
getEffectiveNodeOrientation()
public Scene(Parent root)
root
- The root node of the scene graphjava.lang.IllegalStateException
- if this constructor is called on a thread
other than the JavaFX Application Thread.java.lang.NullPointerException
- if root is nullpublic Scene(Parent root, double width, double height)
root
- The root node of the scene graphwidth
- The width of the sceneheight
- The height of the scenejava.lang.IllegalStateException
- if this constructor is called on a thread
other than the JavaFX Application Thread.java.lang.NullPointerException
- if root is nullpublic Scene(Parent root, javafx.scene.paint.Paint fill)
root
- The parentfill
- The filljava.lang.IllegalStateException
- if this constructor is called on a thread
other than the JavaFX Application Thread.java.lang.NullPointerException
- if root is nullpublic Scene(Parent root, double width, double height, javafx.scene.paint.Paint fill)
root
- The root node of the scene graphwidth
- The width of the sceneheight
- The height of the scenefill
- The filljava.lang.IllegalStateException
- if this constructor is called on a thread
other than the JavaFX Application Thread.java.lang.NullPointerException
- if root is nullpublic Scene(Parent root, double width, double height, boolean depthBuffer)
root
- The root node of the scene graphwidth
- The width of the sceneheight
- The height of the scenedepthBuffer
- The depth buffer flag
The depthBuffer flag is a conditional feature and its default value is
false. See
ConditionalFeature.SCENE3D
for more information.
java.lang.IllegalStateException
- if this constructor is called on a thread
other than the JavaFX Application Thread.java.lang.NullPointerException
- if root is nullNode.setDepthTest(DepthTest)
public Scene(Parent root, double width, double height, boolean depthBuffer, boolean antiAliasing)
root
- The root node of the scene graphwidth
- The width of the sceneheight
- The height of the scenedepthBuffer
- The depth buffer flagantiAliasing
- The scene anti-aliasing flag
The depthBuffer and antiAliasing flags are conditional feature and the default
value for both are false. See
ConditionalFeature.SCENE3D
for more information.
java.lang.IllegalStateException
- if this constructor is called on a thread
other than the JavaFX Application Thread.java.lang.NullPointerException
- if root is nullNode.setDepthTest(DepthTest)
public boolean isAntiAliasing()
Scene
is anti-aliased otherwise false.public final javafx.stage.Window getWindow()
Window
for this Scene
public final javafx.beans.property.ReadOnlyObjectProperty<javafx.stage.Window> windowProperty()
Window
for this Scene
getWindow()
public final double getX()
Scene
on the Window
.public final javafx.beans.property.ReadOnlyDoubleProperty xProperty()
Scene
on the Window
.getX()
public final double getY()
Scene
on the Window
.public final javafx.beans.property.ReadOnlyDoubleProperty yProperty()
Scene
on the Window
.getY()
public final double getWidth()
Scene
public final javafx.beans.property.ReadOnlyDoubleProperty widthProperty()
Scene
getWidth()
public final double getHeight()
Scene
public final javafx.beans.property.ReadOnlyDoubleProperty heightProperty()
Scene
getHeight()
public final void setCamera(Camera value)
Scene
.
If camera
is null, a parallel camera is used for rendering.
Note: this is a conditional feature. See
ConditionalFeature.SCENE3D
for more information.
public final Camera getCamera()
Scene
.
If camera
is null, a parallel camera is used for rendering.
Note: this is a conditional feature. See
ConditionalFeature.SCENE3D
for more information.
public final javafx.beans.property.ObjectProperty<Camera> cameraProperty()
Scene
.
If camera
is null, a parallel camera is used for rendering.
Note: this is a conditional feature. See
ConditionalFeature.SCENE3D
for more information.
getCamera()
,
setCamera(Camera)
public final void setFill(javafx.scene.paint.Paint value)
Scene
. Both a null
value meaning paint no background and a Paint
with transparency are supported, but what is painted behind it will
depend on the platform. The default value is the color white.public final javafx.scene.paint.Paint getFill()
Scene
. Both a null
value meaning paint no background and a Paint
with transparency are supported, but what is painted behind it will
depend on the platform. The default value is the color white.public final javafx.beans.property.ObjectProperty<javafx.scene.paint.Paint> fillProperty()
Scene
. Both a null
value meaning paint no background and a Paint
with transparency are supported, but what is painted behind it will
depend on the platform. The default value is the color white.getFill()
,
setFill(Paint)
public final void setRoot(Parent value)
Node
of the scene graph.
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.
Scene doesn't accept null root.public final Parent getRoot()
Node
of the scene graph.
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.
Scene doesn't accept null root.public final javafx.beans.property.ObjectProperty<Parent> rootProperty()
Node
of the scene graph.
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.
Scene doesn't accept null root.getRoot()
,
setRoot(Parent)
public javafx.scene.image.WritableImage snapshot(javafx.scene.image.WritableImage image)
Paint
of this scene. The nodes in the scene are then rendered to the image.
The point (0,0) in scene coordinates is mapped to (0,0) in the image.
If the image is smaller than the size of the scene, then the rendering
will be clipped by the image.
When taking a snapshot of a scene that is being animated, either explicitly by the application or implicitly (such as chart animation), the snapshot will be rendered based on the state of the scene graph at the moment the snapshot is taken and will not reflect any subsequent animation changes.
image
- 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.java.lang.IllegalStateException
- if this method is called on a thread
other than the JavaFX Application Thread.public void snapshot(javafx.util.Callback<SnapshotResult,java.lang.Void> callback, javafx.scene.image.WritableImage image)
Paint
of this scene. The nodes in the scene are then rendered to the image.
The point (0,0) in scene coordinates is mapped to (0,0) in the image.
If the image is smaller than the size of the scene, then the rendering
will be clipped by the image.
This is an asynchronous call, which means that other events or animation might be processed before the scene is rendered. If any such events modify a node in the scene that modification will be reflected in the rendered image (as it will also be reflected in the frame rendered to the Stage).
When taking a snapshot of a scene that is being animated, either explicitly by the application or implicitly (such as chart animation), the snapshot will be rendered based on the state of the scene graph at the moment the snapshot is taken and will not reflect any subsequent animation changes.
callback
- 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.image
- 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.java.lang.IllegalStateException
- if this method is called on a thread
other than the JavaFX Application Thread.java.lang.NullPointerException
- if the callback parameter is null.public final void setCursor(Cursor value)
Scene
.public final Cursor getCursor()
Scene
.public final javafx.beans.property.ObjectProperty<Cursor> cursorProperty()
Scene
.getCursor()
,
setCursor(Cursor)
public Node lookup(java.lang.String selector)
selector
- The css selector to look upNode
in the scene which matches the CSS selector
,
or null
if none is found.public final javafx.collections.ObservableList<java.lang.String> getStylesheets()
public final boolean isDepthBuffer()
public final Node getFocusOwner()
public final javafx.beans.property.ReadOnlyObjectProperty<Node> focusOwnerProperty()
getFocusOwner()
public final void setEventDispatcher(javafx.event.EventDispatcher value)
EventDispatcher
, the new dispatcher should forward
events to the replaced dispatcher to keep the scene's default event
handling behavior.public final javafx.event.EventDispatcher getEventDispatcher()
EventDispatcher
, the new dispatcher should forward
events to the replaced dispatcher to keep the scene's default event
handling behavior.public final javafx.beans.property.ObjectProperty<javafx.event.EventDispatcher> eventDispatcherProperty()
EventDispatcher
, the new dispatcher should forward
events to the replaced dispatcher to keep the scene's default event
handling behavior.public final <T extends javafx.event.Event> void addEventHandler(javafx.event.EventType<T> eventType, javafx.event.EventHandler<? super T> eventHandler)
Event
of the specified type during the bubbling
phase of event delivery.T
- the specific event class of the handlereventType
- the type of the events to receive by the handlereventHandler
- the handler to registerjava.lang.NullPointerException
- if the event type or handler is nullpublic final <T extends javafx.event.Event> void removeEventHandler(javafx.event.EventType<T> eventType, javafx.event.EventHandler<? super T> eventHandler)
T
- the specific event class of the handlereventType
- the event type from which to unregistereventHandler
- the handler to unregisterjava.lang.NullPointerException
- if the event type or handler is nullpublic final <T extends javafx.event.Event> void addEventFilter(javafx.event.EventType<T> eventType, javafx.event.EventHandler<? super T> eventFilter)
Event
of the specified type during the
capturing phase of event delivery.T
- the specific event class of the filtereventType
- the type of the events to receive by the filtereventFilter
- the filter to registerjava.lang.NullPointerException
- if the event type or filter is nullpublic final <T extends javafx.event.Event> void removeEventFilter(javafx.event.EventType<T> eventType, javafx.event.EventHandler<? super T> eventFilter)
T
- the specific event class of the filtereventType
- the event type from which to unregistereventFilter
- the filter to unregisterjava.lang.NullPointerException
- if the event type or filter is nullprotected final <T extends javafx.event.Event> void setEventHandler(javafx.event.EventType<T> eventType, javafx.event.EventHandler<? super T> eventHandler)
T
- the specific event class of the handlereventType
- the event type to associate with the given eventHandlereventHandler
- the handler to register, or null to unregisterjava.lang.NullPointerException
- if the event type is nullpublic void addMnemonic(javafx.scene.input.Mnemonic m)
m
- The mnemonicpublic void removeMnemonic(javafx.scene.input.Mnemonic m)
m
- The mnemonicpublic javafx.collections.ObservableMap<javafx.scene.input.KeyCombination,javafx.collections.ObservableList<javafx.scene.input.Mnemonic>> getMnemonics()
Scene
.public javafx.collections.ObservableMap<javafx.scene.input.KeyCombination,java.lang.Runnable> getAccelerators()
Scene
.public javafx.event.EventDispatchChain buildEventDispatchChain(javafx.event.EventDispatchChain tail)
buildEventDispatchChain
in interface javafx.event.EventTarget
tail
- the initial chain to build frompublic final void setOnContextMenuRequested(javafx.event.EventHandler<? super javafx.scene.input.ContextMenuEvent> value)
Scene
.public final javafx.event.EventHandler<? super javafx.scene.input.ContextMenuEvent> getOnContextMenuRequested()
Scene
.public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.ContextMenuEvent>> onContextMenuRequestedProperty()
Scene
.public final void setOnMouseClicked(javafx.event.EventHandler<? super javafx.scene.input.MouseEvent> value)
Scene
.public final javafx.event.EventHandler<? super javafx.scene.input.MouseEvent> getOnMouseClicked()
Scene
.public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.MouseEvent>> onMouseClickedProperty()
Scene
.public final void setOnMouseDragged(javafx.event.EventHandler<? super javafx.scene.input.MouseEvent> value)
Scene
and then dragged.public final javafx.event.EventHandler<? super javafx.scene.input.MouseEvent> getOnMouseDragged()
Scene
and then dragged.public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.MouseEvent>> onMouseDraggedProperty()
Scene
and then dragged.public final void setOnMouseEntered(javafx.event.EventHandler<? super javafx.scene.input.MouseEvent> value)
Scene
.public final javafx.event.EventHandler<? super javafx.scene.input.MouseEvent> getOnMouseEntered()
Scene
.public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.MouseEvent>> onMouseEnteredProperty()
Scene
.public final void setOnMouseExited(javafx.event.EventHandler<? super javafx.scene.input.MouseEvent> value)
Scene
.public final javafx.event.EventHandler<? super javafx.scene.input.MouseEvent> getOnMouseExited()
Scene
.public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.MouseEvent>> onMouseExitedProperty()
Scene
.public final void setOnMouseMoved(javafx.event.EventHandler<? super javafx.scene.input.MouseEvent> value)
Scene
but no buttons have been pushed.public final javafx.event.EventHandler<? super javafx.scene.input.MouseEvent> getOnMouseMoved()
Scene
but no buttons have been pushed.public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.MouseEvent>> onMouseMovedProperty()
Scene
but no buttons have been pushed.public final void setOnMousePressed(javafx.event.EventHandler<? super javafx.scene.input.MouseEvent> value)
Scene
.public final javafx.event.EventHandler<? super javafx.scene.input.MouseEvent> getOnMousePressed()
Scene
.public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.MouseEvent>> onMousePressedProperty()
Scene
.public final void setOnMouseReleased(javafx.event.EventHandler<? super javafx.scene.input.MouseEvent> value)
Scene
.public final javafx.event.EventHandler<? super javafx.scene.input.MouseEvent> getOnMouseReleased()
Scene
.public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.MouseEvent>> onMouseReleasedProperty()
Scene
.public final void setOnDragDetected(javafx.event.EventHandler<? super javafx.scene.input.MouseEvent> value)
public final javafx.event.EventHandler<? super javafx.scene.input.MouseEvent> getOnDragDetected()
public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.MouseEvent>> onDragDetectedProperty()
public final void setOnMouseDragOver(javafx.event.EventHandler<? super javafx.scene.input.MouseDragEvent> value)
Scene
.public final javafx.event.EventHandler<? super javafx.scene.input.MouseDragEvent> getOnMouseDragOver()
Scene
.public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.MouseDragEvent>> onMouseDragOverProperty()
Scene
.public final void setOnMouseDragReleased(javafx.event.EventHandler<? super javafx.scene.input.MouseDragEvent> value)
Scene
.public final javafx.event.EventHandler<? super javafx.scene.input.MouseDragEvent> getOnMouseDragReleased()
Scene
.public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.MouseDragEvent>> onMouseDragReleasedProperty()
Scene
.public final void setOnMouseDragEntered(javafx.event.EventHandler<? super javafx.scene.input.MouseDragEvent> value)
Scene
.public final javafx.event.EventHandler<? super javafx.scene.input.MouseDragEvent> getOnMouseDragEntered()
Scene
.public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.MouseDragEvent>> onMouseDragEnteredProperty()
Scene
.public final void setOnMouseDragExited(javafx.event.EventHandler<? super javafx.scene.input.MouseDragEvent> value)
Scene
.public final javafx.event.EventHandler<? super javafx.scene.input.MouseDragEvent> getOnMouseDragExited()
Scene
.public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.MouseDragEvent>> onMouseDragExitedProperty()
Scene
.public final void setOnScrollStarted(javafx.event.EventHandler<? super javafx.scene.input.ScrollEvent> value)
public final javafx.event.EventHandler<? super javafx.scene.input.ScrollEvent> getOnScrollStarted()
public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.ScrollEvent>> onScrollStartedProperty()
public final void setOnScroll(javafx.event.EventHandler<? super javafx.scene.input.ScrollEvent> value)
public final javafx.event.EventHandler<? super javafx.scene.input.ScrollEvent> getOnScroll()
public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.ScrollEvent>> onScrollProperty()
getOnScroll()
,
setOnScroll(EventHandler)
public final void setOnScrollFinished(javafx.event.EventHandler<? super javafx.scene.input.ScrollEvent> value)
public final javafx.event.EventHandler<? super javafx.scene.input.ScrollEvent> getOnScrollFinished()
public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.ScrollEvent>> onScrollFinishedProperty()
public final void setOnRotationStarted(javafx.event.EventHandler<? super javafx.scene.input.RotateEvent> value)
public final javafx.event.EventHandler<? super javafx.scene.input.RotateEvent> getOnRotationStarted()
public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.RotateEvent>> onRotationStartedProperty()
public final void setOnRotate(javafx.event.EventHandler<? super javafx.scene.input.RotateEvent> value)
public final javafx.event.EventHandler<? super javafx.scene.input.RotateEvent> getOnRotate()
public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.RotateEvent>> onRotateProperty()
getOnRotate()
,
setOnRotate(EventHandler)
public final void setOnRotationFinished(javafx.event.EventHandler<? super javafx.scene.input.RotateEvent> value)
public final javafx.event.EventHandler<? super javafx.scene.input.RotateEvent> getOnRotationFinished()
public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.RotateEvent>> onRotationFinishedProperty()
public final void setOnZoomStarted(javafx.event.EventHandler<? super javafx.scene.input.ZoomEvent> value)
public final javafx.event.EventHandler<? super javafx.scene.input.ZoomEvent> getOnZoomStarted()
public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.ZoomEvent>> onZoomStartedProperty()
public final void setOnZoom(javafx.event.EventHandler<? super javafx.scene.input.ZoomEvent> value)
public final javafx.event.EventHandler<? super javafx.scene.input.ZoomEvent> getOnZoom()
public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.ZoomEvent>> onZoomProperty()
getOnZoom()
,
setOnZoom(EventHandler)
public final void setOnZoomFinished(javafx.event.EventHandler<? super javafx.scene.input.ZoomEvent> value)
public final javafx.event.EventHandler<? super javafx.scene.input.ZoomEvent> getOnZoomFinished()
public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.ZoomEvent>> onZoomFinishedProperty()
public final void setOnSwipeUp(javafx.event.EventHandler<? super javafx.scene.input.SwipeEvent> value)
public final javafx.event.EventHandler<? super javafx.scene.input.SwipeEvent> getOnSwipeUp()
public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.SwipeEvent>> onSwipeUpProperty()
getOnSwipeUp()
,
setOnSwipeUp(EventHandler)
public final void setOnSwipeDown(javafx.event.EventHandler<? super javafx.scene.input.SwipeEvent> value)
public final javafx.event.EventHandler<? super javafx.scene.input.SwipeEvent> getOnSwipeDown()
public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.SwipeEvent>> onSwipeDownProperty()
getOnSwipeDown()
,
setOnSwipeDown(EventHandler)
public final void setOnSwipeLeft(javafx.event.EventHandler<? super javafx.scene.input.SwipeEvent> value)
public final javafx.event.EventHandler<? super javafx.scene.input.SwipeEvent> getOnSwipeLeft()
public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.SwipeEvent>> onSwipeLeftProperty()
getOnSwipeLeft()
,
setOnSwipeLeft(EventHandler)
public final void setOnSwipeRight(javafx.event.EventHandler<? super javafx.scene.input.SwipeEvent> value)
public final javafx.event.EventHandler<? super javafx.scene.input.SwipeEvent> getOnSwipeRight()
public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.SwipeEvent>> onSwipeRightProperty()
public final void setOnTouchPressed(javafx.event.EventHandler<? super javafx.scene.input.TouchEvent> value)
public final javafx.event.EventHandler<? super javafx.scene.input.TouchEvent> getOnTouchPressed()
public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.TouchEvent>> onTouchPressedProperty()
public final void setOnTouchMoved(javafx.event.EventHandler<? super javafx.scene.input.TouchEvent> value)
public final javafx.event.EventHandler<? super javafx.scene.input.TouchEvent> getOnTouchMoved()
public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.TouchEvent>> onTouchMovedProperty()
public final void setOnTouchReleased(javafx.event.EventHandler<? super javafx.scene.input.TouchEvent> value)
public final javafx.event.EventHandler<? super javafx.scene.input.TouchEvent> getOnTouchReleased()
public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.TouchEvent>> onTouchReleasedProperty()
public final void setOnTouchStationary(javafx.event.EventHandler<? super javafx.scene.input.TouchEvent> value)
public final javafx.event.EventHandler<? super javafx.scene.input.TouchEvent> getOnTouchStationary()
public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.TouchEvent>> onTouchStationaryProperty()
public final void setOnDragEntered(javafx.event.EventHandler<? super javafx.scene.input.DragEvent> value)
public final javafx.event.EventHandler<? super javafx.scene.input.DragEvent> getOnDragEntered()
public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.DragEvent>> onDragEnteredProperty()
Scene
.public final void setOnDragExited(javafx.event.EventHandler<? super javafx.scene.input.DragEvent> value)
Scene
.public final javafx.event.EventHandler<? super javafx.scene.input.DragEvent> getOnDragExited()
Scene
.public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.DragEvent>> onDragExitedProperty()
Scene
.public final void setOnDragOver(javafx.event.EventHandler<? super javafx.scene.input.DragEvent> value)
Scene
.public final javafx.event.EventHandler<? super javafx.scene.input.DragEvent> getOnDragOver()
Scene
.public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.DragEvent>> onDragOverProperty()
Scene
.getOnDragOver()
,
setOnDragOver(EventHandler)
public final void setOnDragDropped(javafx.event.EventHandler<? super javafx.scene.input.DragEvent> value)
Scene
during drag and drop gesture. Transfer of data from
the DragEvent
's dragboard
should
happen in this function.public final javafx.event.EventHandler<? super javafx.scene.input.DragEvent> getOnDragDropped()
Scene
during drag and drop gesture. Transfer of data from
the DragEvent
's dragboard
should
happen in this function.public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.DragEvent>> onDragDroppedProperty()
Scene
during drag and drop gesture. Transfer of data from
the DragEvent
's dragboard
should
happen in this function.public final void setOnDragDone(javafx.event.EventHandler<? super javafx.scene.input.DragEvent> value)
transferMode
of the
event shows what just happened at the drop target.
If transferMode
has the value MOVE
, then the source can
clear out its data. Clearing the source's data gives the appropriate
appearance to a user that the data has been moved by the drag and drop
gesture. A transferMode
that has the value NONE
indicates that no data was transferred during the drag and drop gesture.public final javafx.event.EventHandler<? super javafx.scene.input.DragEvent> getOnDragDone()
transferMode
of the
event shows what just happened at the drop target.
If transferMode
has the value MOVE
, then the source can
clear out its data. Clearing the source's data gives the appropriate
appearance to a user that the data has been moved by the drag and drop
gesture. A transferMode
that has the value NONE
indicates that no data was transferred during the drag and drop gesture.public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.DragEvent>> onDragDoneProperty()
transferMode
of the
event shows what just happened at the drop target.
If transferMode
has the value MOVE
, then the source can
clear out its data. Clearing the source's data gives the appropriate
appearance to a user that the data has been moved by the drag and drop
gesture. A transferMode
that has the value NONE
indicates that no data was transferred during the drag and drop gesture.getOnDragDone()
,
setOnDragDone(EventHandler)
public javafx.scene.input.Dragboard startDragAndDrop(javafx.scene.input.TransferMode... transferModes)
Scene
.
Can be called only from a DRAG_DETECTED event handler. The returned
Dragboard
is used to transfer data during
the drag and drop gesture. Placing this Scene
's data on the
Dragboard
also identifies this Scene
as the source of
the drag and drop gesture.
More detail about drag and drop gestures is described in the overivew
of DragEvent
.transferModes
- The supported TransferMode
(s) of this Node
Dragboard
to place this Scene
's data onjava.lang.IllegalStateException
- if drag and drop cannot be started at this
moment (it's called outside of DRAG_DETECTED
event handling).DragEvent
public void startFullDrag()
DRAG_DETECTED
mouse
event handler. More detail about dragging gestures can be found
in the overview of MouseEvent
and MouseDragEvent
.java.lang.IllegalStateException
- if the full press-drag-release gesture
cannot be started at this moment (it's called outside of
DRAG_DETECTED
event handling).MouseEvent
,
MouseDragEvent
public final void setOnKeyPressed(javafx.event.EventHandler<? super javafx.scene.input.KeyEvent> value)
Node
of this
Scene
has input focus and a key has been pressed. The function
is called only if the event hasn't been already consumed during its
capturing or bubbling phase.public final javafx.event.EventHandler<? super javafx.scene.input.KeyEvent> getOnKeyPressed()
Node
of this
Scene
has input focus and a key has been pressed. The function
is called only if the event hasn't been already consumed during its
capturing or bubbling phase.public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.KeyEvent>> onKeyPressedProperty()
Node
of this
Scene
has input focus and a key has been pressed. The function
is called only if the event hasn't been already consumed during its
capturing or bubbling phase.public final void setOnKeyReleased(javafx.event.EventHandler<? super javafx.scene.input.KeyEvent> value)
Node
of this
Scene
has input focus and a key has been released. The function
is called only if the event hasn't been already consumed during its
capturing or bubbling phase.public final javafx.event.EventHandler<? super javafx.scene.input.KeyEvent> getOnKeyReleased()
Node
of this
Scene
has input focus and a key has been released. The function
is called only if the event hasn't been already consumed during its
capturing or bubbling phase.public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.KeyEvent>> onKeyReleasedProperty()
Node
of this
Scene
has input focus and a key has been released. The function
is called only if the event hasn't been already consumed during its
capturing or bubbling phase.public final void setOnKeyTyped(javafx.event.EventHandler<? super javafx.scene.input.KeyEvent> value)
Node
of this
Scene
has input focus and a key has been typed. The function
is called only if the event hasn't been already consumed during its
capturing or bubbling phase.public final javafx.event.EventHandler<? super javafx.scene.input.KeyEvent> getOnKeyTyped()
Node
of this
Scene
has input focus and a key has been typed. The function
is called only if the event hasn't been already consumed during its
capturing or bubbling phase.public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.KeyEvent>> onKeyTypedProperty()
Node
of this
Scene
has input focus and a key has been typed. The function
is called only if the event hasn't been already consumed during its
capturing or bubbling phase.getOnKeyTyped()
,
setOnKeyTyped(EventHandler)
public final void setOnInputMethodTextChanged(javafx.event.EventHandler<? super javafx.scene.input.InputMethodEvent> value)
Node
has input focus and the input method text has changed. If this
function is not defined in this Node
, then it
receives the result string of the input method composition as a
series of onKeyTyped
function calls.
When the Node
loses the input focus, the JavaFX runtime
automatically commits the existing composed text if any.public final javafx.event.EventHandler<? super javafx.scene.input.InputMethodEvent> getOnInputMethodTextChanged()
Node
has input focus and the input method text has changed. If this
function is not defined in this Node
, then it
receives the result string of the input method composition as a
series of onKeyTyped
function calls.
When the Node
loses the input focus, the JavaFX runtime
automatically commits the existing composed text if any.public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<? super javafx.scene.input.InputMethodEvent>> onInputMethodTextChangedProperty()
Node
has input focus and the input method text has changed. If this
function is not defined in this Node
, then it
receives the result string of the input method composition as a
series of onKeyTyped
function calls.
When the Node
loses the input focus, the JavaFX runtime
automatically commits the existing composed text if any.public final void setNodeOrientation(javafx.geometry.NodeOrientation orientation)
Node orientation describes the flow of visual data within a node. In the English speaking world, visual data normally flows from left-to-right. In an Arabic or Hebrew world, visual data flows from right-to-left. This is consistent with the reading order of text in both worlds. The default value is left-to-right.
public final javafx.geometry.NodeOrientation getNodeOrientation()
Node orientation describes the flow of visual data within a node. In the English speaking world, visual data normally flows from left-to-right. In an Arabic or Hebrew world, visual data flows from right-to-left. This is consistent with the reading order of text in both worlds. The default value is left-to-right.
public final javafx.beans.property.ObjectProperty<javafx.geometry.NodeOrientation> nodeOrientationProperty()
Node orientation describes the flow of visual data within a node. In the English speaking world, visual data normally flows from left-to-right. In an Arabic or Hebrew world, visual data flows from right-to-left. This is consistent with the reading order of text in both worlds. The default value is left-to-right.
public final javafx.geometry.NodeOrientation getEffectiveNodeOrientation()
public final javafx.beans.property.ReadOnlyObjectProperty<javafx.geometry.NodeOrientation> effectiveNodeOrientationProperty()
getEffectiveNodeOrientation()
Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms.