@DefaultProperty(value="root")public classSceneextends java.lang.ObjectimplementsEventTarget
Scene
class is the container for all content in a scene graph. The background of the scene is filled as specified by thefill
property. The application must specify the rootNode
for the scene graph by setting theroot
property. If aGroup
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 (layoutRegion
orControl
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 |
---|---|
ObjectProperty<Camera> | camera Specifies the type of camera use for rendering this Scene . |
ObjectProperty<Cursor> | cursor Defines the mouse cursor for this Scene . |
ObjectProperty<EventDispatcher> | eventDispatcher Specifies the event dispatcher for this scene. |
ObjectProperty<Paint> | fill Defines the background fill of this Scene . |
ReadOnlyObjectProperty<Node> | focusOwner The scene's current focus owner node. |
ReadOnlyDoubleProperty | height The height of this Scene |
ObjectProperty<EventHandler<? superContextMenuEvent>> | onContextMenuRequested Defines a function to be called when a mouse button has been clicked (pressed and released) on this Scene . |
ObjectProperty<EventHandler<? superMouseEvent>> | onDragDetected Defines a function to be called when drag gesture has been detected. |
ObjectProperty<EventHandler<? superDragEvent>> | 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. |
ObjectProperty<EventHandler<? superDragEvent>> | onDragDropped Defines a function to be called when the mouse button is released on this Scene during drag and drop gesture. |
ObjectProperty<EventHandler<? superDragEvent>> | onDragEntered Defines a function to be called when drag gesture enters this Scene . |
ObjectProperty<EventHandler<? superDragEvent>> | onDragExited Defines a function to be called when drag gesture exits this Scene . |
ObjectProperty<EventHandler<? superDragEvent>> | onDragOver Defines a function to be called when drag gesture progresses within this Scene . |
ObjectProperty<EventHandler<? superInputMethodEvent>> | onInputMethodTextChanged Defines a function to be called when this Node has input focus and the input method text has changed. |
ObjectProperty<EventHandler<? superKeyEvent>> | onKeyPressed Defines a function to be called when some Node of thisScene has input focus and a key has been pressed. |
ObjectProperty<EventHandler<? superKeyEvent>> | onKeyReleased Defines a function to be called when some Node of thisScene has input focus and a key has been released. |
ObjectProperty<EventHandler<? superKeyEvent>> | onKeyTyped Defines a function to be called when some Node of thisScene has input focus and a key has been typed. |
ObjectProperty<EventHandler<? superMouseEvent>> | onMouseClicked Defines a function to be called when a mouse button has been clicked (pressed and released) on this Scene . |
ObjectProperty<EventHandler<? superMouseDragEvent>> | onMouseDragEntered Defines a function to be called when a full press-drag-release gesture enters this Scene . |
ObjectProperty<EventHandler<? superMouseDragEvent>> | onMouseDragExited Defines a function to be called when a full press-drag-release gesture exits this Scene . |
ObjectProperty<EventHandler<? superMouseEvent>> | onMouseDragged Defines a function to be called when a mouse button is pressed on this Scene and then dragged. |
ObjectProperty<EventHandler<? superMouseDragEvent>> | onMouseDragOver Defines a function to be called when a full press-drag-release gesture progresses within this Scene . |
ObjectProperty<EventHandler<? superMouseDragEvent>> | onMouseDragReleased Defines a function to be called when a full press-drag-release gesture ends within this Scene . |
ObjectProperty<EventHandler<? superMouseEvent>> | onMouseEntered Defines a function to be called when the mouse enters this Scene . |
ObjectProperty<EventHandler<? superMouseEvent>> | onMouseExited Defines a function to be called when the mouse exits this Scene . |
ObjectProperty<EventHandler<? superMouseEvent>> | onMouseMoved Defines a function to be called when mouse cursor moves within this Scene but no buttons have been pushed. |
ObjectProperty<EventHandler<? superMouseEvent>> | onMousePressed Defines a function to be called when a mouse button has been pressed on this Scene . |
ObjectProperty<EventHandler<? superMouseEvent>> | onMouseReleased Defines a function to be called when a mouse button has been released on this Scene . |
ObjectProperty<EventHandler<? superRotateEvent>> | onRotate Defines a function to be called when user performs a rotating action. |
ObjectProperty<EventHandler<? superRotateEvent>> | onRotationFinished Defines a function to be called when a rotating gesture ends. |
ObjectProperty<EventHandler<? superRotateEvent>> | onRotationStarted Defines a function to be called when a rotating gesture is detected. |
ObjectProperty<EventHandler<? superScrollEvent>> | onScrollFinished Defines a function to be called when a scrolling gesture ends. |
ObjectProperty<EventHandler<? superScrollEvent>> | onScroll Defines a function to be called when user performs a scrolling action. |
ObjectProperty<EventHandler<? superScrollEvent>> | onScrollStarted Defines a function to be called when a scrolling gesture is detected. |
ObjectProperty<EventHandler<? superSwipeEvent>> | onSwipeDown Defines a function to be called when an downward swipe gesture happens in this scene. |
ObjectProperty<EventHandler<? superSwipeEvent>> | onSwipeLeft Defines a function to be called when an leftward swipe gesture happens in this scene. |
ObjectProperty<EventHandler<? superSwipeEvent>> | onSwipeRight Defines a function to be called when an rightward swipe gesture happens in this scene. |
ObjectProperty<EventHandler<? superSwipeEvent>> | onSwipeUp Defines a function to be called when an upward swipe gesture happens in this scene. |
ObjectProperty<EventHandler<? superTouchEvent>> | onTouchMoved Defines a function to be called when a touch point is moved. |
ObjectProperty<EventHandler<? superTouchEvent>> | onTouchPressed Defines a function to be called when a new touch point is pressed. |
ObjectProperty<EventHandler<? superTouchEvent>> | onTouchReleased Defines a function to be called when a new touch point is pressed. |
ObjectProperty<EventHandler<? superTouchEvent>> | onTouchStationary Defines a function to be called when a touch point stays pressed and still. |
ObjectProperty<EventHandler<? superZoomEvent>> | onZoomFinished Defines a function to be called when a zooming gesture ends. |
ObjectProperty<EventHandler<? superZoomEvent>> | onZoom Defines a function to be called when user performs a zooming action. |
ObjectProperty<EventHandler<? superZoomEvent>> | onZoomStarted Defines a function to be called when a zooming gesture is detected. |
ObjectProperty<Parent> | root Defines the root Node of the scene graph. |
ReadOnlyDoubleProperty | width The width of this Scene |
ReadOnlyObjectProperty<Window> | window The Window for thisScene |
ReadOnlyDoubleProperty | x The horizontal location of this Scene on theWindow . |
ReadOnlyDoubleProperty | y The vertical location of this Scene on theWindow . |
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,Paint fill) Creates a Scene for a specific root Node with a specific size and fill. |
Scene(Parent root,Paint fill) Creates a Scene for a specific root Node with a fill. |
Modifier and Type | Method and Description |
---|---|
<T extendsEvent> | addEventFilter(EventType<T> eventType,EventHandler<? super T> eventFilter) Registers an event filter to this scene. |
<T extendsEvent> | addEventHandler(EventType<T> eventType,EventHandler<? super T> eventHandler) Registers an event handler to this scene. |
void | addMnemonic(Mnemonic m) Registers the specified mnemonic. |
EventDispatchChain | buildEventDispatchChain(EventDispatchChain tail) Construct an event dispatch chain for this scene. |
ObjectProperty<Camera> | cameraProperty() Specifies the type of camera use for rendering this Scene . |
ObjectProperty<Cursor> | cursorProperty() Defines the mouse cursor for this Scene . |
ObjectProperty<EventDispatcher> | eventDispatcherProperty() Specifies the event dispatcher for this scene. |
ObjectProperty<Paint> | fillProperty() Defines the background fill of this Scene . |
ReadOnlyObjectProperty<Node> | focusOwnerProperty() The scene's current focus owner node. |
ObservableMap<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. |
EventDispatcher | getEventDispatcher() Gets the value of the property eventDispatcher. |
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. |
ObservableMap<KeyCombination,ObservableList<Mnemonic>> | getMnemonics() Gets the list of mnemonics for this Scene . |
EventHandler<? superContextMenuEvent> | getOnContextMenuRequested() Gets the value of the property onContextMenuRequested. |
EventHandler<? superMouseEvent> | getOnDragDetected() Gets the value of the property onDragDetected. |
EventHandler<? superDragEvent> | getOnDragDone() Gets the value of the property onDragDone. |
EventHandler<? superDragEvent> | getOnDragDropped() Gets the value of the property onDragDropped. |
EventHandler<? superDragEvent> | getOnDragEntered() Gets the value of the property onDragEntered. |
EventHandler<? superDragEvent> | getOnDragExited() Gets the value of the property onDragExited. |
EventHandler<? superDragEvent> | getOnDragOver() Gets the value of the property onDragOver. |
EventHandler<? superInputMethodEvent> | getOnInputMethodTextChanged() Gets the value of the property onInputMethodTextChanged. |
EventHandler<? superKeyEvent> | getOnKeyPressed() Gets the value of the property onKeyPressed. |
EventHandler<? superKeyEvent> | getOnKeyReleased() Gets the value of the property onKeyReleased. |
EventHandler<? superKeyEvent> | getOnKeyTyped() Gets the value of the property onKeyTyped. |
EventHandler<? superMouseEvent> | getOnMouseClicked() Gets the value of the property onMouseClicked. |
EventHandler<? superMouseDragEvent> | getOnMouseDragEntered() Gets the value of the property onMouseDragEntered. |
EventHandler<? superMouseDragEvent> | getOnMouseDragExited() Gets the value of the property onMouseDragExited. |
EventHandler<? superMouseEvent> | getOnMouseDragged() Gets the value of the property onMouseDragged. |
EventHandler<? superMouseDragEvent> | getOnMouseDragOver() Gets the value of the property onMouseDragOver. |
EventHandler<? superMouseDragEvent> | getOnMouseDragReleased() Gets the value of the property onMouseDragReleased. |
EventHandler<? superMouseEvent> | getOnMouseEntered() Gets the value of the property onMouseEntered. |
EventHandler<? superMouseEvent> | getOnMouseExited() Gets the value of the property onMouseExited. |
EventHandler<? superMouseEvent> | getOnMouseMoved() Gets the value of the property onMouseMoved. |
EventHandler<? superMouseEvent> | getOnMousePressed() Gets the value of the property onMousePressed. |
EventHandler<? superMouseEvent> | getOnMouseReleased() Gets the value of the property onMouseReleased. |
EventHandler<? superRotateEvent> | getOnRotate() Gets the value of the property onRotate. |
EventHandler<? superRotateEvent> | getOnRotationFinished() Gets the value of the property onRotationFinished. |
EventHandler<? superRotateEvent> | getOnRotationStarted() Gets the value of the property onRotationStarted. |
EventHandler<? superScrollEvent> | getOnScroll() Gets the value of the property onScroll. |
EventHandler<? superScrollEvent> | getOnScrollFinished() Gets the value of the property onScrollFinished. |
EventHandler<? superScrollEvent> | getOnScrollStarted() Gets the value of the property onScrollStarted. |
EventHandler<? superSwipeEvent> | getOnSwipeDown() Gets the value of the property onSwipeDown. |
EventHandler<? superSwipeEvent> | getOnSwipeLeft() Gets the value of the property onSwipeLeft. |
EventHandler<? superSwipeEvent> | getOnSwipeRight() Gets the value of the property onSwipeRight. |
EventHandler<? superSwipeEvent> | getOnSwipeUp() Gets the value of the property onSwipeUp. |
EventHandler<? superTouchEvent> | getOnTouchMoved() Gets the value of the property onTouchMoved. |
EventHandler<? superTouchEvent> | getOnTouchPressed() Gets the value of the property onTouchPressed. |
EventHandler<? superTouchEvent> | getOnTouchReleased() Gets the value of the property onTouchReleased. |
EventHandler<? superTouchEvent> | getOnTouchStationary() Gets the value of the property onTouchStationary. |
EventHandler<? superZoomEvent> | getOnZoom() Gets the value of the property onZoom. |
EventHandler<? superZoomEvent> | getOnZoomFinished() Gets the value of the property onZoomFinished. |
EventHandler<? superZoomEvent> | getOnZoomStarted() Gets the value of the property onZoomStarted. |
Parent | getRoot() Gets the value of the property root. |
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. |
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. |
ReadOnlyDoubleProperty | heightProperty() The height of this Scene |
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. |
ObjectProperty<EventHandler<? superContextMenuEvent>> | onContextMenuRequestedProperty() Defines a function to be called when a mouse button has been clicked (pressed and released) on this Scene . |
ObjectProperty<EventHandler<? superMouseEvent>> | onDragDetectedProperty() Defines a function to be called when drag gesture has been detected. |
ObjectProperty<EventHandler<? superDragEvent>> | 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. |
ObjectProperty<EventHandler<? superDragEvent>> | onDragDroppedProperty() Defines a function to be called when the mouse button is released on this Scene during drag and drop gesture. |
ObjectProperty<EventHandler<? superDragEvent>> | onDragEnteredProperty() Defines a function to be called when drag gesture enters this Scene . |
ObjectProperty<EventHandler<? superDragEvent>> | onDragExitedProperty() Defines a function to be called when drag gesture exits this Scene . |
ObjectProperty<EventHandler<? superDragEvent>> | onDragOverProperty() Defines a function to be called when drag gesture progresses within this Scene . |
ObjectProperty<EventHandler<? superInputMethodEvent>> | onInputMethodTextChangedProperty() Defines a function to be called when this Node has input focus and the input method text has changed. |
ObjectProperty<EventHandler<? superKeyEvent>> | onKeyPressedProperty() Defines a function to be called when some Node of thisScene has input focus and a key has been pressed. |
ObjectProperty<EventHandler<? superKeyEvent>> | onKeyReleasedProperty() Defines a function to be called when some Node of thisScene has input focus and a key has been released. |
ObjectProperty<EventHandler<? superKeyEvent>> | onKeyTypedProperty() Defines a function to be called when some Node of thisScene has input focus and a key has been typed. |
ObjectProperty<EventHandler<? superMouseEvent>> | onMouseClickedProperty() Defines a function to be called when a mouse button has been clicked (pressed and released) on this Scene . |
ObjectProperty<EventHandler<? superMouseDragEvent>> | onMouseDragEnteredProperty() Defines a function to be called when a full press-drag-release gesture enters this Scene . |
ObjectProperty<EventHandler<? superMouseDragEvent>> | onMouseDragExitedProperty() Defines a function to be called when a full press-drag-release gesture exits this Scene . |
ObjectProperty<EventHandler<? superMouseEvent>> | onMouseDraggedProperty() Defines a function to be called when a mouse button is pressed on this Scene and then dragged. |
ObjectProperty<EventHandler<? superMouseDragEvent>> | onMouseDragOverProperty() Defines a function to be called when a full press-drag-release gesture progresses within this Scene . |
ObjectProperty<EventHandler<? superMouseDragEvent>> | onMouseDragReleasedProperty() Defines a function to be called when a full press-drag-release gesture ends within this Scene . |
ObjectProperty<EventHandler<? superMouseEvent>> | onMouseEnteredProperty() Defines a function to be called when the mouse enters this Scene . |
ObjectProperty<EventHandler<? superMouseEvent>> | onMouseExitedProperty() Defines a function to be called when the mouse exits this Scene . |
ObjectProperty<EventHandler<? superMouseEvent>> | onMouseMovedProperty() Defines a function to be called when mouse cursor moves within this Scene but no buttons have been pushed. |
ObjectProperty<EventHandler<? superMouseEvent>> | onMousePressedProperty() Defines a function to be called when a mouse button has been pressed on this Scene . |
ObjectProperty<EventHandler<? superMouseEvent>> | onMouseReleasedProperty() Defines a function to be called when a mouse button has been released on this Scene . |
ObjectProperty<EventHandler<? superRotateEvent>> | onRotateProperty() Defines a function to be called when user performs a rotating action. |
ObjectProperty<EventHandler<? superRotateEvent>> | onRotationFinishedProperty() Defines a function to be called when a rotating gesture ends. |
ObjectProperty<EventHandler<? superRotateEvent>> | onRotationStartedProperty() Defines a function to be called when a rotating gesture is detected. |
ObjectProperty<EventHandler<? superScrollEvent>> | onScrollFinishedProperty() Defines a function to be called when a scrolling gesture ends. |
ObjectProperty<EventHandler<? superScrollEvent>> | onScrollProperty() Defines a function to be called when user performs a scrolling action. |
ObjectProperty<EventHandler<? superScrollEvent>> | onScrollStartedProperty() Defines a function to be called when a scrolling gesture is detected. |
ObjectProperty<EventHandler<? superSwipeEvent>> | onSwipeDownProperty() Defines a function to be called when an downward swipe gesture happens in this scene. |
ObjectProperty<EventHandler<? superSwipeEvent>> | onSwipeLeftProperty() Defines a function to be called when an leftward swipe gesture happens in this scene. |
ObjectProperty<EventHandler<? superSwipeEvent>> | onSwipeRightProperty() Defines a function to be called when an rightward swipe gesture happens in this scene. |
ObjectProperty<EventHandler<? superSwipeEvent>> | onSwipeUpProperty() Defines a function to be called when an upward swipe gesture happens in this scene. |
ObjectProperty<EventHandler<? superTouchEvent>> | onTouchMovedProperty() Defines a function to be called when a touch point is moved. |
ObjectProperty<EventHandler<? superTouchEvent>> | onTouchPressedProperty() Defines a function to be called when a new touch point is pressed. |
ObjectProperty<EventHandler<? superTouchEvent>> | onTouchReleasedProperty() Defines a function to be called when a new touch point is pressed. |
ObjectProperty<EventHandler<? superTouchEvent>> | onTouchStationaryProperty() Defines a function to be called when a touch point stays pressed and still. |
ObjectProperty<EventHandler<? superZoomEvent>> | onZoomFinishedProperty() Defines a function to be called when a zooming gesture ends. |
ObjectProperty<EventHandler<? superZoomEvent>> | onZoomProperty() Defines a function to be called when user performs a zooming action. |
ObjectProperty<EventHandler<? superZoomEvent>> | onZoomStartedProperty() Defines a function to be called when a zooming gesture is detected. |
<T extendsEvent> | removeEventFilter(EventType<T> eventType,EventHandler<? super T> eventFilter) Unregisters a previously registered event filter from this scene. |
<T extendsEvent> | removeEventHandler(EventType<T> eventType,EventHandler<? super T> eventHandler) Unregisters a previously registered event handler from this scene. |
void | removeMnemonic(Mnemonic m) Unregisters the specified mnemonic. |
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(EventDispatcher value) Sets the value of the property eventDispatcher. |
protected <T extendsEvent> | setEventHandler(EventType<T> eventType,EventHandler<? super T> eventHandler) Sets the handler to use for this event type. |
void | setFill(Paint value) Sets the value of the property fill. |
void | setOnContextMenuRequested(EventHandler<? superContextMenuEvent> value) Sets the value of the property onContextMenuRequested. |
void | setOnDragDetected(EventHandler<? superMouseEvent> value) Sets the value of the property onDragDetected. |
void | setOnDragDone(EventHandler<? superDragEvent> value) Sets the value of the property onDragDone. |
void | setOnDragDropped(EventHandler<? superDragEvent> value) Sets the value of the property onDragDropped. |
void | setOnDragEntered(EventHandler<? superDragEvent> value) Sets the value of the property onDragEntered. |
void | setOnDragExited(EventHandler<? superDragEvent> value) Sets the value of the property onDragExited. |
void | setOnDragOver(EventHandler<? superDragEvent> value) Sets the value of the property onDragOver. |
void | setOnInputMethodTextChanged(EventHandler<? superInputMethodEvent> value) Sets the value of the property onInputMethodTextChanged. |
void | setOnKeyPressed(EventHandler<? superKeyEvent> value) Sets the value of the property onKeyPressed. |
void | setOnKeyReleased(EventHandler<? superKeyEvent> value) Sets the value of the property onKeyReleased. |
void | setOnKeyTyped(EventHandler<? superKeyEvent> value) Sets the value of the property onKeyTyped. |
void | setOnMouseClicked(EventHandler<? superMouseEvent> value) Sets the value of the property onMouseClicked. |
void | setOnMouseDragEntered(EventHandler<? superMouseDragEvent> value) Sets the value of the property onMouseDragEntered. |
void | setOnMouseDragExited(EventHandler<? superMouseDragEvent> value) Sets the value of the property onMouseDragExited. |
void | setOnMouseDragged(EventHandler<? superMouseEvent> value) Sets the value of the property onMouseDragged. |
void | setOnMouseDragOver(EventHandler<? superMouseDragEvent> value) Sets the value of the property onMouseDragOver. |
void | setOnMouseDragReleased(EventHandler<? superMouseDragEvent> value) Sets the value of the property onMouseDragReleased. |
void | setOnMouseEntered(EventHandler<? superMouseEvent> value) Sets the value of the property onMouseEntered. |
void | setOnMouseExited(EventHandler<? superMouseEvent> value) Sets the value of the property onMouseExited. |
void | setOnMouseMoved(EventHandler<? superMouseEvent> value) Sets the value of the property onMouseMoved. |
void | setOnMousePressed(EventHandler<? superMouseEvent> value) Sets the value of the property onMousePressed. |
void | setOnMouseReleased(EventHandler<? superMouseEvent> value) Sets the value of the property onMouseReleased. |
void | setOnRotate(EventHandler<? superRotateEvent> value) Sets the value of the property onRotate. |
void | setOnRotationFinished(EventHandler<? superRotateEvent> value) Sets the value of the property onRotationFinished. |
void | setOnRotationStarted(EventHandler<? superRotateEvent> value) Sets the value of the property onRotationStarted. |
void | setOnScroll(EventHandler<? superScrollEvent> value) Sets the value of the property onScroll. |
void | setOnScrollFinished(EventHandler<? superScrollEvent> value) Sets the value of the property onScrollFinished. |
void | setOnScrollStarted(EventHandler<? superScrollEvent> value) Sets the value of the property onScrollStarted. |
void | setOnSwipeDown(EventHandler<? superSwipeEvent> value) Sets the value of the property onSwipeDown. |
void | setOnSwipeLeft(EventHandler<? superSwipeEvent> value) Sets the value of the property onSwipeLeft. |
void | setOnSwipeRight(EventHandler<? superSwipeEvent> value) Sets the value of the property onSwipeRight. |
void | setOnSwipeUp(EventHandler<? superSwipeEvent> value) Sets the value of the property onSwipeUp. |
void | setOnTouchMoved(EventHandler<? superTouchEvent> value) Sets the value of the property onTouchMoved. |
void | setOnTouchPressed(EventHandler<? superTouchEvent> value) Sets the value of the property onTouchPressed. |
void | setOnTouchReleased(EventHandler<? superTouchEvent> value) Sets the value of the property onTouchReleased. |
void | setOnTouchStationary(EventHandler<? superTouchEvent> value) Sets the value of the property onTouchStationary. |
void | setOnZoom(EventHandler<? superZoomEvent> value) Sets the value of the property onZoom. |
void | setOnZoomFinished(EventHandler<? superZoomEvent> value) Sets the value of the property onZoomFinished. |
void | setOnZoomStarted(EventHandler<? superZoomEvent> value) Sets the value of the property onZoomStarted. |
void | setRoot(Parent value) Sets the value of the property root. |
void | snapshot(Callback<SnapshotResult,java.lang.Void> callback,WritableImage image) Takes a snapshot of this scene at the next frame and calls the specified callback method when the image is ready. |
WritableImage | snapshot(WritableImage image) Takes a snapshot of this scene and returns the rendered image when it is ready. |
Dragboard | startDragAndDrop(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. |
ReadOnlyDoubleProperty | widthProperty() The width of this Scene |
ReadOnlyObjectProperty<Window> | windowProperty() The Window for thisScene |
ReadOnlyDoubleProperty | xProperty() The horizontal location of this Scene on theWindow . |
ReadOnlyDoubleProperty | yProperty() The vertical location of this Scene on theWindow . |
public final ReadOnlyObjectProperty<Window> windowProperty
Window
for thisScene
getWindow()
public final ReadOnlyDoubleProperty xProperty
Scene
on theWindow
.getX()
public final ReadOnlyDoubleProperty yProperty
Scene
on theWindow
.getY()
public final ReadOnlyDoubleProperty widthProperty
Scene
getWidth()
public final ReadOnlyDoubleProperty heightProperty
Scene
getHeight()
public final ObjectProperty<Camera> cameraProperty
Scene
. Ifcamera
is null, a parallel camera is used for rendering. Note: this is a conditional feature. SeeConditionalFeature.SCENE3D
for more information.
getCamera()
,setCamera(Camera)
public final ObjectProperty<Paint> fillProperty
Scene
. Both anull
value meaning paint no background and aPaint
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 ObjectProperty<Parent> rootProperty
Node
of the scene graph. If aGroup
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 (layoutRegion
orControl
) 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 ObjectProperty<Cursor> cursorProperty
Scene
.getCursor()
,setCursor(Cursor)
public final ReadOnlyObjectProperty<Node> focusOwnerProperty
getFocusOwner()
public final ObjectProperty<EventDispatcher> eventDispatcherProperty
EventDispatcher
, the new dispatcher should forward events to the replaced dispatcher to keep the scene's default event handling behavior.public final ObjectProperty<EventHandler<? superContextMenuEvent>> onContextMenuRequestedProperty
Scene
.public final ObjectProperty<EventHandler<? superMouseEvent>> onMouseClickedProperty
Scene
.public final ObjectProperty<EventHandler<? superMouseEvent>> onMouseDraggedProperty
Scene
and then dragged.public final ObjectProperty<EventHandler<? superMouseEvent>> onMouseEnteredProperty
Scene
.public final ObjectProperty<EventHandler<? superMouseEvent>> onMouseExitedProperty
Scene
.public final ObjectProperty<EventHandler<? superMouseEvent>> onMouseMovedProperty
Scene
but no buttons have been pushed.public final ObjectProperty<EventHandler<? superMouseEvent>> onMousePressedProperty
Scene
.public final ObjectProperty<EventHandler<? superMouseEvent>> onMouseReleasedProperty
Scene
.public final ObjectProperty<EventHandler<? superMouseEvent>> onDragDetectedProperty
public final ObjectProperty<EventHandler<? superMouseDragEvent>> onMouseDragOverProperty
Scene
.public final ObjectProperty<EventHandler<? superMouseDragEvent>> onMouseDragReleasedProperty
Scene
.public final ObjectProperty<EventHandler<? superMouseDragEvent>> onMouseDragEnteredProperty
Scene
.public final ObjectProperty<EventHandler<? superMouseDragEvent>> onMouseDragExitedProperty
Scene
.public final ObjectProperty<EventHandler<? superScrollEvent>> onScrollStartedProperty
public final ObjectProperty<EventHandler<? superScrollEvent>> onScrollProperty
getOnScroll()
,setOnScroll(EventHandler)
public final ObjectProperty<EventHandler<? superScrollEvent>> onScrollFinishedProperty
public final ObjectProperty<EventHandler<? superRotateEvent>> onRotationStartedProperty
public final ObjectProperty<EventHandler<? superRotateEvent>> onRotateProperty
getOnRotate()
,setOnRotate(EventHandler)
public final ObjectProperty<EventHandler<? superRotateEvent>> onRotationFinishedProperty
public final ObjectProperty<EventHandler<? superZoomEvent>> onZoomStartedProperty
public final ObjectProperty<EventHandler<? superZoomEvent>> onZoomProperty
getOnZoom()
,setOnZoom(EventHandler)
public final ObjectProperty<EventHandler<? superZoomEvent>> onZoomFinishedProperty
public final ObjectProperty<EventHandler<? superSwipeEvent>> onSwipeUpProperty
getOnSwipeUp()
,setOnSwipeUp(EventHandler)
public final ObjectProperty<EventHandler<? superSwipeEvent>> onSwipeDownProperty
public final ObjectProperty<EventHandler<? superSwipeEvent>> onSwipeLeftProperty
public final ObjectProperty<EventHandler<? superSwipeEvent>> onSwipeRightProperty
public final ObjectProperty<EventHandler<? superTouchEvent>> onTouchPressedProperty
public final ObjectProperty<EventHandler<? superTouchEvent>> onTouchMovedProperty
public final ObjectProperty<EventHandler<? superTouchEvent>> onTouchReleasedProperty
public final ObjectProperty<EventHandler<? superTouchEvent>> onTouchStationaryProperty
public final ObjectProperty<EventHandler<? superDragEvent>> onDragEnteredProperty
Scene
.public final ObjectProperty<EventHandler<? superDragEvent>> onDragExitedProperty
Scene
.public final ObjectProperty<EventHandler<? superDragEvent>> onDragOverProperty
Scene
.public final ObjectProperty<EventHandler<? superDragEvent>> onDragDroppedProperty
public final ObjectProperty<EventHandler<? superDragEvent>> onDragDoneProperty
transferMode
of the event shows what just happened at the drop target. IftransferMode
has the valueMOVE
, 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. AtransferMode
that has the valueNONE
indicates that no data was transferred during the drag and drop gesture.public final ObjectProperty<EventHandler<? superKeyEvent>> onKeyPressedProperty
Node
of thisScene
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 ObjectProperty<EventHandler<? superKeyEvent>> onKeyReleasedProperty
Node
of thisScene
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 ObjectProperty<EventHandler<? superKeyEvent>> onKeyTypedProperty
Node
of thisScene
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 ObjectProperty<EventHandler<? superInputMethodEvent>> onInputMethodTextChangedProperty
Node
has input focus and the input method text has changed. If this function is not defined in thisNode
, then it receives the result string of the input method composition as a series ofonKeyTyped
function calls. When theNode
loses the input focus, the JavaFX runtime automatically commits the existing composed text if any.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,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,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. SeeConditionalFeature.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 final Window getWindow()
Window
for thisScene
public final ReadOnlyObjectProperty<Window> windowProperty()
Window
for thisScene
getWindow()
public final double getX()
Scene
on theWindow
.public final ReadOnlyDoubleProperty xProperty()
Scene
on theWindow
.getX()
public final double getY()
Scene
on theWindow
.public final ReadOnlyDoubleProperty yProperty()
Scene
on theWindow
.getY()
public final double getWidth()
Scene
public final ReadOnlyDoubleProperty widthProperty()
Scene
getWidth()
public final double getHeight()
Scene
public final ReadOnlyDoubleProperty heightProperty()
Scene
getHeight()
public final void setCamera(Camera value)
Scene
. Ifcamera
is null, a parallel camera is used for rendering. Note: this is a conditional feature. SeeConditionalFeature.SCENE3D
for more information.
public final Camera getCamera()
Scene
. Ifcamera
is null, a parallel camera is used for rendering. Note: this is a conditional feature. SeeConditionalFeature.SCENE3D
for more information.
public final ObjectProperty<Camera> cameraProperty()
Scene
. Ifcamera
is null, a parallel camera is used for rendering. Note: this is a conditional feature. SeeConditionalFeature.SCENE3D
for more information.
getCamera()
,setCamera(Camera)
public final void setFill(Paint value)
Scene
. Both anull
value meaning paint no background and aPaint
with transparency are supported, but what is painted behind it will depend on the platform. The default value is the color white.public final Paint getFill()
Scene
. Both anull
value meaning paint no background and aPaint
with transparency are supported, but what is painted behind it will depend on the platform. The default value is the color white.public final ObjectProperty<Paint> fillProperty()
Scene
. Both anull
value meaning paint no background and aPaint
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 aGroup
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 (layoutRegion
orControl
) 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 aGroup
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 (layoutRegion
orControl
) 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 ObjectProperty<Parent> rootProperty()
Node
of the scene graph. If aGroup
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 (layoutRegion
orControl
) 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 WritableImage snapshot(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(Callback<SnapshotResult,java.lang.Void> callback,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 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 CSSselector
, ornull
if none is found.public final ObservableList<java.lang.String> getStylesheets()
public final boolean isDepthBuffer()
public final Node getFocusOwner()
public final ReadOnlyObjectProperty<Node> focusOwnerProperty()
getFocusOwner()
public final void setEventDispatcher(EventDispatcher value)
EventDispatcher
, the new dispatcher should forward events to the replaced dispatcher to keep the scene's default event handling behavior.public final EventDispatcher getEventDispatcher()
EventDispatcher
, the new dispatcher should forward events to the replaced dispatcher to keep the scene's default event handling behavior.public final ObjectProperty<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 extendsEvent> void addEventHandler(EventType<T> eventType,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 extendsEvent> void removeEventHandler(EventType<T> eventType,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 extendsEvent> void addEventFilter(EventType<T> eventType,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 extendsEvent> void removeEventFilter(EventType<T> eventType,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 extendsEvent> void setEventHandler(EventType<T> eventType,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(Mnemonic m)
m
- The mnemonicpublic void removeMnemonic(Mnemonic m)
m
- The mnemonicpublic ObservableMap<KeyCombination,ObservableList<Mnemonic>> getMnemonics()
Scene
.public ObservableMap<KeyCombination,java.lang.Runnable> getAccelerators()
Scene
.public EventDispatchChain buildEventDispatchChain(EventDispatchChain tail)
buildEventDispatchChain
in interface EventTarget
tail
- the initial chain to build frompublic final void setOnContextMenuRequested(EventHandler<? superContextMenuEvent> value)
Scene
.public final EventHandler<? superContextMenuEvent> getOnContextMenuRequested()
Scene
.public final ObjectProperty<EventHandler<? superContextMenuEvent>> onContextMenuRequestedProperty()
Scene
.public final void setOnMouseClicked(EventHandler<? superMouseEvent> value)
Scene
.public final EventHandler<? superMouseEvent> getOnMouseClicked()
Scene
.public final ObjectProperty<EventHandler<? superMouseEvent>> onMouseClickedProperty()
Scene
.public final void setOnMouseDragged(EventHandler<? superMouseEvent> value)
Scene
and then dragged.public final EventHandler<? superMouseEvent> getOnMouseDragged()
Scene
and then dragged.public final ObjectProperty<EventHandler<? superMouseEvent>> onMouseDraggedProperty()
Scene
and then dragged.public final void setOnMouseEntered(EventHandler<? superMouseEvent> value)
Scene
.public final EventHandler<? superMouseEvent> getOnMouseEntered()
Scene
.public final ObjectProperty<EventHandler<? superMouseEvent>> onMouseEnteredProperty()
Scene
.public final void setOnMouseExited(EventHandler<? superMouseEvent> value)
Scene
.public final EventHandler<? superMouseEvent> getOnMouseExited()
Scene
.public final ObjectProperty<EventHandler<? superMouseEvent>> onMouseExitedProperty()
Scene
.public final void setOnMouseMoved(EventHandler<? superMouseEvent> value)
Scene
but no buttons have been pushed.public final EventHandler<? superMouseEvent> getOnMouseMoved()
Scene
but no buttons have been pushed.public final ObjectProperty<EventHandler<? superMouseEvent>> onMouseMovedProperty()
Scene
but no buttons have been pushed.public final void setOnMousePressed(EventHandler<? superMouseEvent> value)
Scene
.public final EventHandler<? superMouseEvent> getOnMousePressed()
Scene
.public final ObjectProperty<EventHandler<? superMouseEvent>> onMousePressedProperty()
Scene
.public final void setOnMouseReleased(EventHandler<? superMouseEvent> value)
Scene
.public final EventHandler<? superMouseEvent> getOnMouseReleased()
Scene
.public final ObjectProperty<EventHandler<? superMouseEvent>> onMouseReleasedProperty()
Scene
.public final void setOnDragDetected(EventHandler<? superMouseEvent> value)
public final EventHandler<? superMouseEvent> getOnDragDetected()
public final ObjectProperty<EventHandler<? superMouseEvent>> onDragDetectedProperty()
public final void setOnMouseDragOver(EventHandler<? superMouseDragEvent> value)
Scene
.public final EventHandler<? superMouseDragEvent> getOnMouseDragOver()
Scene
.public final ObjectProperty<EventHandler<? superMouseDragEvent>> onMouseDragOverProperty()
Scene
.public final void setOnMouseDragReleased(EventHandler<? superMouseDragEvent> value)
Scene
.public final EventHandler<? superMouseDragEvent> getOnMouseDragReleased()
Scene
.public final ObjectProperty<EventHandler<? superMouseDragEvent>> onMouseDragReleasedProperty()
Scene
.public final void setOnMouseDragEntered(EventHandler<? superMouseDragEvent> value)
Scene
.public final EventHandler<? superMouseDragEvent> getOnMouseDragEntered()
Scene
.public final ObjectProperty<EventHandler<? superMouseDragEvent>> onMouseDragEnteredProperty()
Scene
.public final void setOnMouseDragExited(EventHandler<? superMouseDragEvent> value)
Scene
.public final EventHandler<? superMouseDragEvent> getOnMouseDragExited()
Scene
.public final ObjectProperty<EventHandler<? superMouseDragEvent>> onMouseDragExitedProperty()
Scene
.public final void setOnScrollStarted(EventHandler<? superScrollEvent> value)
public final EventHandler<? superScrollEvent> getOnScrollStarted()
public final ObjectProperty<EventHandler<? superScrollEvent>> onScrollStartedProperty()
public final void setOnScroll(EventHandler<? superScrollEvent> value)
public final EventHandler<? superScrollEvent> getOnScroll()
public final ObjectProperty<EventHandler<? superScrollEvent>> onScrollProperty()
getOnScroll()
,setOnScroll(EventHandler)
public final void setOnScrollFinished(EventHandler<? superScrollEvent> value)
public final EventHandler<? superScrollEvent> getOnScrollFinished()
public final ObjectProperty<EventHandler<? superScrollEvent>> onScrollFinishedProperty()
public final void setOnRotationStarted(EventHandler<? superRotateEvent> value)
public final EventHandler<? superRotateEvent> getOnRotationStarted()
public final ObjectProperty<EventHandler<? superRotateEvent>> onRotationStartedProperty()
public final void setOnRotate(EventHandler<? superRotateEvent> value)
public final EventHandler<? superRotateEvent> getOnRotate()
public final ObjectProperty<EventHandler<? superRotateEvent>> onRotateProperty()
getOnRotate()
,setOnRotate(EventHandler)
public final void setOnRotationFinished(EventHandler<? superRotateEvent> value)
public final EventHandler<? superRotateEvent> getOnRotationFinished()
public final ObjectProperty<EventHandler<? superRotateEvent>> onRotationFinishedProperty()
public final void setOnZoomStarted(EventHandler<? superZoomEvent> value)
public final EventHandler<? superZoomEvent> getOnZoomStarted()
public final ObjectProperty<EventHandler<? superZoomEvent>> onZoomStartedProperty()
public final void setOnZoom(EventHandler<? superZoomEvent> value)
public final EventHandler<? superZoomEvent> getOnZoom()
public final ObjectProperty<EventHandler<? superZoomEvent>> onZoomProperty()
getOnZoom()
,setOnZoom(EventHandler)
public final void setOnZoomFinished(EventHandler<? superZoomEvent> value)
public final EventHandler<? superZoomEvent> getOnZoomFinished()
public final ObjectProperty<EventHandler<? superZoomEvent>> onZoomFinishedProperty()
public final void setOnSwipeUp(EventHandler<? superSwipeEvent> value)
public final EventHandler<? superSwipeEvent> getOnSwipeUp()
public final ObjectProperty<EventHandler<? superSwipeEvent>> onSwipeUpProperty()
getOnSwipeUp()
,setOnSwipeUp(EventHandler)
public final void setOnSwipeDown(EventHandler<? superSwipeEvent> value)
public final EventHandler<? superSwipeEvent> getOnSwipeDown()
public final ObjectProperty<EventHandler<? superSwipeEvent>> onSwipeDownProperty()
public final void setOnSwipeLeft(EventHandler<? superSwipeEvent> value)
public final EventHandler<? superSwipeEvent> getOnSwipeLeft()
public final ObjectProperty<EventHandler<? superSwipeEvent>> onSwipeLeftProperty()
public final void setOnSwipeRight(EventHandler<? superSwipeEvent> value)
public final EventHandler<? superSwipeEvent> getOnSwipeRight()
public final ObjectProperty<EventHandler<? superSwipeEvent>> onSwipeRightProperty()
public final void setOnTouchPressed(EventHandler<? superTouchEvent> value)
public final EventHandler<? superTouchEvent> getOnTouchPressed()
public final ObjectProperty<EventHandler<? superTouchEvent>> onTouchPressedProperty()
public final void setOnTouchMoved(EventHandler<? superTouchEvent> value)
public final EventHandler<? superTouchEvent> getOnTouchMoved()
public final ObjectProperty<EventHandler<? superTouchEvent>> onTouchMovedProperty()
public final void setOnTouchReleased(EventHandler<? superTouchEvent> value)
public final EventHandler<? superTouchEvent> getOnTouchReleased()
public final ObjectProperty<EventHandler<? superTouchEvent>> onTouchReleasedProperty()
public final void setOnTouchStationary(EventHandler<? superTouchEvent> value)
public final EventHandler<? superTouchEvent> getOnTouchStationary()
public final ObjectProperty<EventHandler<? superTouchEvent>> onTouchStationaryProperty()
public final void setOnDragEntered(EventHandler<? superDragEvent> value)
Scene
.public final EventHandler<? superDragEvent> getOnDragEntered()
Scene
.public final ObjectProperty<EventHandler<? superDragEvent>> onDragEnteredProperty()
Scene
.public final void setOnDragExited(EventHandler<? superDragEvent> value)
Scene
.public final EventHandler<? superDragEvent> getOnDragExited()
Scene
.public final ObjectProperty<EventHandler<? superDragEvent>> onDragExitedProperty()
Scene
.public final void setOnDragOver(EventHandler<? superDragEvent> value)
Scene
.public final EventHandler<? superDragEvent> getOnDragOver()
Scene
.public final ObjectProperty<EventHandler<? superDragEvent>> onDragOverProperty()
Scene
.public final void setOnDragDropped(EventHandler<? superDragEvent> value)
public final EventHandler<? superDragEvent> getOnDragDropped()
public final ObjectProperty<EventHandler<? superDragEvent>> onDragDroppedProperty()
public final void setOnDragDone(EventHandler<? superDragEvent> value)
transferMode
of the event shows what just happened at the drop target. IftransferMode
has the valueMOVE
, 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. AtransferMode
that has the valueNONE
indicates that no data was transferred during the drag and drop gesture.public final EventHandler<? superDragEvent> getOnDragDone()
transferMode
of the event shows what just happened at the drop target. IftransferMode
has the valueMOVE
, 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. AtransferMode
that has the valueNONE
indicates that no data was transferred during the drag and drop gesture.public final ObjectProperty<EventHandler<? superDragEvent>> onDragDoneProperty()
transferMode
of the event shows what just happened at the drop target. IftransferMode
has the valueMOVE
, 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. AtransferMode
that has the valueNONE
indicates that no data was transferred during the drag and drop gesture.public Dragboard startDragAndDrop(TransferMode... transferModes)
Scene
. Can be called only from a DRAG_DETECTED event handler. The returnedDragboard
is used to transfer data during the drag and drop gesture. Placing thisScene
's data on theDragboard
also identifies thisScene
as the source of the drag and drop gesture. More detail about drag and drop gestures is described in the overivew ofDragEvent
.transferModes
- The supportedTransferMode
(s) of thisNode
Dragboard
to place thisScene
's data onjava.lang.IllegalStateException
- if drag and drop cannot be started at this moment (it's called outside ofDRAG_DETECTED
event handling).DragEvent
public void startFullDrag()
DRAG_DETECTED
mouse event handler. More detail about dragging gestures can be found in the overview ofMouseEvent
andMouseDragEvent
.java.lang.IllegalStateException
- if the full press-drag-release gesture cannot be started at this moment (it's called outside ofDRAG_DETECTED
event handling).MouseEvent
,MouseDragEvent
public final void setOnKeyPressed(EventHandler<? superKeyEvent> value)
Node
of thisScene
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 EventHandler<? superKeyEvent> getOnKeyPressed()
Node
of thisScene
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 ObjectProperty<EventHandler<? superKeyEvent>> onKeyPressedProperty()
Node
of thisScene
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(EventHandler<? superKeyEvent> value)
Node
of thisScene
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 EventHandler<? superKeyEvent> getOnKeyReleased()
Node
of thisScene
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 ObjectProperty<EventHandler<? superKeyEvent>> onKeyReleasedProperty()
Node
of thisScene
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(EventHandler<? superKeyEvent> value)
Node
of thisScene
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 EventHandler<? superKeyEvent> getOnKeyTyped()
Node
of thisScene
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 ObjectProperty<EventHandler<? superKeyEvent>> onKeyTypedProperty()
Node
of thisScene
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 void setOnInputMethodTextChanged(EventHandler<? superInputMethodEvent> value)
Node
has input focus and the input method text has changed. If this function is not defined in thisNode
, then it receives the result string of the input method composition as a series ofonKeyTyped
function calls. When theNode
loses the input focus, the JavaFX runtime automatically commits the existing composed text if any.public final EventHandler<? superInputMethodEvent> getOnInputMethodTextChanged()
Node
has input focus and the input method text has changed. If this function is not defined in thisNode
, then it receives the result string of the input method composition as a series ofonKeyTyped
function calls. When theNode
loses the input focus, the JavaFX runtime automatically commits the existing composed text if any.public final ObjectProperty<EventHandler<? superInputMethodEvent>> onInputMethodTextChangedProperty()
Node
has input focus and the input method text has changed. If this function is not defined in thisNode
, then it receives the result string of the input method composition as a series ofonKeyTyped
function calls. When theNode
loses the input focus, the JavaFX runtime automatically commits the existing composed text if any.Copyright (c) 2008, 2014, Oracle and/or its affiliates. All rights reserved.