Spec-Zone .ru
спецификации, руководства, описания, API
|
@DefaultProperty(value="root") public class Scene extends java.lang.Object implements 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 |
---|---|
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<? super ContextMenuEvent>> |
onContextMenuRequested
Defines a function to be called when a mouse button has been clicked
(pressed and released) on this
Scene . |
ObjectProperty<EventHandler<? super MouseEvent>> |
onDragDetected
Defines a function to be called when drag gesture has been
detected.
|
ObjectProperty<EventHandler<? super 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.
|
ObjectProperty<EventHandler<? super DragEvent>> |
onDragDropped
Defines a function to be called when the mouse button is released
on this
Scene during drag and drop gesture. |
ObjectProperty<EventHandler<? super DragEvent>> |
onDragEntered
Defines a function to be called when drag gesture
enters this
Scene . |
ObjectProperty<EventHandler<? super DragEvent>> |
onDragExited
Defines a function to be called when drag gesture
exits this
Scene . |
ObjectProperty<EventHandler<? super DragEvent>> |
onDragOver
Defines a function to be called when drag gesture progresses
within this
Scene . |
ObjectProperty<EventHandler<? super InputMethodEvent>> |
onInputMethodTextChanged
Defines a function to be called when this
Node
has input focus and the input method text has changed. |
ObjectProperty<EventHandler<? super KeyEvent>> |
onKeyPressed
Defines a function to be called when some
Node of this
Scene has input focus and a key has been pressed. |
ObjectProperty<EventHandler<? super KeyEvent>> |
onKeyReleased
Defines a function to be called when some
Node of this
Scene has input focus and a key has been released. |
ObjectProperty<EventHandler<? super KeyEvent>> |
onKeyTyped
Defines a function to be called when some
Node of this
Scene has input focus and a key has been typed. |
ObjectProperty<EventHandler<? super MouseEvent>> |
onMouseClicked
Defines a function to be called when a mouse button has been clicked
(pressed and released) on this
Scene . |
ObjectProperty<EventHandler<? super MouseDragEvent>> |
onMouseDragEntered
Defines a function to be called when a full press-drag-release gesture
enters this
Scene . |
ObjectProperty<EventHandler<? super MouseDragEvent>> |
onMouseDragExited
Defines a function to be called when a full press-drag-release gesture
exits this
Scene . |
ObjectProperty<EventHandler<? super MouseEvent>> |
onMouseDragged
Defines a function to be called when a mouse button is pressed
on this
Scene and then dragged. |
ObjectProperty<EventHandler<? super MouseDragEvent>> |
onMouseDragOver
Defines a function to be called when a full press-drag-release gesture
progresses within this
Scene . |
ObjectProperty<EventHandler<? super MouseDragEvent>> |
onMouseDragReleased
Defines a function to be called when a full press-drag-release gesture
ends within this
Scene . |
ObjectProperty<EventHandler<? super MouseEvent>> |
onMouseEntered
Defines a function to be called when the mouse enters this
Scene . |
ObjectProperty<EventHandler<? super MouseEvent>> |
onMouseExited
Defines a function to be called when the mouse exits this
Scene . |
ObjectProperty<EventHandler<? super MouseEvent>> |
onMouseMoved
Defines a function to be called when mouse cursor moves within
this
Scene but no buttons have been pushed. |
ObjectProperty<EventHandler<? super MouseEvent>> |
onMousePressed
Defines a function to be called when a mouse button
has been pressed on this
Scene . |
ObjectProperty<EventHandler<? super MouseEvent>> |
onMouseReleased
Defines a function to be called when a mouse button
has been released on this
Scene . |
ObjectProperty<EventHandler<? super RotateEvent>> |
onRotate
Defines a function to be called when user performs a rotating action.
|
ObjectProperty<EventHandler<? super RotateEvent>> |
onRotationFinished
Defines a function to be called when a rotating gesture ends.
|
ObjectProperty<EventHandler<? super RotateEvent>> |
onRotationStarted
Defines a function to be called when a rotating gesture is detected.
|
ObjectProperty<EventHandler<? super ScrollEvent>> |
onScrollFinished
Defines a function to be called when a scrolling gesture ends.
|
ObjectProperty<EventHandler<? super ScrollEvent>> |
onScroll
Defines a function to be called when user performs a scrolling action.
|
ObjectProperty<EventHandler<? super ScrollEvent>> |
onScrollStarted
Defines a function to be called when a scrolling gesture is detected.
|
ObjectProperty<EventHandler<? super SwipeEvent>> |
onSwipeDown
Defines a function to be called when an downward swipe gesture
happens in this scene.
|
ObjectProperty<EventHandler<? super SwipeEvent>> |
onSwipeLeft
Defines a function to be called when an leftward swipe gesture
happens in this scene.
|
ObjectProperty<EventHandler<? super SwipeEvent>> |
onSwipeRight
Defines a function to be called when an rightward swipe gesture
happens in this scene.
|
ObjectProperty<EventHandler<? super SwipeEvent>> |
onSwipeUp
Defines a function to be called when an upward swipe gesture
happens in this scene.
|
ObjectProperty<EventHandler<? super TouchEvent>> |
onTouchMoved
Defines a function to be called when a touch point is moved.
|
ObjectProperty<EventHandler<? super TouchEvent>> |
onTouchPressed
Defines a function to be called when a new touch point is pressed.
|
ObjectProperty<EventHandler<? super TouchEvent>> |
onTouchReleased
Defines a function to be called when a new touch point is pressed.
|
ObjectProperty<EventHandler<? super TouchEvent>> |
onTouchStationary
Defines a function to be called when a touch point stays pressed and
still.
|
ObjectProperty<EventHandler<? super ZoomEvent>> |
onZoomFinished
Defines a function to be called when a zooming gesture ends.
|
ObjectProperty<EventHandler<? super ZoomEvent>> |
onZoom
Defines a function to be called when user performs a zooming action.
|
ObjectProperty<EventHandler<? super ZoomEvent>> |
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 this Scene |
ReadOnlyDoubleProperty |
x
The horizontal location of this
Scene on the Window . |
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,
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 extends Event> |
addEventFilter(EventType<T> eventType,
EventHandler<? super T> eventFilter)
Registers an event filter to this scene.
|
<T extends Event> |
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<? super ContextMenuEvent> |
getOnContextMenuRequested()
Gets the value of the property onContextMenuRequested.
|
EventHandler<? super MouseEvent> |
getOnDragDetected()
Gets the value of the property onDragDetected.
|
EventHandler<? super DragEvent> |
getOnDragDone()
Gets the value of the property onDragDone.
|
EventHandler<? super DragEvent> |
getOnDragDropped()
Gets the value of the property onDragDropped.
|
EventHandler<? super DragEvent> |
getOnDragEntered()
Gets the value of the property onDragEntered.
|
EventHandler<? super DragEvent> |
getOnDragExited()
Gets the value of the property onDragExited.
|
EventHandler<? super DragEvent> |
getOnDragOver()
Gets the value of the property onDragOver.
|
EventHandler<? super InputMethodEvent> |
getOnInputMethodTextChanged()
Gets the value of the property onInputMethodTextChanged.
|
EventHandler<? super KeyEvent> |
getOnKeyPressed()
Gets the value of the property onKeyPressed.
|
EventHandler<? super KeyEvent> |
getOnKeyReleased()
Gets the value of the property onKeyReleased.
|
EventHandler<? super KeyEvent> |
getOnKeyTyped()
Gets the value of the property onKeyTyped.
|
EventHandler<? super MouseEvent> |
getOnMouseClicked()
Gets the value of the property onMouseClicked.
|
EventHandler<? super MouseDragEvent> |
getOnMouseDragEntered()
Gets the value of the property onMouseDragEntered.
|
EventHandler<? super MouseDragEvent> |
getOnMouseDragExited()
Gets the value of the property onMouseDragExited.
|
EventHandler<? super MouseEvent> |
getOnMouseDragged()
Gets the value of the property onMouseDragged.
|
EventHandler<? super MouseDragEvent> |
getOnMouseDragOver()
Gets the value of the property onMouseDragOver.
|
EventHandler<? super MouseDragEvent> |
getOnMouseDragReleased()
Gets the value of the property onMouseDragReleased.
|
EventHandler<? super MouseEvent> |
getOnMouseEntered()
Gets the value of the property onMouseEntered.
|
EventHandler<? super MouseEvent> |
getOnMouseExited()
Gets the value of the property onMouseExited.
|
EventHandler<? super MouseEvent> |
getOnMouseMoved()
Gets the value of the property onMouseMoved.
|
EventHandler<? super MouseEvent> |
getOnMousePressed()
Gets the value of the property onMousePressed.
|
EventHandler<? super MouseEvent> |
getOnMouseReleased()
Gets the value of the property onMouseReleased.
|
EventHandler<? super RotateEvent> |
getOnRotate()
Gets the value of the property onRotate.
|
EventHandler<? super RotateEvent> |
getOnRotationFinished()
Gets the value of the property onRotationFinished.
|
EventHandler<? super RotateEvent> |
getOnRotationStarted()
Gets the value of the property onRotationStarted.
|
EventHandler<? super ScrollEvent> |
getOnScroll()
Gets the value of the property onScroll.
|
EventHandler<? super ScrollEvent> |
getOnScrollFinished()
Gets the value of the property onScrollFinished.
|
EventHandler<? super ScrollEvent> |
getOnScrollStarted()
Gets the value of the property onScrollStarted.
|
EventHandler<? super SwipeEvent> |
getOnSwipeDown()
Gets the value of the property onSwipeDown.
|
EventHandler<? super SwipeEvent> |
getOnSwipeLeft()
Gets the value of the property onSwipeLeft.
|
EventHandler<? super SwipeEvent> |
getOnSwipeRight()
Gets the value of the property onSwipeRight.
|
EventHandler<? super SwipeEvent> |
getOnSwipeUp()
Gets the value of the property onSwipeUp.
|
EventHandler<? super TouchEvent> |
getOnTouchMoved()
Gets the value of the property onTouchMoved.
|
EventHandler<? super TouchEvent> |
getOnTouchPressed()
Gets the value of the property onTouchPressed.
|
EventHandler<? super TouchEvent> |
getOnTouchReleased()
Gets the value of the property onTouchReleased.
|
EventHandler<? super TouchEvent> |
getOnTouchStationary()
Gets the value of the property onTouchStationary.
|
EventHandler<? super ZoomEvent> |
getOnZoom()
Gets the value of the property onZoom.
|
EventHandler<? super ZoomEvent> |
getOnZoomFinished()
Gets the value of the property onZoomFinished.
|
EventHandler<? super ZoomEvent> |
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<? super ContextMenuEvent>> |
onContextMenuRequestedProperty()
Defines a function to be called when a mouse button has been clicked
(pressed and released) on this
Scene . |
ObjectProperty<EventHandler<? super MouseEvent>> |
onDragDetectedProperty()
Defines a function to be called when drag gesture has been
detected.
|
ObjectProperty<EventHandler<? super 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.
|
ObjectProperty<EventHandler<? super DragEvent>> |
onDragDroppedProperty()
Defines a function to be called when the mouse button is released
on this
Scene during drag and drop gesture. |
ObjectProperty<EventHandler<? super DragEvent>> |
onDragEnteredProperty()
Defines a function to be called when drag gesture
enters this
Scene . |
ObjectProperty<EventHandler<? super DragEvent>> |
onDragExitedProperty()
Defines a function to be called when drag gesture
exits this
Scene . |
ObjectProperty<EventHandler<? super DragEvent>> |
onDragOverProperty()
Defines a function to be called when drag gesture progresses
within this
Scene . |
ObjectProperty<EventHandler<? super InputMethodEvent>> |
onInputMethodTextChangedProperty()
Defines a function to be called when this
Node
has input focus and the input method text has changed. |
ObjectProperty<EventHandler<? super KeyEvent>> |
onKeyPressedProperty()
Defines a function to be called when some
Node of this
Scene has input focus and a key has been pressed. |
ObjectProperty<EventHandler<? super KeyEvent>> |
onKeyReleasedProperty()
Defines a function to be called when some
Node of this
Scene has input focus and a key has been released. |
ObjectProperty<EventHandler<? super KeyEvent>> |
onKeyTypedProperty()
Defines a function to be called when some
Node of this
Scene has input focus and a key has been typed. |
ObjectProperty<EventHandler<? super MouseEvent>> |
onMouseClickedProperty()
Defines a function to be called when a mouse button has been clicked
(pressed and released) on this
Scene . |
ObjectProperty<EventHandler<? super MouseDragEvent>> |
onMouseDragEnteredProperty()
Defines a function to be called when a full press-drag-release gesture
enters this
Scene . |
ObjectProperty<EventHandler<? super MouseDragEvent>> |
onMouseDragExitedProperty()
Defines a function to be called when a full press-drag-release gesture
exits this
Scene . |
ObjectProperty<EventHandler<? super MouseEvent>> |
onMouseDraggedProperty()
Defines a function to be called when a mouse button is pressed
on this
Scene and then dragged. |
ObjectProperty<EventHandler<? super MouseDragEvent>> |
onMouseDragOverProperty()
Defines a function to be called when a full press-drag-release gesture
progresses within this
Scene . |
ObjectProperty<EventHandler<? super MouseDragEvent>> |
onMouseDragReleasedProperty()
Defines a function to be called when a full press-drag-release gesture
ends within this
Scene . |
ObjectProperty<EventHandler<? super MouseEvent>> |
onMouseEnteredProperty()
Defines a function to be called when the mouse enters this
Scene . |
ObjectProperty<EventHandler<? super MouseEvent>> |
onMouseExitedProperty()
Defines a function to be called when the mouse exits this
Scene . |
ObjectProperty<EventHandler<? super MouseEvent>> |
onMouseMovedProperty()
Defines a function to be called when mouse cursor moves within
this
Scene but no buttons have been pushed. |
ObjectProperty<EventHandler<? super MouseEvent>> |
onMousePressedProperty()
Defines a function to be called when a mouse button
has been pressed on this
Scene . |
ObjectProperty<EventHandler<? super MouseEvent>> |
onMouseReleasedProperty()
Defines a function to be called when a mouse button
has been released on this
Scene . |
ObjectProperty<EventHandler<? super RotateEvent>> |
onRotateProperty()
Defines a function to be called when user performs a rotating action.
|
ObjectProperty<EventHandler<? super RotateEvent>> |
onRotationFinishedProperty()
Defines a function to be called when a rotating gesture ends.
|
ObjectProperty<EventHandler<? super RotateEvent>> |
onRotationStartedProperty()
Defines a function to be called when a rotating gesture is detected.
|
ObjectProperty<EventHandler<? super ScrollEvent>> |
onScrollFinishedProperty()
Defines a function to be called when a scrolling gesture ends.
|
ObjectProperty<EventHandler<? super ScrollEvent>> |
onScrollProperty()
Defines a function to be called when user performs a scrolling action.
|
ObjectProperty<EventHandler<? super ScrollEvent>> |
onScrollStartedProperty()
Defines a function to be called when a scrolling gesture is detected.
|
ObjectProperty<EventHandler<? super SwipeEvent>> |
onSwipeDownProperty()
Defines a function to be called when an downward swipe gesture
happens in this scene.
|
ObjectProperty<EventHandler<? super SwipeEvent>> |
onSwipeLeftProperty()
Defines a function to be called when an leftward swipe gesture
happens in this scene.
|
ObjectProperty<EventHandler<? super SwipeEvent>> |
onSwipeRightProperty()
Defines a function to be called when an rightward swipe gesture
happens in this scene.
|
ObjectProperty<EventHandler<? super SwipeEvent>> |
onSwipeUpProperty()
Defines a function to be called when an upward swipe gesture
happens in this scene.
|
ObjectProperty<EventHandler<? super TouchEvent>> |
onTouchMovedProperty()
Defines a function to be called when a touch point is moved.
|
ObjectProperty<EventHandler<? super TouchEvent>> |
onTouchPressedProperty()
Defines a function to be called when a new touch point is pressed.
|
ObjectProperty<EventHandler<? super TouchEvent>> |
onTouchReleasedProperty()
Defines a function to be called when a new touch point is pressed.
|
ObjectProperty<EventHandler<? super TouchEvent>> |
onTouchStationaryProperty()
Defines a function to be called when a touch point stays pressed and
still.
|
ObjectProperty<EventHandler<? super ZoomEvent>> |
onZoomFinishedProperty()
Defines a function to be called when a zooming gesture ends.
|
ObjectProperty<EventHandler<? super ZoomEvent>> |
onZoomProperty()
Defines a function to be called when user performs a zooming action.
|
ObjectProperty<EventHandler<? super ZoomEvent>> |
onZoomStartedProperty()
Defines a function to be called when a zooming gesture is detected.
|
<T extends Event> |
removeEventFilter(EventType<T> eventType,
EventHandler<? super T> eventFilter)
Unregisters a previously registered event filter from this scene.
|
<T extends Event> |
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 extends Event> |
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<? super ContextMenuEvent> value)
Sets the value of the property onContextMenuRequested.
|
void |
setOnDragDetected(EventHandler<? super MouseEvent> value)
Sets the value of the property onDragDetected.
|
void |
setOnDragDone(EventHandler<? super DragEvent> value)
Sets the value of the property onDragDone.
|
void |
setOnDragDropped(EventHandler<? super DragEvent> value)
Sets the value of the property onDragDropped.
|
void |
setOnDragEntered(EventHandler<? super DragEvent> value)
Sets the value of the property onDragEntered.
|
void |
setOnDragExited(EventHandler<? super DragEvent> value)
Sets the value of the property onDragExited.
|
void |
setOnDragOver(EventHandler<? super DragEvent> value)
Sets the value of the property onDragOver.
|
void |
setOnInputMethodTextChanged(EventHandler<? super InputMethodEvent> value)
Sets the value of the property onInputMethodTextChanged.
|
void |
setOnKeyPressed(EventHandler<? super KeyEvent> value)
Sets the value of the property onKeyPressed.
|
void |
setOnKeyReleased(EventHandler<? super KeyEvent> value)
Sets the value of the property onKeyReleased.
|
void |
setOnKeyTyped(EventHandler<? super KeyEvent> value)
Sets the value of the property onKeyTyped.
|
void |
setOnMouseClicked(EventHandler<? super MouseEvent> value)
Sets the value of the property onMouseClicked.
|
void |
setOnMouseDragEntered(EventHandler<? super MouseDragEvent> value)
Sets the value of the property onMouseDragEntered.
|
void |
setOnMouseDragExited(EventHandler<? super MouseDragEvent> value)
Sets the value of the property onMouseDragExited.
|
void |
setOnMouseDragged(EventHandler<? super MouseEvent> value)
Sets the value of the property onMouseDragged.
|
void |
setOnMouseDragOver(EventHandler<? super MouseDragEvent> value)
Sets the value of the property onMouseDragOver.
|
void |
setOnMouseDragReleased(EventHandler<? super MouseDragEvent> value)
Sets the value of the property onMouseDragReleased.
|
void |
setOnMouseEntered(EventHandler<? super MouseEvent> value)
Sets the value of the property onMouseEntered.
|
void |
setOnMouseExited(EventHandler<? super MouseEvent> value)
Sets the value of the property onMouseExited.
|
void |
setOnMouseMoved(EventHandler<? super MouseEvent> value)
Sets the value of the property onMouseMoved.
|
void |
setOnMousePressed(EventHandler<? super MouseEvent> value)
Sets the value of the property onMousePressed.
|
void |
setOnMouseReleased(EventHandler<? super MouseEvent> value)
Sets the value of the property onMouseReleased.
|
void |
setOnRotate(EventHandler<? super RotateEvent> value)
Sets the value of the property onRotate.
|
void |
setOnRotationFinished(EventHandler<? super RotateEvent> value)
Sets the value of the property onRotationFinished.
|
void |
setOnRotationStarted(EventHandler<? super RotateEvent> value)
Sets the value of the property onRotationStarted.
|
void |
setOnScroll(EventHandler<? super ScrollEvent> value)
Sets the value of the property onScroll.
|
void |
setOnScrollFinished(EventHandler<? super ScrollEvent> value)
Sets the value of the property onScrollFinished.
|
void |
setOnScrollStarted(EventHandler<? super ScrollEvent> value)
Sets the value of the property onScrollStarted.
|
void |
setOnSwipeDown(EventHandler<? super SwipeEvent> value)
Sets the value of the property onSwipeDown.
|
void |
setOnSwipeLeft(EventHandler<? super SwipeEvent> value)
Sets the value of the property onSwipeLeft.
|
void |
setOnSwipeRight(EventHandler<? super SwipeEvent> value)
Sets the value of the property onSwipeRight.
|
void |
setOnSwipeUp(EventHandler<? super SwipeEvent> value)
Sets the value of the property onSwipeUp.
|
void |
setOnTouchMoved(EventHandler<? super TouchEvent> value)
Sets the value of the property onTouchMoved.
|
void |
setOnTouchPressed(EventHandler<? super TouchEvent> value)
Sets the value of the property onTouchPressed.
|
void |
setOnTouchReleased(EventHandler<? super TouchEvent> value)
Sets the value of the property onTouchReleased.
|
void |
setOnTouchStationary(EventHandler<? super TouchEvent> value)
Sets the value of the property onTouchStationary.
|
void |
setOnZoom(EventHandler<? super ZoomEvent> value)
Sets the value of the property onZoom.
|
void |
setOnZoomFinished(EventHandler<? super ZoomEvent> value)
Sets the value of the property onZoomFinished.
|
void |
setOnZoomStarted(EventHandler<? super ZoomEvent> 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 this Scene |
ReadOnlyDoubleProperty |
xProperty()
The horizontal location of this
Scene on the Window . |
ReadOnlyDoubleProperty |
yProperty()
The vertical location of this
Scene on the Window . |
public final ReadOnlyObjectProperty<Window> windowProperty
Window
for this Scene
getWindow()
public final ReadOnlyDoubleProperty xProperty
Scene
on the Window
.getX()
public final ReadOnlyDoubleProperty yProperty
Scene
on the Window
.getY()
public final ReadOnlyDoubleProperty widthProperty
Scene
getWidth()
public final ReadOnlyDoubleProperty heightProperty
Scene
getHeight()
public final 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 ObjectProperty<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 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 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<? super ContextMenuEvent>> onContextMenuRequestedProperty
Scene
.public final ObjectProperty<EventHandler<? super MouseEvent>> onMouseClickedProperty
Scene
.public final ObjectProperty<EventHandler<? super MouseEvent>> onMouseDraggedProperty
Scene
and then dragged.public final ObjectProperty<EventHandler<? super MouseEvent>> onMouseEnteredProperty
Scene
.public final ObjectProperty<EventHandler<? super MouseEvent>> onMouseExitedProperty
Scene
.public final ObjectProperty<EventHandler<? super MouseEvent>> onMouseMovedProperty
Scene
but no buttons have been pushed.public final ObjectProperty<EventHandler<? super MouseEvent>> onMousePressedProperty
Scene
.public final ObjectProperty<EventHandler<? super MouseEvent>> onMouseReleasedProperty
Scene
.public final ObjectProperty<EventHandler<? super MouseEvent>> onDragDetectedProperty
public final ObjectProperty<EventHandler<? super MouseDragEvent>> onMouseDragOverProperty
Scene
.public final ObjectProperty<EventHandler<? super MouseDragEvent>> onMouseDragReleasedProperty
Scene
.public final ObjectProperty<EventHandler<? super MouseDragEvent>> onMouseDragEnteredProperty
Scene
.public final ObjectProperty<EventHandler<? super MouseDragEvent>> onMouseDragExitedProperty
Scene
.public final ObjectProperty<EventHandler<? super ScrollEvent>> onScrollStartedProperty
public final ObjectProperty<EventHandler<? super ScrollEvent>> onScrollProperty
getOnScroll()
,
setOnScroll(EventHandler)
public final ObjectProperty<EventHandler<? super ScrollEvent>> onScrollFinishedProperty
public final ObjectProperty<EventHandler<? super RotateEvent>> onRotationStartedProperty
public final ObjectProperty<EventHandler<? super RotateEvent>> onRotateProperty
getOnRotate()
,
setOnRotate(EventHandler)
public final ObjectProperty<EventHandler<? super RotateEvent>> onRotationFinishedProperty
public final ObjectProperty<EventHandler<? super ZoomEvent>> onZoomStartedProperty
public final ObjectProperty<EventHandler<? super ZoomEvent>> onZoomProperty
getOnZoom()
,
setOnZoom(EventHandler)
public final ObjectProperty<EventHandler<? super ZoomEvent>> onZoomFinishedProperty
public final ObjectProperty<EventHandler<? super SwipeEvent>> onSwipeUpProperty
getOnSwipeUp()
,
setOnSwipeUp(EventHandler)
public final ObjectProperty<EventHandler<? super SwipeEvent>> onSwipeDownProperty
getOnSwipeDown()
,
setOnSwipeDown(EventHandler)
public final ObjectProperty<EventHandler<? super SwipeEvent>> onSwipeLeftProperty
getOnSwipeLeft()
,
setOnSwipeLeft(EventHandler)
public final ObjectProperty<EventHandler<? super SwipeEvent>> onSwipeRightProperty
public final ObjectProperty<EventHandler<? super TouchEvent>> onTouchPressedProperty
public final ObjectProperty<EventHandler<? super TouchEvent>> onTouchMovedProperty
public final ObjectProperty<EventHandler<? super TouchEvent>> onTouchReleasedProperty
public final ObjectProperty<EventHandler<? super TouchEvent>> onTouchStationaryProperty
public final ObjectProperty<EventHandler<? super DragEvent>> onDragEnteredProperty
Scene
.public final ObjectProperty<EventHandler<? super DragEvent>> onDragExitedProperty
Scene
.public final ObjectProperty<EventHandler<? super DragEvent>> onDragOverProperty
Scene
.getOnDragOver()
,
setOnDragOver(EventHandler)
public final ObjectProperty<EventHandler<? super DragEvent>> onDragDroppedProperty
public final ObjectProperty<EventHandler<? super 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 ObjectProperty<EventHandler<? super 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 ObjectProperty<EventHandler<? super 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 ObjectProperty<EventHandler<? super 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 ObjectProperty<EventHandler<? super 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 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. 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 final Window getWindow()
Window
for this Scene
public final ReadOnlyObjectProperty<Window> windowProperty()
Window
for this Scene
getWindow()
public final double getX()
Scene
on the Window
.public final ReadOnlyDoubleProperty xProperty()
Scene
on the Window
.getX()
public final double getY()
Scene
on the Window
.public final ReadOnlyDoubleProperty yProperty()
Scene
on the Window
.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
.
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 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(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 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 ObjectProperty<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 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 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 CSS selector
,
or null
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 extends Event> 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 extends Event> 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 extends Event> 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 extends Event> 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 extends Event> 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<? super ContextMenuEvent> value)
Scene
.public final EventHandler<? super ContextMenuEvent> getOnContextMenuRequested()
Scene
.public final ObjectProperty<EventHandler<? super ContextMenuEvent>> onContextMenuRequestedProperty()
Scene
.public final void setOnMouseClicked(EventHandler<? super MouseEvent> value)
Scene
.public final EventHandler<? super MouseEvent> getOnMouseClicked()
Scene
.public final ObjectProperty<EventHandler<? super MouseEvent>> onMouseClickedProperty()
Scene
.public final void setOnMouseDragged(EventHandler<? super MouseEvent> value)
Scene
and then dragged.public final EventHandler<? super MouseEvent> getOnMouseDragged()
Scene
and then dragged.public final ObjectProperty<EventHandler<? super MouseEvent>> onMouseDraggedProperty()
Scene
and then dragged.public final void setOnMouseEntered(EventHandler<? super MouseEvent> value)
Scene
.public final EventHandler<? super MouseEvent> getOnMouseEntered()
Scene
.public final ObjectProperty<EventHandler<? super MouseEvent>> onMouseEnteredProperty()
Scene
.public final void setOnMouseExited(EventHandler<? super MouseEvent> value)
Scene
.public final EventHandler<? super MouseEvent> getOnMouseExited()
Scene
.public final ObjectProperty<EventHandler<? super MouseEvent>> onMouseExitedProperty()
Scene
.public final void setOnMouseMoved(EventHandler<? super MouseEvent> value)
Scene
but no buttons have been pushed.public final EventHandler<? super MouseEvent> getOnMouseMoved()
Scene
but no buttons have been pushed.public final ObjectProperty<EventHandler<? super MouseEvent>> onMouseMovedProperty()
Scene
but no buttons have been pushed.public final void setOnMousePressed(EventHandler<? super MouseEvent> value)
Scene
.public final EventHandler<? super MouseEvent> getOnMousePressed()
Scene
.public final ObjectProperty<EventHandler<? super MouseEvent>> onMousePressedProperty()
Scene
.public final void setOnMouseReleased(EventHandler<? super MouseEvent> value)
Scene
.public final EventHandler<? super MouseEvent> getOnMouseReleased()
Scene
.public final ObjectProperty<EventHandler<? super MouseEvent>> onMouseReleasedProperty()
Scene
.public final void setOnDragDetected(EventHandler<? super MouseEvent> value)
public final EventHandler<? super MouseEvent> getOnDragDetected()
public final ObjectProperty<EventHandler<? super MouseEvent>> onDragDetectedProperty()
public final void setOnMouseDragOver(EventHandler<? super MouseDragEvent> value)
Scene
.public final EventHandler<? super MouseDragEvent> getOnMouseDragOver()
Scene
.public final ObjectProperty<EventHandler<? super MouseDragEvent>> onMouseDragOverProperty()
Scene
.public final void setOnMouseDragReleased(EventHandler<? super MouseDragEvent> value)
Scene
.public final EventHandler<? super MouseDragEvent> getOnMouseDragReleased()
Scene
.public final ObjectProperty<EventHandler<? super MouseDragEvent>> onMouseDragReleasedProperty()
Scene
.public final void setOnMouseDragEntered(EventHandler<? super MouseDragEvent> value)
Scene
.public final EventHandler<? super MouseDragEvent> getOnMouseDragEntered()
Scene
.public final ObjectProperty<EventHandler<? super MouseDragEvent>> onMouseDragEnteredProperty()
Scene
.public final void setOnMouseDragExited(EventHandler<? super MouseDragEvent> value)
Scene
.public final EventHandler<? super MouseDragEvent> getOnMouseDragExited()
Scene
.public final ObjectProperty<EventHandler<? super MouseDragEvent>> onMouseDragExitedProperty()
Scene
.public final void setOnScrollStarted(EventHandler<? super ScrollEvent> value)
public final EventHandler<? super ScrollEvent> getOnScrollStarted()
public final ObjectProperty<EventHandler<? super ScrollEvent>> onScrollStartedProperty()
public final void setOnScroll(EventHandler<? super ScrollEvent> value)
public final EventHandler<? super ScrollEvent> getOnScroll()
public final ObjectProperty<EventHandler<? super ScrollEvent>> onScrollProperty()
getOnScroll()
,
setOnScroll(EventHandler)
public final void setOnScrollFinished(EventHandler<? super ScrollEvent> value)
public final EventHandler<? super ScrollEvent> getOnScrollFinished()
public final ObjectProperty<EventHandler<? super ScrollEvent>> onScrollFinishedProperty()
public final void setOnRotationStarted(EventHandler<? super RotateEvent> value)
public final EventHandler<? super RotateEvent> getOnRotationStarted()
public final ObjectProperty<EventHandler<? super RotateEvent>> onRotationStartedProperty()
public final void setOnRotate(EventHandler<? super RotateEvent> value)
public final EventHandler<? super RotateEvent> getOnRotate()
public final ObjectProperty<EventHandler<? super RotateEvent>> onRotateProperty()
getOnRotate()
,
setOnRotate(EventHandler)
public final void setOnRotationFinished(EventHandler<? super RotateEvent> value)
public final EventHandler<? super RotateEvent> getOnRotationFinished()
public final ObjectProperty<EventHandler<? super RotateEvent>> onRotationFinishedProperty()
public final void setOnZoomStarted(EventHandler<? super ZoomEvent> value)
public final EventHandler<? super ZoomEvent> getOnZoomStarted()
public final ObjectProperty<EventHandler<? super ZoomEvent>> onZoomStartedProperty()
public final void setOnZoom(EventHandler<? super ZoomEvent> value)
public final EventHandler<? super ZoomEvent> getOnZoom()
public final ObjectProperty<EventHandler<? super ZoomEvent>> onZoomProperty()
getOnZoom()
,
setOnZoom(EventHandler)
public final void setOnZoomFinished(EventHandler<? super ZoomEvent> value)
public final EventHandler<? super ZoomEvent> getOnZoomFinished()
public final ObjectProperty<EventHandler<? super ZoomEvent>> onZoomFinishedProperty()
public final void setOnSwipeUp(EventHandler<? super SwipeEvent> value)
public final EventHandler<? super SwipeEvent> getOnSwipeUp()
public final ObjectProperty<EventHandler<? super SwipeEvent>> onSwipeUpProperty()
getOnSwipeUp()
,
setOnSwipeUp(EventHandler)
public final void setOnSwipeDown(EventHandler<? super SwipeEvent> value)
public final EventHandler<? super SwipeEvent> getOnSwipeDown()
public final ObjectProperty<EventHandler<? super SwipeEvent>> onSwipeDownProperty()
getOnSwipeDown()
,
setOnSwipeDown(EventHandler)
public final void setOnSwipeLeft(EventHandler<? super SwipeEvent> value)
public final EventHandler<? super SwipeEvent> getOnSwipeLeft()
public final ObjectProperty<EventHandler<? super SwipeEvent>> onSwipeLeftProperty()
getOnSwipeLeft()
,
setOnSwipeLeft(EventHandler)
public final void setOnSwipeRight(EventHandler<? super SwipeEvent> value)
public final EventHandler<? super SwipeEvent> getOnSwipeRight()
public final ObjectProperty<EventHandler<? super SwipeEvent>> onSwipeRightProperty()
public final void setOnTouchPressed(EventHandler<? super TouchEvent> value)
public final EventHandler<? super TouchEvent> getOnTouchPressed()
public final ObjectProperty<EventHandler<? super TouchEvent>> onTouchPressedProperty()
public final void setOnTouchMoved(EventHandler<? super TouchEvent> value)
public final EventHandler<? super TouchEvent> getOnTouchMoved()
public final ObjectProperty<EventHandler<? super TouchEvent>> onTouchMovedProperty()
public final void setOnTouchReleased(EventHandler<? super TouchEvent> value)
public final EventHandler<? super TouchEvent> getOnTouchReleased()
public final ObjectProperty<EventHandler<? super TouchEvent>> onTouchReleasedProperty()
public final void setOnTouchStationary(EventHandler<? super TouchEvent> value)
public final EventHandler<? super TouchEvent> getOnTouchStationary()
public final ObjectProperty<EventHandler<? super TouchEvent>> onTouchStationaryProperty()
public final void setOnDragEntered(EventHandler<? super DragEvent> value)
Scene
.public final EventHandler<? super DragEvent> getOnDragEntered()
Scene
.public final ObjectProperty<EventHandler<? super DragEvent>> onDragEnteredProperty()
Scene
.public final void setOnDragExited(EventHandler<? super DragEvent> value)
Scene
.public final EventHandler<? super DragEvent> getOnDragExited()
Scene
.public final ObjectProperty<EventHandler<? super DragEvent>> onDragExitedProperty()
Scene
.public final void setOnDragOver(EventHandler<? super DragEvent> value)
Scene
.public final EventHandler<? super DragEvent> getOnDragOver()
Scene
.public final ObjectProperty<EventHandler<? super DragEvent>> onDragOverProperty()
Scene
.getOnDragOver()
,
setOnDragOver(EventHandler)
public final void setOnDragDropped(EventHandler<? super DragEvent> value)
public final EventHandler<? super DragEvent> getOnDragDropped()
public final ObjectProperty<EventHandler<? super DragEvent>> onDragDroppedProperty()
public final void setOnDragDone(EventHandler<? super 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 EventHandler<? super 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 ObjectProperty<EventHandler<? super 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 Dragboard startDragAndDrop(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(EventHandler<? super 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 EventHandler<? super 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 ObjectProperty<EventHandler<? super 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(EventHandler<? super 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 EventHandler<? super 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 ObjectProperty<EventHandler<? super 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(EventHandler<? super 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 EventHandler<? super 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 ObjectProperty<EventHandler<? super 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(EventHandler<? super 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 EventHandler<? super 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 ObjectProperty<EventHandler<? super 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.Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved. Use is subject to