Class Node
- All Implemented Interfaces:
LayoutMeasurable
,LayoutMeasurableMixin
,HasBlendModeProperty
,HasClipProperty
,HasEffectProperty
,HasLayoutXProperty
,HasLayoutYProperty
,HasManagedProperty
,HasMouseTransparentProperty
,HasOnMouseClickedProperty
,HasOpacityProperty
,HasParentProperty
,HasVisibleProperty
,Styleable
,EventTarget
,INode
- Author:
- Bruno Salmon
-
Property Summary
TypePropertyDescriptionfinal BooleanProperty
final ObjectProperty<Cursor>
Defines the mouse cursor for thisNode
and subnodes.final ReadOnlyBooleanProperty
Indicates whether or not thisNode
is disabled.final ObjectProperty<EventDispatcher>
Specifies the event dispatcher for this node.final ReadOnlyBooleanProperty
Indicates whether thisNode
currently has the input focus.Specifies whether thisNode
should be a part of focus traversal cycle.final ReadOnlyProperty<Boolean>
Whether or not thisNode
is being hovered over.final StringProperty
The id of thisNode
.The rectangular bounds that should be used for layout calculations for this node.final ObjectProperty<EventHandler<? super ContextMenuEvent>>
Defines a function to be called when a context menu has been requested on thisNode
.final ObjectProperty<EventHandler<? super MouseEvent>>
Defines a function to be called when drag gesture has been detected.final ObjectProperty<EventHandler<? super DragEvent>>
Defines a function to be called when thisNode
is a drag and drop gesture source after its data has been dropped on a drop target.final ObjectProperty<EventHandler<? super DragEvent>>
Defines a function to be called when the mouse button is released on thisNode
during drag and drop gesture.final ObjectProperty<EventHandler<? super DragEvent>>
Defines a function to be called when drag gesture enters thisNode
.final ObjectProperty<EventHandler<? super DragEvent>>
Defines a function to be called when drag gesture exits thisNode
.final ObjectProperty<EventHandler<? super DragEvent>>
Defines a function to be called when drag gesture progresses within thisNode
.final ObjectProperty<EventHandler<? super KeyEvent>>
Defines a function to be called when thisNode
or its childNode
has input focus and a key has been pressed.final ObjectProperty<EventHandler<? super KeyEvent>>
Defines a function to be called when thisNode
or its childNode
has input focus and a key has been released.final ObjectProperty<EventHandler<? super KeyEvent>>
Defines a function to be called when thisNode
or its childNode
has input focus and a key has been typed.final ObjectProperty<EventHandler<? super MouseEvent>>
Defines a function to be called when a mouse button has been clicked (pressed and released) on thisNode
.final ObjectProperty<EventHandler<? super MouseEvent>>
Defines a function to be called when a mouse button is pressed on thisNode
and then dragged.final ObjectProperty<EventHandler<? super MouseEvent>>
Defines a function to be called when the mouse enters thisNode
.final ObjectProperty<EventHandler<? super MouseEvent>>
Defines a function to be called when the mouse exits thisNode
.final ObjectProperty<EventHandler<? super MouseEvent>>
Defines a function to be called when mouse cursor moves within thisNode
but no buttons have been pushed.final ObjectProperty<EventHandler<? super MouseEvent>>
Defines a function to be called when a mouse button has been pressed on thisNode
.final ObjectProperty<EventHandler<? super MouseEvent>>
Defines a function to be called when a mouse button has been released on thisNode
.final ObjectProperty<EventHandler<? super ScrollEvent>>
Defines a function to be called when user performs a scrolling action.final ObjectProperty<EventHandler<? super SwipeEvent>>
Defines a function to be called when a downward swipe gesture centered over this node happens.final ObjectProperty<EventHandler<? super SwipeEvent>>
Defines a function to be called when a leftward swipe gesture centered over this node happens.final ObjectProperty<EventHandler<? super SwipeEvent>>
Defines a function to be called when an rightward swipe gesture centered over this node happens.final ObjectProperty<EventHandler<? super SwipeEvent>>
Defines a function to be called when an upward swipe gesture centered over this node happens.final ObjectProperty<EventHandler<? super TouchEvent>>
Defines a function to be called when a touch point is moved.final ObjectProperty<EventHandler<? super TouchEvent>>
Defines a function to be called when a new touch point is pressed.final ObjectProperty<EventHandler<? super TouchEvent>>
Defines a function to be called when a touch point is released.final ObjectProperty<EventHandler<? super TouchEvent>>
Defines a function to be called when a touch point stays pressed and still.final ReadOnlyProperty<Boolean>
Whether or not theNode
is pressed.final DoubleProperty
final DoubleProperty
Defines the factor by which coordinates are scaled about the center of the object along the X axis of thisNode
.final DoubleProperty
Defines the factor by which coordinates are scaled about the center of the object along the Y axis of thisNode
.final DoubleProperty
Defines the factor by which coordinates are scaled about the center of the object along the Z axis of thisNode
.final StringProperty
A string representation of the CSS style associated with this specificNode
.final DoubleProperty
final DoubleProperty
-
Field Summary
Fields inherited from interface javafx.scene.INode
BASELINE_OFFSET_SAME_AS_HEIGHT
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal <T extends Event>
voidaddEventFilter
(EventType<T> eventType, EventHandler<? super T> eventFilter) Registers an event filter to this node.final <T extends Event>
voidaddEventHandler
(EventType<T> eventType, EventHandler<? super T> eventHandler) Registers an event handler to this node.void
autosize()
Construct an event dispatch chain for this node.final BooleanProperty
protected void
createLayoutMeasurable
(NodePeer nodePeer) final ObjectProperty<Cursor>
Defines the mouse cursor for thisNode
and subnodes.final ReadOnlyBooleanProperty
Indicates whether or not thisNode
is disabled.final ObjectProperty<EventDispatcher>
Specifies the event dispatcher for this node.final void
Fires the specified event.final ReadOnlyBooleanProperty
Indicates whether thisNode
currently has the input focus.Specifies whether thisNode
should be a part of focus traversal cycle.final CacheHint
Gets the value of thecacheHint
property.final Cursor
Gets the value of thecursor
property.final EventDispatcher
Gets the value of theeventDispatcher
property.final String
getId()
The id of thisNode
.final EventHandler<? super ContextMenuEvent>
Gets the value of theonContextMenuRequested
property.final EventHandler<? super MouseEvent>
Gets the value of theonDragDetected
property.final EventHandler<? super DragEvent>
Gets the value of theonDragDone
property.final EventHandler<? super DragEvent>
Gets the value of theonDragDropped
property.final EventHandler<? super DragEvent>
Gets the value of theonDragEntered
property.final EventHandler<? super DragEvent>
Gets the value of theonDragExited
property.final EventHandler<? super DragEvent>
Gets the value of theonDragOver
property.final EventHandler<? super KeyEvent>
Gets the value of theonKeyPressed
property.final EventHandler<? super KeyEvent>
Gets the value of theonKeyReleased
property.final EventHandler<? super KeyEvent>
Gets the value of theonKeyTyped
property.final EventHandler<? super MouseEvent>
Gets the value of theonMouseDragged
property.final EventHandler<? super MouseEvent>
Gets the value of theonMouseEntered
property.final EventHandler<? super MouseEvent>
Gets the value of theonMouseExited
property.final EventHandler<? super MouseEvent>
Gets the value of theonMouseMoved
property.final EventHandler<? super MouseEvent>
Gets the value of theonMousePressed
property.final EventHandler<? super MouseEvent>
Gets the value of theonMouseReleased
property.final EventHandler<? super ScrollEvent>
Gets the value of theonScroll
property.final EventHandler<? super SwipeEvent>
Gets the value of theonSwipeDown
property.final EventHandler<? super SwipeEvent>
Gets the value of theonSwipeLeft
property.final EventHandler<? super SwipeEvent>
Gets the value of theonSwipeRight
property.final EventHandler<? super SwipeEvent>
Gets the value of theonSwipeUp
property.final EventHandler<? super TouchEvent>
Gets the value of theonTouchMoved
property.final EventHandler<? super TouchEvent>
Gets the value of theonTouchPressed
property.final EventHandler<? super TouchEvent>
Gets the value of theonTouchReleased
property.final EventHandler<? super TouchEvent>
Gets the value of theonTouchStationary
property.final ObservableMap<Object,
Object> Returns an observable map of properties on this node for use primarily by application developers.final double
Gets the value of therotate
property.final double
Gets the value of thescaleX
property.final double
Gets the value of thescaleY
property.final double
Gets the value of thescaleZ
property.getScene()
Gets the value of thescene
property.final String
getStyle()
A string representation of the CSS style associated with this specificNode
.final ObservableList<String>
A list of String identifiers which can be used to logically group Nodes, specifically for an external style engine.final double
Gets the value of thetranslateX
property.final double
Gets the value of thetranslateY
property.Returns a previously set Object property, or null if no such property has been set using thesetUserData(java.lang.Object)
method.boolean
Tests if Node has properties.final ReadOnlyProperty<Boolean>
Whether or not thisNode
is being hovered over.final StringProperty
The id of thisNode
.abstract BaseBounds
impl_computeGeomBounds
(BaseBounds bounds, BaseTransform tx) Computes the geometric bounds for this Node.protected Bounds
Returns geometric bounds, but may be over-ridden by a subclass.protected Bounds
final boolean
protected double
impl_maxHeight
(double width) protected double
impl_maxWidth
(double height) protected double
impl_minHeight
(double width) protected double
impl_minWidth
(double height) protected double
impl_prefHeight
(double width) protected double
impl_prefWidth
(double height) final boolean
impl_traverse
(Direction dir) Traverses from this node in the direction indicated.final boolean
isCache()
Gets the value of thecache
property.final boolean
final boolean
Gets the value of thedisabled
property.final boolean
Gets the value of thefocused
property.final boolean
final boolean
isHover()
final boolean
The rectangular bounds that should be used for layout calculations for this node.localToParent
(double localX, double localY) void
localToParent
(Point2D pt) Transforms in place the specified point from local coords to parent coords.localToParent
(Point2D pt) localToScene
(double localX, double localY) Transforms a point from the local coordinate space of thisNode
into the coordinate space of its scene.protected void
localToScene
(Point2D pt) localToScreen
(double localX, double localY) Transforms a point from the local coordinate space of thisNode
into the coordinate space of itsScreen
.localToScreen
(double localX, double localY, double localZ) Transforms a point from the local coordinate space of thisNode
into the coordinate space of itsScreen
.localToScreen
(Bounds localBounds) Transforms a bounds from the local coordinate space of thisNode
into the coordinate space of itsScreen
.localToScreen
(Point2D localPoint) Transforms a point from the local coordinate space of thisNode
into the coordinate space of itsScreen
.final ObjectProperty<EventHandler<? super ContextMenuEvent>>
Defines a function to be called when a context menu has been requested on thisNode
.final ObjectProperty<EventHandler<? super MouseEvent>>
Defines a function to be called when drag gesture has been detected.final ObjectProperty<EventHandler<? super DragEvent>>
Defines a function to be called when thisNode
is a drag and drop gesture source after its data has been dropped on a drop target.final ObjectProperty<EventHandler<? super DragEvent>>
Defines a function to be called when the mouse button is released on thisNode
during drag and drop gesture.final ObjectProperty<EventHandler<? super DragEvent>>
Defines a function to be called when drag gesture enters thisNode
.final ObjectProperty<EventHandler<? super DragEvent>>
Defines a function to be called when drag gesture exits thisNode
.final ObjectProperty<EventHandler<? super DragEvent>>
Defines a function to be called when drag gesture progresses within thisNode
.final ObjectProperty<EventHandler<? super KeyEvent>>
Defines a function to be called when thisNode
or its childNode
has input focus and a key has been pressed.final ObjectProperty<EventHandler<? super KeyEvent>>
Defines a function to be called when thisNode
or its childNode
has input focus and a key has been released.final ObjectProperty<EventHandler<? super KeyEvent>>
Defines a function to be called when thisNode
or its childNode
has input focus and a key has been typed.final ObjectProperty<EventHandler<? super MouseEvent>>
Defines a function to be called when a mouse button has been clicked (pressed and released) on thisNode
.final ObjectProperty<EventHandler<? super MouseEvent>>
Defines a function to be called when a mouse button is pressed on thisNode
and then dragged.final ObjectProperty<EventHandler<? super MouseEvent>>
Defines a function to be called when the mouse enters thisNode
.final ObjectProperty<EventHandler<? super MouseEvent>>
Defines a function to be called when the mouse exits thisNode
.final ObjectProperty<EventHandler<? super MouseEvent>>
Defines a function to be called when mouse cursor moves within thisNode
but no buttons have been pushed.final ObjectProperty<EventHandler<? super MouseEvent>>
Defines a function to be called when a mouse button has been pressed on thisNode
.final ObjectProperty<EventHandler<? super MouseEvent>>
Defines a function to be called when a mouse button has been released on thisNode
.void
onNodePeerReady
(Consumer<NodePeer> handler) void
final ObjectProperty<EventHandler<? super ScrollEvent>>
Defines a function to be called when user performs a scrolling action.final ObjectProperty<EventHandler<? super SwipeEvent>>
Defines a function to be called when a downward swipe gesture centered over this node happens.final ObjectProperty<EventHandler<? super SwipeEvent>>
Defines a function to be called when a leftward swipe gesture centered over this node happens.final ObjectProperty<EventHandler<? super SwipeEvent>>
Defines a function to be called when an rightward swipe gesture centered over this node happens.final ObjectProperty<EventHandler<? super SwipeEvent>>
Defines a function to be called when an upward swipe gesture centered over this node happens.final ObjectProperty<EventHandler<? super TouchEvent>>
Defines a function to be called when a touch point is moved.final ObjectProperty<EventHandler<? super TouchEvent>>
Defines a function to be called when a new touch point is pressed.final ObjectProperty<EventHandler<? super TouchEvent>>
Defines a function to be called when a touch point is released.final ObjectProperty<EventHandler<? super TouchEvent>>
Defines a function to be called when a touch point stays pressed and still.parentToLocal
(double x, double y) final ReadOnlyProperty<Boolean>
Whether or not theNode
is pressed.final <T extends Event>
voidremoveEventFilter
(EventType<T> eventType, EventHandler<? super T> eventFilter) Unregisters a previously registered event filter from this node.final <T extends Event>
voidremoveEventHandler
(EventType<T> eventType, EventHandler<? super T> eventHandler) Unregisters a previously registered event handler from this node.void
Requests that thisNode
get the input focus, and that thisNode
's top-level ancestor become the focused window.void
final DoubleProperty
final DoubleProperty
Defines the factor by which coordinates are scaled about the center of the object along the X axis of thisNode
.final DoubleProperty
Defines the factor by which coordinates are scaled about the center of the object along the Y axis of thisNode
.final DoubleProperty
Defines the factor by which coordinates are scaled about the center of the object along the Z axis of thisNode
.sceneToLocal
(double sceneX, double sceneY) protected void
sceneToLocal
(Point2D pt) sceneToLocal
(Point2D pt) final void
setCache
(boolean value) Sets the value of thecache
property.final void
setCacheHint
(CacheHint value) Sets the value of thecacheHint
property.final void
Sets the value of thecursor
property.final void
setDisable
(boolean value) Sets the value of thedisable
property.protected final void
setDisabled
(boolean value) Sets the value of thedisabled
property.final void
Sets the value of theeventDispatcher
property.protected final <T extends Event>
voidsetEventHandler
(EventType<T> eventType, EventHandler<? super T> eventHandler) Sets the handler to use for this event type.final void
setFocused
(boolean value) Sets the value of thefocused
property.final void
setFocusTraversable
(boolean value) Sets the value of thefocusTraversable
property.protected final void
setHover
(boolean value) Sets the value of thehover
property.final void
Sets the value of theid
property.void
setNodePeer
(NodePeer nodePeer) final void
setOnContextMenuRequested
(EventHandler<? super ContextMenuEvent> value) Sets the value of theonContextMenuRequested
property.final void
setOnDragDetected
(EventHandler<? super MouseEvent> value) Sets the value of theonDragDetected
property.final void
setOnDragDone
(EventHandler<? super DragEvent> value) Sets the value of theonDragDone
property.final void
setOnDragDropped
(EventHandler<? super DragEvent> value) Sets the value of theonDragDropped
property.final void
setOnDragEntered
(EventHandler<? super DragEvent> value) Sets the value of theonDragEntered
property.final void
setOnDragExited
(EventHandler<? super DragEvent> value) Sets the value of theonDragExited
property.final void
setOnDragOver
(EventHandler<? super DragEvent> value) Sets the value of theonDragOver
property.final void
setOnKeyPressed
(EventHandler<? super KeyEvent> value) Sets the value of theonKeyPressed
property.final void
setOnKeyReleased
(EventHandler<? super KeyEvent> value) Sets the value of theonKeyReleased
property.final void
setOnKeyTyped
(EventHandler<? super KeyEvent> value) Sets the value of theonKeyTyped
property.final void
setOnMouseDragged
(EventHandler<? super MouseEvent> value) Sets the value of theonMouseDragged
property.final void
setOnMouseEntered
(EventHandler<? super MouseEvent> value) Sets the value of theonMouseEntered
property.final void
setOnMouseExited
(EventHandler<? super MouseEvent> value) Sets the value of theonMouseExited
property.final void
setOnMouseMoved
(EventHandler<? super MouseEvent> value) Sets the value of theonMouseMoved
property.final void
setOnMousePressed
(EventHandler<? super MouseEvent> value) Sets the value of theonMousePressed
property.final void
setOnMouseReleased
(EventHandler<? super MouseEvent> value) Sets the value of theonMouseReleased
property.final void
setOnScroll
(EventHandler<? super ScrollEvent> value) Sets the value of theonScroll
property.final void
setOnSwipeDown
(EventHandler<? super SwipeEvent> value) Sets the value of theonSwipeDown
property.final void
setOnSwipeLeft
(EventHandler<? super SwipeEvent> value) Sets the value of theonSwipeLeft
property.final void
setOnSwipeRight
(EventHandler<? super SwipeEvent> value) Sets the value of theonSwipeRight
property.final void
setOnSwipeUp
(EventHandler<? super SwipeEvent> value) Sets the value of theonSwipeUp
property.final void
setOnTouchMoved
(EventHandler<? super TouchEvent> value) Sets the value of theonTouchMoved
property.final void
setOnTouchPressed
(EventHandler<? super TouchEvent> value) Sets the value of theonTouchPressed
property.final void
setOnTouchReleased
(EventHandler<? super TouchEvent> value) Sets the value of theonTouchReleased
property.final void
setOnTouchStationary
(EventHandler<? super TouchEvent> value) Sets the value of theonTouchStationary
property.protected final void
setPressed
(boolean value) Sets the value of thepressed
property.final void
setRotate
(double value) Sets the value of therotate
property.final void
setScaleX
(double value) Sets the value of thescaleX
property.final void
setScaleY
(double value) Sets the value of thescaleY
property.final void
setScaleZ
(double value) Sets the value of thescaleZ
property.void
Sets the value of thescene
property.final void
A string representation of the CSS style associated with this specificNode
.final void
setTranslateX
(double value) Sets the value of thetranslateX
property.final void
setTranslateY
(double value) Sets the value of thetranslateY
property.void
setUserData
(Object value) Convenience method for setting a single Object property that can be retrieved at a later date.protected boolean
snapshot
(SnapshotParameters params, WritableImage image) Takes a snapshot of this node and returns the rendered image when it is ready.startDragAndDrop
(TransferMode... transferModes) Confirms a potential drag and drop gesture that is recognized over thisNode
.final StringProperty
A string representation of the CSS style associated with this specificNode
.void
toBack()
Moves thisNode
to the back of its sibling nodes in terms of z-order.void
toFront()
Moves thisNode
to the front of its sibling nodes in terms of z-order.final DoubleProperty
final DoubleProperty
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasBlendModeProperty
getBlendMode, setBlendMode
Methods inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasClipProperty
getClip, setClip
Methods inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasEffectProperty
getEffect, setEffect
Methods inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasLayoutXProperty
getLayoutX, setLayoutX
Methods inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasLayoutYProperty
getLayoutY, setLayoutY
Methods inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasManagedProperty
isManaged, setManaged
Methods inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasMouseTransparentProperty
isMouseTransparent, setMouseTransparent
Methods inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasOnMouseClickedProperty
getOnMouseClicked, setOnMouseClicked
Methods inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasOpacityProperty
getOpacity, setOpacity
Methods inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasParentProperty
getParent, setParent
Methods inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasVisibleProperty
isVisible, setVisible
Methods inherited from interface javafx.scene.INode
getBaselineOffset, getContentBias, isResizable, relocate, resize, resizeRelocate
Methods inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.emul_coupling.LayoutMeasurableMixin
clearCache, getLayoutBounds, maxHeight, maxWidth, minHeight, minWidth, prefHeight, prefWidth
-
Property Details
-
parent
- Specified by:
parentProperty
in interfaceHasParentProperty
- Returns:
- the
parent
property - See Also:
-
scene
- See Also:
-
managed
- Specified by:
managedProperty
in interfaceHasManagedProperty
- Returns:
- the
managed
property - See Also:
-
mouseTransparent
- Specified by:
mouseTransparentProperty
in interfaceHasMouseTransparentProperty
- Returns:
- the
mouseTransparent
property - See Also:
-
onContextMenuRequested
Defines a function to be called when a context menu has been requested on thisNode
.- Since:
- JavaFX 2.1
- See Also:
-
onMouseClicked
Defines a function to be called when a mouse button has been clicked (pressed and released) on thisNode
.- Specified by:
onMouseClickedProperty
in interfaceHasOnMouseClickedProperty
- Returns:
- the
onMouseClicked
property - See Also:
-
visible
- Specified by:
visibleProperty
in interfaceHasVisibleProperty
- Returns:
- the
visible
property - See Also:
-
cursor
Defines the mouse cursor for thisNode
and subnodes. If null, then the cursor of the first parent node with a non-null cursor will be used. If no Node in the scene graph defines a cursor, then the cursor of theScene
will be used.- Default value:
- null
- See Also:
-
opacity
- Specified by:
opacityProperty
in interfaceHasOpacityProperty
- Returns:
- the
opacity
property - See Also:
-
clip
- Specified by:
clipProperty
in interfaceHasClipProperty
- Returns:
- the
clip
property - See Also:
-
blendMode
- Specified by:
blendModeProperty
in interfaceHasBlendModeProperty
- Returns:
- the
blendMode
property - See Also:
-
effect
- Specified by:
effectProperty
in interfaceHasEffectProperty
- Returns:
- the
effect
property - See Also:
-
layoutX
- Specified by:
layoutXProperty
in interfaceHasLayoutXProperty
- Returns:
- the
layoutX
property - See Also:
-
layoutY
- Specified by:
layoutYProperty
in interfaceHasLayoutYProperty
- Returns:
- the
layoutY
property - See Also:
-
cache
- See Also:
-
cacheHint
-
disabled
Indicates whether or not thisNode
is disabled. ANode
will become disabled ifdisable
is set totrue
on either itself or one of its ancestors in the scene graph.A disabled
Node
should render itself differently to indicate its disabled state to the user. Such disabled rendering is dependent on the implementation of theNode
. The shape classes contained injavafx.scene.shape
do not implement such rendering by default, therefore applications using shapes for handling input must implement appropriate disabled rendering themselves. The user-interface controls defined injavafx.scene.control
will implement disabled-sensitive rendering, however.A disabled
Node
does not receive mouse or key events.- Default value:
- false
- See Also:
-
disable
- See Also:
-
hover
Whether or not thisNode
is being hovered over. Typically this is due to the mouse being over the node, though it could be due to a pen hovering on a graphics tablet or other form of input.Note that current implementation of hover relies on mouse enter and exit events to determine whether this Node is in the hover state; this means that this feature is currently supported only on systems that have a mouse. Future implementations may provide alternative means of supporting hover.
- Default value:
- false
- See Also:
-
pressed
Whether or not theNode
is pressed. Typically this is true when the primary mouse button is down, though subclasses may define other mouse button state or key state to cause the node to be "pressed".- Default value:
- false
- See Also:
-
id
The id of thisNode
. This simple string identifier is useful for finding a specific Node within the scene graph. While the id of a Node should be unique within the scene graph, this uniqueness is not enforced. This is analogous to the "id" attribute on an HTML element (CSS ID Specification).For example, if a Node is given the id of "myId", then the lookup method can be used to find this node as follows:
scene.lookup("#myId");
.- Default value:
- null
- See Also:
-
style
A string representation of the CSS style associated with this specificNode
. This is analogous to the "style" attribute of an HTML element. Note that, like the HTML style attribute, this variable contains style properties and values and not the selector portion of a style rule.- Default value:
- empty string
- See Also:
-
focusTraversable
Specifies whether thisNode
should be a part of focus traversal cycle. When this property istrue
focus can be moved to thisNode
and from thisNode
using regular focus traversal keys. On a desktop such keys are usuallyTAB
for moving focus forward andSHIFT+TAB
for moving focus backward. When aScene
is created, the system gives focus to aNode
whosefocusTraversable
variable is true and that is eligible to receive the focus, unless the focus had been set explicitly via a call torequestFocus()
.- Default value:
- false
- See Also:
-
focused
Indicates whether thisNode
currently has the input focus. To have the input focus, a node must be theScene
's focus owner, and the scene must be in aStage
that is visible and active. SeerequestFocus()
for more information.- Default value:
- false
- See Also:
-
eventDispatcher
Specifies the event dispatcher for this node. The default event dispatcher sends the received events to the registered event handlers and filters. When replacing the value with a newEventDispatcher
, the new dispatcher should forward events to the replaced dispatcher to maintain the node's default event handling behavior. -
translateX
-
translateY
-
scaleX
Defines the factor by which coordinates are scaled about the center of the object along the X axis of thisNode
. This is used to stretch or shrink the node either manually or by using an animation.This scale factor is not included in
layoutBounds
by default, which makes it ideal for scaling the entire node after all effects and transforms have been taken into account.The pivot point about which the scale occurs is the center of the untransformed
layoutBounds
.- Default value:
- 1.0
- See Also:
-
scaleY
Defines the factor by which coordinates are scaled about the center of the object along the Y axis of thisNode
. This is used to stretch or shrink the node either manually or by using an animation.This scale factor is not included in
layoutBounds
by default, which makes it ideal for scaling the entire node after all effects and transforms have been taken into account.The pivot point about which the scale occurs is the center of the untransformed
layoutBounds
.- Default value:
- 1.0
- See Also:
-
scaleZ
Defines the factor by which coordinates are scaled about the center of the object along the Z axis of thisNode
. This is used to stretch or shrink the node either manually or by using an animation.This scale factor is not included in
layoutBounds
by default, which makes it ideal for scaling the entire node after all effects and transforms have been taken into account.The pivot point about which the scale occurs is the center of the untransformed
layoutBounds
.- Default value:
- 1.0
- See Also:
-
rotate
- See Also:
-
layoutBounds
The rectangular bounds that should be used for layout calculations for this node.layoutBounds
may differ from the visual bounds of the node and is computed differently depending on the node type.If the node type is resizable (
Region
,Control
, orWebView
) then the layoutBounds will always be0,0 width x height
. If the node type is not resizable (Shape
,Text
, orGroup
), then the layoutBounds are computed based on the node's geometric properties and does not include the node's clip, effect, or transforms. See individual class documentation for details.Note that the
layoutX
,layoutY
,translateX
, andtranslateY
variables are not included in the layoutBounds. This is important because layout code must first determine the current size and location of the node (using layoutBounds) and then setlayoutX
andlayoutY
to adjust the translation of the node so that it will have the desired layout position.Because the computation of layoutBounds is often tied to a node's geometric variables, it is an error to bind any such variables to an expression that depends upon
layoutBounds
. For example, the x or y variables of a shape should never be bound to layoutBounds for the purpose of positioning the node.The layoutBounds will never be null. Webfx note: this property is set only when the target toolkit reports a change by calling the SizeChangedCallback set on the LayoutMeasurable (ex: once an image is loaded so we now know the size of the image). So layoutBoundsProperty() should be used only to listen such changes.
- See Also:
-
onMouseMoved
Defines a function to be called when mouse cursor moves within thisNode
but no buttons have been pushed. -
onMousePressed
Defines a function to be called when a mouse button has been pressed on thisNode
. -
onMouseReleased
Defines a function to be called when a mouse button has been released on thisNode
. -
onMouseEntered
Defines a function to be called when the mouse enters thisNode
. -
onMouseExited
Defines a function to be called when the mouse exits thisNode
. -
onDragEntered
Defines a function to be called when drag gesture enters thisNode
. -
onDragExited
Defines a function to be called when drag gesture exits thisNode
. -
onMouseDragged
Defines a function to be called when a mouse button is pressed on thisNode
and then dragged. -
onDragDetected
Defines a function to be called when drag gesture has been detected. This is the right place to start drag and drop operation. -
onDragOver
Defines a function to be called when drag gesture progresses within thisNode
. -
onDragDropped
-
onDragDone
Defines a function to be called when thisNode
is a drag and drop gesture source after its data has been dropped on a drop target. ThetransferMode
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. -
onScroll
Defines a function to be called when user performs a scrolling action. -
onKeyPressed
Defines a function to be called when thisNode
or its childNode
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. -
onKeyReleased
Defines a function to be called when thisNode
or its childNode
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. -
onKeyTyped
Defines a function to be called when thisNode
or its childNode
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. -
onSwipeUp
Defines a function to be called when an upward swipe gesture centered over this node happens.- Since:
- JavaFX 2.2
- See Also:
-
onSwipeDown
Defines a function to be called when a downward swipe gesture centered over this node happens.- Since:
- JavaFX 2.2
- See Also:
-
onSwipeLeft
Defines a function to be called when a leftward swipe gesture centered over this node happens.- Since:
- JavaFX 2.2
- See Also:
-
onSwipeRight
Defines a function to be called when an rightward swipe gesture centered over this node happens.- Since:
- JavaFX 2.2
- See Also:
-
onTouchPressed
Defines a function to be called when a new touch point is pressed.- Since:
- JavaFX 2.2
- See Also:
-
onTouchMoved
Defines a function to be called when a touch point is moved.- Since:
- JavaFX 2.2
- See Also:
-
onTouchReleased
Defines a function to be called when a touch point is released.- Since:
- JavaFX 2.2
- See Also:
-
onTouchStationary
Defines a function to be called when a touch point stays pressed and still.- Since:
- JavaFX 2.2
- See Also:
-
-
Constructor Details
-
Node
public Node()
-
-
Method Details
-
parentProperty
- Specified by:
parentProperty
in interfaceHasParentProperty
- Returns:
- the
parent
property - See Also:
-
sceneProperty
- Returns:
- the
scene
property - See Also:
-
getScene
Gets the value of thescene
property. -
setScene
Sets the value of thescene
property.- Property description:
- Parameters:
scene
- the value for thescene
property- See Also:
-
managedProperty
- Specified by:
managedProperty
in interfaceHasManagedProperty
- Returns:
- the
managed
property - See Also:
-
mouseTransparentProperty
- Specified by:
mouseTransparentProperty
in interfaceHasMouseTransparentProperty
- Returns:
- the
mouseTransparent
property - See Also:
-
setOnContextMenuRequested
Sets the value of theonContextMenuRequested
property.- Property description:
- Defines a function to be called when a context menu
has been requested on this
Node
. - Parameters:
value
- the value for theonContextMenuRequested
property- Since:
- JavaFX 2.1
- See Also:
-
getOnContextMenuRequested
Gets the value of theonContextMenuRequested
property.- Property description:
- Defines a function to be called when a context menu
has been requested on this
Node
. - Returns:
- the value of the
onContextMenuRequested
property - Since:
- JavaFX 2.1
- See Also:
-
onContextMenuRequestedProperty
public final ObjectProperty<EventHandler<? super ContextMenuEvent>> onContextMenuRequestedProperty()Defines a function to be called when a context menu has been requested on thisNode
.- Returns:
- the event handler that is called when a context menu has been
requested on this
Node
- Since:
- JavaFX 2.1
- See Also:
-
onMouseClickedProperty
Defines a function to be called when a mouse button has been clicked (pressed and released) on thisNode
.- Specified by:
onMouseClickedProperty
in interfaceHasOnMouseClickedProperty
- Returns:
- the
onMouseClicked
property - See Also:
-
visibleProperty
- Specified by:
visibleProperty
in interfaceHasVisibleProperty
- Returns:
- the
visible
property - See Also:
-
setCursor
Sets the value of thecursor
property.- Property description:
- Defines the mouse cursor for this
Node
and subnodes. If null, then the cursor of the first parent node with a non-null cursor will be used. If no Node in the scene graph defines a cursor, then the cursor of theScene
will be used. - Default value:
- null
- Parameters:
value
- the value for thecursor
property- See Also:
-
getCursor
Gets the value of thecursor
property.- Property description:
- Defines the mouse cursor for this
Node
and subnodes. If null, then the cursor of the first parent node with a non-null cursor will be used. If no Node in the scene graph defines a cursor, then the cursor of theScene
will be used. - Default value:
- null
- Returns:
- the value of the
cursor
property - See Also:
-
cursorProperty
Defines the mouse cursor for thisNode
and subnodes. If null, then the cursor of the first parent node with a non-null cursor will be used. If no Node in the scene graph defines a cursor, then the cursor of theScene
will be used.- Default value:
- null
- Returns:
- the
cursor
property - See Also:
-
opacityProperty
- Specified by:
opacityProperty
in interfaceHasOpacityProperty
- Returns:
- the
opacity
property - See Also:
-
clipProperty
- Specified by:
clipProperty
in interfaceHasClipProperty
- Returns:
- the
clip
property - See Also:
-
blendModeProperty
- Specified by:
blendModeProperty
in interfaceHasBlendModeProperty
- Returns:
- the
blendMode
property - See Also:
-
effectProperty
- Specified by:
effectProperty
in interfaceHasEffectProperty
- Returns:
- the
effect
property - See Also:
-
layoutXProperty
- Specified by:
layoutXProperty
in interfaceHasLayoutXProperty
- Returns:
- the
layoutX
property - See Also:
-
layoutYProperty
- Specified by:
layoutYProperty
in interfaceHasLayoutYProperty
- Returns:
- the
layoutY
property - See Also:
-
cacheProperty
- Returns:
- the
cache
property - See Also:
-
setCache
public final void setCache(boolean value) Sets the value of thecache
property.- Property description:
- Parameters:
value
- the value for thecache
property- See Also:
-
isCache
public final boolean isCache()Gets the value of thecache
property.- Property description:
- Returns:
- the value of the
cache
property - See Also:
-
cacheHintProperty
- Returns:
- the
cacheHint
property - See Also:
-
setCacheHint
Sets the value of thecacheHint
property.- Property description:
- Parameters:
value
- the value for thecacheHint
property- See Also:
-
getCacheHint
Gets the value of thecacheHint
property.- Property description:
- Returns:
- the value of the
cacheHint
property - See Also:
-
setDisabled
protected final void setDisabled(boolean value) Sets the value of thedisabled
property.- Property description:
- Indicates whether or not this
Node
is disabled. ANode
will become disabled ifdisable
is set totrue
on either itself or one of its ancestors in the scene graph.A disabled
Node
should render itself differently to indicate its disabled state to the user. Such disabled rendering is dependent on the implementation of theNode
. The shape classes contained injavafx.scene.shape
do not implement such rendering by default, therefore applications using shapes for handling input must implement appropriate disabled rendering themselves. The user-interface controls defined injavafx.scene.control
will implement disabled-sensitive rendering, however.A disabled
Node
does not receive mouse or key events. - Default value:
- false
- Parameters:
value
- the value for thedisabled
property- See Also:
-
isDisabled
public final boolean isDisabled()Gets the value of thedisabled
property.- Property description:
- Indicates whether or not this
Node
is disabled. ANode
will become disabled ifdisable
is set totrue
on either itself or one of its ancestors in the scene graph.A disabled
Node
should render itself differently to indicate its disabled state to the user. Such disabled rendering is dependent on the implementation of theNode
. The shape classes contained injavafx.scene.shape
do not implement such rendering by default, therefore applications using shapes for handling input must implement appropriate disabled rendering themselves. The user-interface controls defined injavafx.scene.control
will implement disabled-sensitive rendering, however.A disabled
Node
does not receive mouse or key events. - Default value:
- false
- Returns:
- the value of the
disabled
property - See Also:
-
disabledProperty
Indicates whether or not thisNode
is disabled. ANode
will become disabled ifdisable
is set totrue
on either itself or one of its ancestors in the scene graph.A disabled
Node
should render itself differently to indicate its disabled state to the user. Such disabled rendering is dependent on the implementation of theNode
. The shape classes contained injavafx.scene.shape
do not implement such rendering by default, therefore applications using shapes for handling input must implement appropriate disabled rendering themselves. The user-interface controls defined injavafx.scene.control
will implement disabled-sensitive rendering, however.A disabled
Node
does not receive mouse or key events.- Default value:
- false
- Returns:
- the
disabled
property - See Also:
-
setDisable
public final void setDisable(boolean value) Sets the value of thedisable
property.- Property description:
- Parameters:
value
- the value for thedisable
property- See Also:
-
isDisable
public final boolean isDisable() -
disableProperty
- Returns:
- the
disable
property - See Also:
-
setHover
protected final void setHover(boolean value) Sets the value of thehover
property.- Property description:
- Whether or not this
Node
is being hovered over. Typically this is due to the mouse being over the node, though it could be due to a pen hovering on a graphics tablet or other form of input.Note that current implementation of hover relies on mouse enter and exit events to determine whether this Node is in the hover state; this means that this feature is currently supported only on systems that have a mouse. Future implementations may provide alternative means of supporting hover.
- Default value:
- false
- Parameters:
value
- the value for thehover
property- See Also:
-
isHover
public final boolean isHover() -
hoverProperty
Whether or not thisNode
is being hovered over. Typically this is due to the mouse being over the node, though it could be due to a pen hovering on a graphics tablet or other form of input.Note that current implementation of hover relies on mouse enter and exit events to determine whether this Node is in the hover state; this means that this feature is currently supported only on systems that have a mouse. Future implementations may provide alternative means of supporting hover.
- Default value:
- false
- Returns:
- the
hover
property - See Also:
-
setPressed
protected final void setPressed(boolean value) Sets the value of thepressed
property.- Property description:
- Whether or not the
Node
is pressed. Typically this is true when the primary mouse button is down, though subclasses may define other mouse button state or key state to cause the node to be "pressed". - Default value:
- false
- Parameters:
value
- the value for thepressed
property- See Also:
-
isPressed
public final boolean isPressed() -
pressedProperty
Whether or not theNode
is pressed. Typically this is true when the primary mouse button is down, though subclasses may define other mouse button state or key state to cause the node to be "pressed".- Default value:
- false
- Returns:
- the
pressed
property - See Also:
-
setId
Sets the value of theid
property.- Property description:
- The id of this
Node
. This simple string identifier is useful for finding a specific Node within the scene graph. While the id of a Node should be unique within the scene graph, this uniqueness is not enforced. This is analogous to the "id" attribute on an HTML element (CSS ID Specification).For example, if a Node is given the id of "myId", then the lookup method can be used to find this node as follows:
scene.lookup("#myId");
. - Default value:
- null
- Parameters:
value
- the value for theid
property- See Also:
-
getId
The id of thisNode
. This simple string identifier is useful for finding a specific Node within the scene graph. While the id of a Node should be unique within the scene graph, this uniqueness is not enforced. This is analogous to the "id" attribute on an HTML element (CSS ID Specification). -
idProperty
The id of thisNode
. This simple string identifier is useful for finding a specific Node within the scene graph. While the id of a Node should be unique within the scene graph, this uniqueness is not enforced. This is analogous to the "id" attribute on an HTML element (CSS ID Specification).For example, if a Node is given the id of "myId", then the lookup method can be used to find this node as follows:
scene.lookup("#myId");
.- Default value:
- null
- Returns:
- the
id
property - See Also:
-
getStyleClass
Description copied from interface:Styleable
A list of String identifiers which can be used to logically group Nodes, specifically for an external style engine. This variable is analogous to the "class" attribute on an HTML element and, as such, each element of the list is a style class to which this Node belongs.- Specified by:
getStyleClass
in interfaceStyleable
- See Also:
-
setStyle
A string representation of the CSS style associated with this specificNode
. This is analogous to the "style" attribute of an HTML element. Note that, like the HTML style attribute, this variable contains style properties and values and not the selector portion of a style rule.- Default value:
- empty string
- Parameters:
value
- The inline CSS style to use for thisNode
.null
is implicitly converted to an empty String.- See Also:
-
getStyle
A string representation of the CSS style associated with this specificNode
. This is analogous to the "style" attribute of an HTML element. Note that, like the HTML style attribute, this variable contains style properties and values and not the selector portion of a style rule. -
styleProperty
A string representation of the CSS style associated with this specificNode
. This is analogous to the "style" attribute of an HTML element. Note that, like the HTML style attribute, this variable contains style properties and values and not the selector portion of a style rule.- Default value:
- empty string
- Returns:
- the
style
property - See Also:
-
getTransforms
- Specified by:
getTransforms
in interfaceINode
-
getAllNodeTransforms
- Specified by:
getAllNodeTransforms
in interfaceINode
-
autosize
public void autosize() -
getProperties
Returns an observable map of properties on this node for use primarily by application developers.- Specified by:
getProperties
in interfaceINode
- Returns:
- an observable map of properties on this node for use primarily by application developers
-
hasProperties
public boolean hasProperties()Tests if Node has properties.- Specified by:
hasProperties
in interfaceINode
- Returns:
- true if node has properties.
-
requestFocus
public void requestFocus()Requests that thisNode
get the input focus, and that thisNode
's top-level ancestor become the focused window. To be eligible to receive the focus, the node must be part of a scene, it and all of its ancestors must be visible, and it must not be disabled. If this node is eligible, this function will cause it to become thisScene
's "focus owner". Each scene has at most one focus owner node. The focus owner will not actually have the input focus, however, unless the scene belongs to aStage
that is both visible and active. -
impl_traverse
Traverses from this node in the direction indicated. Note that this node need not actually have the focus, nor need it be focusTraversable. However, the node must be part of a scene, otherwise this request is ignored. -
setFocusTraversable
public final void setFocusTraversable(boolean value) Sets the value of thefocusTraversable
property.- Property description:
- Specifies whether this
Node
should be a part of focus traversal cycle. When this property istrue
focus can be moved to thisNode
and from thisNode
using regular focus traversal keys. On a desktop such keys are usuallyTAB
for moving focus forward andSHIFT+TAB
for moving focus backward. When aScene
is created, the system gives focus to aNode
whosefocusTraversable
variable is true and that is eligible to receive the focus, unless the focus had been set explicitly via a call torequestFocus()
. - Default value:
- false
- Parameters:
value
- the value for thefocusTraversable
property- See Also:
-
isFocusTraversable
public final boolean isFocusTraversable() -
focusTraversableProperty
Specifies whether thisNode
should be a part of focus traversal cycle. When this property istrue
focus can be moved to thisNode
and from thisNode
using regular focus traversal keys. On a desktop such keys are usuallyTAB
for moving focus forward andSHIFT+TAB
for moving focus backward. When aScene
is created, the system gives focus to aNode
whosefocusTraversable
variable is true and that is eligible to receive the focus, unless the focus had been set explicitly via a call torequestFocus()
.- Default value:
- false
- Returns:
- the
focusTraversable
property - See Also:
-
setFocused
public final void setFocused(boolean value) Sets the value of thefocused
property.- Property description:
- Indicates whether this
Node
currently has the input focus. To have the input focus, a node must be theScene
's focus owner, and the scene must be in aStage
that is visible and active. SeerequestFocus()
for more information. - Default value:
- false
- Parameters:
value
- the value for thefocused
property- See Also:
-
isFocused
public final boolean isFocused()Gets the value of thefocused
property.- Property description:
- Indicates whether this
Node
currently has the input focus. To have the input focus, a node must be theScene
's focus owner, and the scene must be in aStage
that is visible and active. SeerequestFocus()
for more information. - Default value:
- false
- Returns:
- the value of the
focused
property - See Also:
-
focusedProperty
Indicates whether thisNode
currently has the input focus. To have the input focus, a node must be theScene
's focus owner, and the scene must be in aStage
that is visible and active. SeerequestFocus()
for more information.- Default value:
- false
- Returns:
- the
focused
property - See Also:
-
setEventDispatcher
Sets the value of theeventDispatcher
property.- Property description:
- Specifies the event dispatcher for this node. The default event
dispatcher sends the received events to the registered event handlers and
filters. When replacing the value with a new
EventDispatcher
, the new dispatcher should forward events to the replaced dispatcher to maintain the node's default event handling behavior. - Parameters:
value
- the value for theeventDispatcher
property- See Also:
-
getEventDispatcher
Gets the value of theeventDispatcher
property.- Property description:
- Specifies the event dispatcher for this node. The default event
dispatcher sends the received events to the registered event handlers and
filters. When replacing the value with a new
EventDispatcher
, the new dispatcher should forward events to the replaced dispatcher to maintain the node's default event handling behavior. - Returns:
- the value of the
eventDispatcher
property - See Also:
-
eventDispatcherProperty
Specifies the event dispatcher for this node. The default event dispatcher sends the received events to the registered event handlers and filters. When replacing the value with a newEventDispatcher
, the new dispatcher should forward events to the replaced dispatcher to maintain the node's default event handling behavior.- Returns:
- the
eventDispatcher
property - See Also:
-
addEventHandler
public final <T extends Event> void addEventHandler(EventType<T> eventType, EventHandler<? super T> eventHandler) Registers an event handler to this node. The handler is called when the node receives anEvent
of the specified type during the bubbling phase of event delivery.- Type Parameters:
T
- the specific event class of the handler- Parameters:
eventType
- the type of the events to receive by the handlereventHandler
- the handler to register- Throws:
NullPointerException
- if the event type or handler is null
-
removeEventHandler
public final <T extends Event> void removeEventHandler(EventType<T> eventType, EventHandler<? super T> eventHandler) Unregisters a previously registered event handler from this node. One handler might have been registered for different event types, so the caller needs to specify the particular event type from which to unregister the handler.- Type Parameters:
T
- the specific event class of the handler- Parameters:
eventType
- the event type from which to unregistereventHandler
- the handler to unregister- Throws:
NullPointerException
- if the event type or handler is null
-
addEventFilter
public final <T extends Event> void addEventFilter(EventType<T> eventType, EventHandler<? super T> eventFilter) Registers an event filter to this node. The filter is called when the node receives anEvent
of the specified type during the capturing phase of event delivery.- Type Parameters:
T
- the specific event class of the filter- Parameters:
eventType
- the type of the events to receive by the filtereventFilter
- the filter to register- Throws:
NullPointerException
- if the event type or filter is null
-
removeEventFilter
public final <T extends Event> void removeEventFilter(EventType<T> eventType, EventHandler<? super T> eventFilter) Unregisters a previously registered event filter from this node. One filter might have been registered for different event types, so the caller needs to specify the particular event type from which to unregister the filter.- Type Parameters:
T
- the specific event class of the filter- Parameters:
eventType
- the event type from which to unregistereventFilter
- the filter to unregister- Throws:
NullPointerException
- if the event type or filter is null
-
setEventHandler
protected final <T extends Event> void setEventHandler(EventType<T> eventType, EventHandler<? super T> eventHandler) Sets the handler to use for this event type. There can only be one such handler specified at a time. This handler is guaranteed to be called as the last, after handlers added usingaddEventHandler(EventType, EventHandler)
. This is used for registering the user-defined onFoo event handlers.- Type Parameters:
T
- the specific event class of the handler- Parameters:
eventType
- the event type to associate with the given eventHandlereventHandler
- the handler to register, or null to unregister- Throws:
NullPointerException
- if the event type is null
-
buildEventDispatchChain
Construct an event dispatch chain for this node. The event dispatch chain contains all event dispatchers from the stage to this node.- Specified by:
buildEventDispatchChain
in interfaceEventTarget
- Parameters:
tail
- the initial chain to build from- Returns:
- the resulting event dispatch chain for this node
-
fireEvent
Fires the specified event. By default the event will travel through the hierarchy from the stage to this node. Any event filter encountered will be notified and can consume the event. If not consumed by the filters, the event handlers on this node are notified. If these don't consume the event eighter, the event will travel back the same path it arrived to this node. All event handlers encountered are called and can consume the event.This method must be called on the FX user thread.
- Parameters:
event
- the event to fire
-
getNodePeer
- Specified by:
getNodePeer
in interfaceINode
-
getOrCreateAndBindNodePeer
- Specified by:
getOrCreateAndBindNodePeer
in interfaceINode
-
setNodePeer
-
onNodePeerReady
-
requestPeerFocus
public void requestPeerFocus() -
getLayoutMeasurable
- Specified by:
getLayoutMeasurable
in interfaceLayoutMeasurableMixin
-
shouldUseLayoutMeasurable
protected boolean shouldUseLayoutMeasurable() -
onPeerSizeChanged
public void onPeerSizeChanged() -
getBoundsInLocal
-
createLayoutMeasurable
-
setTranslateX
public final void setTranslateX(double value) Sets the value of thetranslateX
property.- Property description:
- Parameters:
value
- the value for thetranslateX
property- See Also:
-
getTranslateX
public final double getTranslateX()Gets the value of thetranslateX
property.- Property description:
- Returns:
- the value of the
translateX
property - See Also:
-
translateXProperty
- Returns:
- the
translateX
property - See Also:
-
setTranslateY
public final void setTranslateY(double value) Sets the value of thetranslateY
property.- Property description:
- Parameters:
value
- the value for thetranslateY
property- See Also:
-
getTranslateY
public final double getTranslateY()Gets the value of thetranslateY
property.- Property description:
- Returns:
- the value of the
translateY
property - See Also:
-
translateYProperty
- Returns:
- the
translateY
property - See Also:
-
setScaleX
public final void setScaleX(double value) Sets the value of thescaleX
property.- Property description:
- Defines the factor by which coordinates are scaled about the center of the
object along the X axis of this
Node
. This is used to stretch or shrink the node either manually or by using an animation.This scale factor is not included in
layoutBounds
by default, which makes it ideal for scaling the entire node after all effects and transforms have been taken into account.The pivot point about which the scale occurs is the center of the untransformed
layoutBounds
. - Default value:
- 1.0
- Parameters:
value
- the value for thescaleX
property- See Also:
-
getScaleX
public final double getScaleX()Gets the value of thescaleX
property.- Property description:
- Defines the factor by which coordinates are scaled about the center of the
object along the X axis of this
Node
. This is used to stretch or shrink the node either manually or by using an animation.This scale factor is not included in
layoutBounds
by default, which makes it ideal for scaling the entire node after all effects and transforms have been taken into account.The pivot point about which the scale occurs is the center of the untransformed
layoutBounds
. - Default value:
- 1.0
- Returns:
- the value of the
scaleX
property - See Also:
-
scaleXProperty
Defines the factor by which coordinates are scaled about the center of the object along the X axis of thisNode
. This is used to stretch or shrink the node either manually or by using an animation.This scale factor is not included in
layoutBounds
by default, which makes it ideal for scaling the entire node after all effects and transforms have been taken into account.The pivot point about which the scale occurs is the center of the untransformed
layoutBounds
.- Default value:
- 1.0
- Returns:
- the scaleX for this
Node
- See Also:
-
setScaleY
public final void setScaleY(double value) Sets the value of thescaleY
property.- Property description:
- Defines the factor by which coordinates are scaled about the center of the
object along the Y axis of this
Node
. This is used to stretch or shrink the node either manually or by using an animation.This scale factor is not included in
layoutBounds
by default, which makes it ideal for scaling the entire node after all effects and transforms have been taken into account.The pivot point about which the scale occurs is the center of the untransformed
layoutBounds
. - Default value:
- 1.0
- Parameters:
value
- the value for thescaleY
property- See Also:
-
getScaleY
public final double getScaleY()Gets the value of thescaleY
property.- Property description:
- Defines the factor by which coordinates are scaled about the center of the
object along the Y axis of this
Node
. This is used to stretch or shrink the node either manually or by using an animation.This scale factor is not included in
layoutBounds
by default, which makes it ideal for scaling the entire node after all effects and transforms have been taken into account.The pivot point about which the scale occurs is the center of the untransformed
layoutBounds
. - Default value:
- 1.0
- Returns:
- the value of the
scaleY
property - See Also:
-
scaleYProperty
Defines the factor by which coordinates are scaled about the center of the object along the Y axis of thisNode
. This is used to stretch or shrink the node either manually or by using an animation.This scale factor is not included in
layoutBounds
by default, which makes it ideal for scaling the entire node after all effects and transforms have been taken into account.The pivot point about which the scale occurs is the center of the untransformed
layoutBounds
.- Default value:
- 1.0
- Returns:
- the scaleY for this
Node
- See Also:
-
setScaleZ
public final void setScaleZ(double value) Sets the value of thescaleZ
property.- Property description:
- Defines the factor by which coordinates are scaled about the center of the
object along the Z axis of this
Node
. This is used to stretch or shrink the node either manually or by using an animation.This scale factor is not included in
layoutBounds
by default, which makes it ideal for scaling the entire node after all effects and transforms have been taken into account.The pivot point about which the scale occurs is the center of the untransformed
layoutBounds
. - Default value:
- 1.0
- Parameters:
value
- the value for thescaleZ
property- See Also:
-
getScaleZ
public final double getScaleZ()Gets the value of thescaleZ
property.- Property description:
- Defines the factor by which coordinates are scaled about the center of the
object along the Z axis of this
Node
. This is used to stretch or shrink the node either manually or by using an animation.This scale factor is not included in
layoutBounds
by default, which makes it ideal for scaling the entire node after all effects and transforms have been taken into account.The pivot point about which the scale occurs is the center of the untransformed
layoutBounds
. - Default value:
- 1.0
- Returns:
- the value of the
scaleZ
property - See Also:
-
scaleZProperty
Defines the factor by which coordinates are scaled about the center of the object along the Z axis of thisNode
. This is used to stretch or shrink the node either manually or by using an animation.This scale factor is not included in
layoutBounds
by default, which makes it ideal for scaling the entire node after all effects and transforms have been taken into account.The pivot point about which the scale occurs is the center of the untransformed
layoutBounds
.- Default value:
- 1.0
- Returns:
- the scaleZ for this
Node
- See Also:
-
setRotate
public final void setRotate(double value) Sets the value of therotate
property.- Property description:
- Parameters:
value
- the value for therotate
property- See Also:
-
getRotate
public final double getRotate()Gets the value of therotate
property.- Property description:
- Returns:
- the value of the
rotate
property - See Also:
-
rotateProperty
- Returns:
- the
rotate
property - See Also:
-
layoutBoundsProperty
The rectangular bounds that should be used for layout calculations for this node.layoutBounds
may differ from the visual bounds of the node and is computed differently depending on the node type.If the node type is resizable (
Region
,Control
, orWebView
) then the layoutBounds will always be0,0 width x height
. If the node type is not resizable (Shape
,Text
, orGroup
), then the layoutBounds are computed based on the node's geometric properties and does not include the node's clip, effect, or transforms. See individual class documentation for details.Note that the
layoutX
,layoutY
,translateX
, andtranslateY
variables are not included in the layoutBounds. This is important because layout code must first determine the current size and location of the node (using layoutBounds) and then setlayoutX
andlayoutY
to adjust the translation of the node so that it will have the desired layout position.Because the computation of layoutBounds is often tied to a node's geometric variables, it is an error to bind any such variables to an expression that depends upon
layoutBounds
. For example, the x or y variables of a shape should never be bound to layoutBounds for the purpose of positioning the node.The layoutBounds will never be null. Webfx note: this property is set only when the target toolkit reports a change by calling the SizeChangedCallback set on the LayoutMeasurable (ex: once an image is loaded so we now know the size of the image). So layoutBoundsProperty() should be used only to listen such changes.
- Returns:
- the
layoutBounds
property
-
impl_getLayoutBounds
-
impl_minWidth
protected double impl_minWidth(double height) -
impl_maxWidth
protected double impl_maxWidth(double height) -
impl_minHeight
protected double impl_minHeight(double width) -
impl_maxHeight
protected double impl_maxHeight(double width) -
impl_prefWidth
protected double impl_prefWidth(double height) -
impl_prefHeight
protected double impl_prefHeight(double width) -
impl_computeLayoutBounds
Returns geometric bounds, but may be over-ridden by a subclass. -
impl_computeGeomBounds
Computes the geometric bounds for this Node. This method is abstract and must be implemented by each Node subclass. -
localToScene
Transforms a point from the local coordinate space of thisNode
into the coordinate space of its scene. Note that if this node is in aSubScene
, the result is in the subscene coordinates, not that ofScene
.- Parameters:
localX
- x coordinate of a point in Node's spacelocalY
- y coordinate of a point in Node's space- Returns:
- scene coordinates of the point or null if Node is not in a
Window
-
localToScene
-
localToParent
Transforms in place the specified point from local coords to parent coords. Made package private for the sake of testing. -
localToParent
-
localToParent
-
sceneToLocal
-
sceneToLocal
-
sceneToLocal
-
parentToLocal
-
localToScreen
Transforms a point from the local coordinate space of thisNode
into the coordinate space of itsScreen
.- Parameters:
localX
- x coordinate of a point in Node's spacelocalY
- y coordinate of a point in Node's space- Returns:
- screen coordinates of the point or null if Node is not in a
Window
- Since:
- JavaFX 8.0
-
localToScreen
Transforms a point from the local coordinate space of thisNode
into the coordinate space of itsScreen
.- Parameters:
localPoint
- a point in Node's space- Returns:
- screen coordinates of the point or null if Node is not in a
Window
- Since:
- JavaFX 8.0
-
localToScreen
Transforms a point from the local coordinate space of thisNode
into the coordinate space of itsScreen
.- Parameters:
localX
- x coordinate of a point in Node's spacelocalY
- y coordinate of a point in Node's spacelocalZ
- z coordinate of a point in Node's space- Returns:
- screen coordinates of the point or null if Node is not in a
Window
- Since:
- JavaFX 8.0
-
impl_isTreeVisible
public final boolean impl_isTreeVisible() -
localToScreen
Transforms a bounds from the local coordinate space of thisNode
into the coordinate space of itsScreen
.- Parameters:
localBounds
- bounds in Node's space- Returns:
- the bounds in screen coordinates or null if Node is not in a
Window
- Since:
- JavaFX 8.0
-
setUserData
Convenience method for setting a single Object property that can be retrieved at a later date. This is functionally equivalent to calling the getProperties().put(Object key, Object value) method. This can later be retrieved by callinggetUserData()
.- Parameters:
value
- The value to be stored - this can later be retrieved by callinggetUserData()
.
-
getUserData
Returns a previously set Object property, or null if no such property has been set using thesetUserData(java.lang.Object)
method.- Returns:
- The Object that was previously set, or null if no property has been set or if null was set.
-
setOnMouseMoved
Sets the value of theonMouseMoved
property.- Property description:
- Defines a function to be called when mouse cursor moves within
this
Node
but no buttons have been pushed. - Parameters:
value
- the value for theonMouseMoved
property- See Also:
-
getOnMouseMoved
Gets the value of theonMouseMoved
property.- Property description:
- Defines a function to be called when mouse cursor moves within
this
Node
but no buttons have been pushed. - Returns:
- the value of the
onMouseMoved
property - See Also:
-
onMouseMovedProperty
Defines a function to be called when mouse cursor moves within thisNode
but no buttons have been pushed.- Returns:
- the event handler that is called when a mouse cursor moves
within this
Node
but no buttons have been pushed - See Also:
-
setOnMousePressed
Sets the value of theonMousePressed
property.- Property description:
- Defines a function to be called when a mouse button
has been pressed on this
Node
. - Parameters:
value
- the value for theonMousePressed
property- See Also:
-
getOnMousePressed
Gets the value of theonMousePressed
property.- Property description:
- Defines a function to be called when a mouse button
has been pressed on this
Node
. - Returns:
- the value of the
onMousePressed
property - See Also:
-
onMousePressedProperty
Defines a function to be called when a mouse button has been pressed on thisNode
.- Returns:
- the event handler that is called when a mouse button has been
pressed on this
Node
- See Also:
-
setOnMouseReleased
Sets the value of theonMouseReleased
property.- Property description:
- Defines a function to be called when a mouse button
has been released on this
Node
. - Parameters:
value
- the value for theonMouseReleased
property- See Also:
-
getOnMouseReleased
Gets the value of theonMouseReleased
property.- Property description:
- Defines a function to be called when a mouse button
has been released on this
Node
. - Returns:
- the value of the
onMouseReleased
property - See Also:
-
onMouseReleasedProperty
Defines a function to be called when a mouse button has been released on thisNode
.- Returns:
- the event handler that is called when a mouse button has been
released on this
Node
- See Also:
-
setOnMouseEntered
Sets the value of theonMouseEntered
property.- Property description:
- Defines a function to be called when the mouse enters this
Node
. - Parameters:
value
- the value for theonMouseEntered
property- See Also:
-
getOnMouseEntered
Gets the value of theonMouseEntered
property.- Property description:
- Defines a function to be called when the mouse enters this
Node
. - Returns:
- the value of the
onMouseEntered
property - See Also:
-
onMouseEnteredProperty
Defines a function to be called when the mouse enters thisNode
.- Returns:
- the
onMouseEntered
property - See Also:
-
setOnMouseExited
Sets the value of theonMouseExited
property.- Property description:
- Defines a function to be called when the mouse exits this
Node
. - Parameters:
value
- the value for theonMouseExited
property- See Also:
-
getOnMouseExited
Gets the value of theonMouseExited
property.- Property description:
- Defines a function to be called when the mouse exits this
Node
. - Returns:
- the value of the
onMouseExited
property - See Also:
-
onMouseExitedProperty
Defines a function to be called when the mouse exits thisNode
.- Returns:
- the
onMouseExited
property - See Also:
-
setOnMouseDragged
Sets the value of theonMouseDragged
property.- Property description:
- Defines a function to be called when a mouse button is pressed
on this
Node
and then dragged. - Parameters:
value
- the value for theonMouseDragged
property- See Also:
-
getOnMouseDragged
Gets the value of theonMouseDragged
property.- Property description:
- Defines a function to be called when a mouse button is pressed
on this
Node
and then dragged. - Returns:
- the value of the
onMouseDragged
property - See Also:
-
setOnDragEntered
Sets the value of theonDragEntered
property.- Property description:
- Defines a function to be called when drag gesture
enters this
Node
. - Parameters:
value
- the value for theonDragEntered
property- See Also:
-
getOnDragEntered
Gets the value of theonDragEntered
property.- Property description:
- Defines a function to be called when drag gesture
enters this
Node
. - Returns:
- the value of the
onDragEntered
property - See Also:
-
onDragEnteredProperty
Defines a function to be called when drag gesture enters thisNode
.- Returns:
- the event handler that is called when drag gesture enters this
Node
- See Also:
-
setOnDragExited
Sets the value of theonDragExited
property.- Property description:
- Defines a function to be called when drag gesture
exits this
Node
. - Parameters:
value
- the value for theonDragExited
property- See Also:
-
getOnDragExited
Gets the value of theonDragExited
property.- Property description:
- Defines a function to be called when drag gesture
exits this
Node
. - Returns:
- the value of the
onDragExited
property - See Also:
-
onDragExitedProperty
Defines a function to be called when drag gesture exits thisNode
.- Returns:
- the event handler that is called when drag gesture exits this
Node
- See Also:
-
onMouseDraggedProperty
Defines a function to be called when a mouse button is pressed on thisNode
and then dragged.- Returns:
- the event handler that is called when a mouse button is pressed
on this
Node
and then dragged - See Also:
-
setOnDragDetected
Sets the value of theonDragDetected
property.- Property description:
- Defines a function to be called when drag gesture has been detected. This is the right place to start drag and drop operation.
- Parameters:
value
- the value for theonDragDetected
property- See Also:
-
getOnDragDetected
Gets the value of theonDragDetected
property.- Property description:
- Defines a function to be called when drag gesture has been detected. This is the right place to start drag and drop operation.
- Returns:
- the value of the
onDragDetected
property - See Also:
-
onDragDetectedProperty
Defines a function to be called when drag gesture has been detected. This is the right place to start drag and drop operation.- Returns:
- the event handler that is called when drag gesture has been detected
- See Also:
-
setOnDragOver
Sets the value of theonDragOver
property.- Property description:
- Defines a function to be called when drag gesture progresses within
this
Node
. - Parameters:
value
- the value for theonDragOver
property- See Also:
-
getOnDragOver
Gets the value of theonDragOver
property.- Property description:
- Defines a function to be called when drag gesture progresses within
this
Node
. - Returns:
- the value of the
onDragOver
property - See Also:
-
onDragOverProperty
Defines a function to be called when drag gesture progresses within thisNode
.- Returns:
- the event handler that is called when drag gesture progresses
within this
Node
- See Also:
-
setOnDragDropped
Sets the value of theonDragDropped
property. -
getOnDragDropped
Gets the value of theonDragDropped
property. -
onDragDroppedProperty
Defines a function to be called when the mouse button is released on thisNode
during drag and drop gesture. Transfer of data from theDragEvent
'sdragboard
should happen in this function.- Returns:
- the event handler that is called when the mouse button is
released on this
Node
- See Also:
-
setOnDragDone
Sets the value of theonDragDone
property.- Property description:
- Defines a function to be called when this
Node
is a drag and drop gesture source after its data has been dropped on a drop target. ThetransferMode
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. - Parameters:
value
- the value for theonDragDone
property- See Also:
-
getOnDragDone
Gets the value of theonDragDone
property.- Property description:
- Defines a function to be called when this
Node
is a drag and drop gesture source after its data has been dropped on a drop target. ThetransferMode
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. - Returns:
- the value of the
onDragDone
property - See Also:
-
onDragDoneProperty
Defines a function to be called when thisNode
is a drag and drop gesture source after its data has been dropped on a drop target. ThetransferMode
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.- Returns:
- the event handler that is called when this
Node
is a drag and drop gesture source after its data has been dropped on a drop target - See Also:
-
startDragAndDrop
Confirms a potential drag and drop gesture that is recognized over thisNode
. Can be called only from a DRAG_DETECTED event handler. The returnedDragboard
is used to transfer data during the drag and drop gesture. Placing thisNode
's data on theDragboard
also identifies thisNode
as the source of the drag and drop gesture. More detail about drag and drop gestures is described in the overivew ofDragEvent
.- Parameters:
transferModes
- The supportedTransferMode
(s) of thisNode
- Returns:
- A
Dragboard
to place thisNode
's data on - Throws:
IllegalStateException
- if drag and drop cannot be started at this moment (it's called outside ofDRAG_DETECTED
event handling or this node is not in scene).- See Also:
-
setOnScroll
Sets the value of theonScroll
property.- Property description:
- Defines a function to be called when user performs a scrolling action.
- Parameters:
value
- the value for theonScroll
property- See Also:
-
getOnScroll
Gets the value of theonScroll
property.- Property description:
- Defines a function to be called when user performs a scrolling action.
- Returns:
- the value of the
onScroll
property - See Also:
-
onScrollProperty
Defines a function to be called when user performs a scrolling action.- Returns:
- the event handler that is called when user performs a scrolling action
- See Also:
-
snapshot
Takes a snapshot of this node and returns the rendered image when it is ready. CSS and layout processing will be done for the node, and any of its children, prior to rendering it. The entire destination image is cleared to the fillPaint
specified by the SnapshotParameters. This node is then rendered to the image. If the viewport specified by the SnapshotParameters is null, the upper-left pixel of theboundsInParent
of this node, after first applying the transform specified by the SnapshotParameters, is mapped to the upper-left pixel (0,0) in the image. If a non-null viewport is specified, the upper-left pixel of the viewport is mapped to upper-left pixel (0,0) in the image. In both cases, this mapping to (0,0) of the image is done with an integer translation. The portion of the node that is outside of the rendered image 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.
NOTE: In order for CSS and layout to function correctly, the node must be part of a Scene (the Scene may be attached to a Stage, but need not be).
- Parameters:
params
- the snapshot parameters containing attributes that will control the rendering. If the SnapshotParameters object is null, then the Scene's attributes will be used if this node is part of a scene, or default attributes will be used if this node is not part of a scene.image
- the writable image that will be used to hold the rendered node. It may be null in which case a new WritableImage will be constructed. The new image is constructed using integer width and height values that are derived either from the transformed bounds of this Node or from the size of the viewport as specified in the SnapShotParameters. These integer values are chosen such that the image will wholly contain the bounds of this Node or the specified viewport. If the image is non-null, the node 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 bounds or viewport.- Returns:
- the rendered image
- Throws:
IllegalStateException
- if this method is called on a thread other than the JavaFX Application Thread.- Since:
- JavaFX 2.2
-
setOnKeyPressed
Sets the value of theonKeyPressed
property.- Property description:
- Defines a function to be called when this
Node
or its childNode
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. - Parameters:
value
- the value for theonKeyPressed
property- See Also:
-
getOnKeyPressed
Gets the value of theonKeyPressed
property.- Property description:
- Defines a function to be called when this
Node
or its childNode
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. - Returns:
- the value of the
onKeyPressed
property - See Also:
-
onKeyPressedProperty
Defines a function to be called when thisNode
or its childNode
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.- Returns:
- the event handler that is called when this
Node
or its childNode
has input focus and a key has been pressed - See Also:
-
setOnKeyReleased
Sets the value of theonKeyReleased
property.- Property description:
- Defines a function to be called when this
Node
or its childNode
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. - Parameters:
value
- the value for theonKeyReleased
property- See Also:
-
getOnKeyReleased
Gets the value of theonKeyReleased
property.- Property description:
- Defines a function to be called when this
Node
or its childNode
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. - Returns:
- the value of the
onKeyReleased
property - See Also:
-
onKeyReleasedProperty
Defines a function to be called when thisNode
or its childNode
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.- Returns:
- the event handler that is called when this
Node
or its childNode
has input focus and a key has been released - See Also:
-
setOnKeyTyped
Sets the value of theonKeyTyped
property.- Property description:
- Defines a function to be called when this
Node
or its childNode
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. - Parameters:
value
- the value for theonKeyTyped
property- See Also:
-
getOnKeyTyped
Gets the value of theonKeyTyped
property.- Property description:
- Defines a function to be called when this
Node
or its childNode
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. - Returns:
- the value of the
onKeyTyped
property - See Also:
-
onKeyTypedProperty
Defines a function to be called when thisNode
or its childNode
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.- Returns:
- the event handler that is called when this
Node
or its childNode
has input focus and a key has been typed - See Also:
-
setOnSwipeUp
Sets the value of theonSwipeUp
property.- Property description:
- Defines a function to be called when an upward swipe gesture centered over this node happens.
- Parameters:
value
- the value for theonSwipeUp
property- Since:
- JavaFX 2.2
- See Also:
-
getOnSwipeUp
Gets the value of theonSwipeUp
property.- Property description:
- Defines a function to be called when an upward swipe gesture centered over this node happens.
- Returns:
- the value of the
onSwipeUp
property - Since:
- JavaFX 2.2
- See Also:
-
onSwipeUpProperty
Defines a function to be called when an upward swipe gesture centered over this node happens.- Returns:
- the event handler that is called when an upward swipe gesture centered over this node happens
- Since:
- JavaFX 2.2
- See Also:
-
setOnSwipeDown
Sets the value of theonSwipeDown
property.- Property description:
- Defines a function to be called when a downward swipe gesture centered over this node happens.
- Parameters:
value
- the value for theonSwipeDown
property- Since:
- JavaFX 2.2
- See Also:
-
getOnSwipeDown
Gets the value of theonSwipeDown
property.- Property description:
- Defines a function to be called when a downward swipe gesture centered over this node happens.
- Returns:
- the value of the
onSwipeDown
property - Since:
- JavaFX 2.2
- See Also:
-
onSwipeDownProperty
Defines a function to be called when a downward swipe gesture centered over this node happens.- Returns:
- the event handler that is called when a downward swipe gesture centered over this node happens
- Since:
- JavaFX 2.2
- See Also:
-
setOnSwipeLeft
Sets the value of theonSwipeLeft
property.- Property description:
- Defines a function to be called when a leftward swipe gesture centered over this node happens.
- Parameters:
value
- the value for theonSwipeLeft
property- Since:
- JavaFX 2.2
- See Also:
-
getOnSwipeLeft
Gets the value of theonSwipeLeft
property.- Property description:
- Defines a function to be called when a leftward swipe gesture centered over this node happens.
- Returns:
- the value of the
onSwipeLeft
property - Since:
- JavaFX 2.2
- See Also:
-
onSwipeLeftProperty
Defines a function to be called when a leftward swipe gesture centered over this node happens.- Returns:
- the event handler that is called when a leftward swipe gesture centered over this node happens
- Since:
- JavaFX 2.2
- See Also:
-
setOnSwipeRight
Sets the value of theonSwipeRight
property.- Property description:
- Defines a function to be called when an rightward swipe gesture centered over this node happens.
- Parameters:
value
- the value for theonSwipeRight
property- Since:
- JavaFX 2.2
- See Also:
-
getOnSwipeRight
Gets the value of theonSwipeRight
property.- Property description:
- Defines a function to be called when an rightward swipe gesture centered over this node happens.
- Returns:
- the value of the
onSwipeRight
property - Since:
- JavaFX 2.2
- See Also:
-
onSwipeRightProperty
Defines a function to be called when an rightward swipe gesture centered over this node happens.- Returns:
- the event handler that is called when an rightward swipe gesture centered over this node happens
- Since:
- JavaFX 2.2
- See Also:
-
setOnTouchPressed
Sets the value of theonTouchPressed
property.- Property description:
- Defines a function to be called when a new touch point is pressed.
- Parameters:
value
- the value for theonTouchPressed
property- Since:
- JavaFX 2.2
- See Also:
-
getOnTouchPressed
Gets the value of theonTouchPressed
property.- Property description:
- Defines a function to be called when a new touch point is pressed.
- Returns:
- the value of the
onTouchPressed
property - Since:
- JavaFX 2.2
- See Also:
-
onTouchPressedProperty
Defines a function to be called when a new touch point is pressed.- Returns:
- the event handler that is called when a new touch point is pressed
- Since:
- JavaFX 2.2
- See Also:
-
setOnTouchMoved
Sets the value of theonTouchMoved
property.- Property description:
- Defines a function to be called when a touch point is moved.
- Parameters:
value
- the value for theonTouchMoved
property- Since:
- JavaFX 2.2
- See Also:
-
getOnTouchMoved
Gets the value of theonTouchMoved
property.- Property description:
- Defines a function to be called when a touch point is moved.
- Returns:
- the value of the
onTouchMoved
property - Since:
- JavaFX 2.2
- See Also:
-
onTouchMovedProperty
Defines a function to be called when a touch point is moved.- Returns:
- the event handler that is called when a touch point is moved
- Since:
- JavaFX 2.2
- See Also:
-
setOnTouchReleased
Sets the value of theonTouchReleased
property.- Property description:
- Defines a function to be called when a touch point is released.
- Parameters:
value
- the value for theonTouchReleased
property- Since:
- JavaFX 2.2
- See Also:
-
getOnTouchReleased
Gets the value of theonTouchReleased
property.- Property description:
- Defines a function to be called when a touch point is released.
- Returns:
- the value of the
onTouchReleased
property - Since:
- JavaFX 2.2
- See Also:
-
onTouchReleasedProperty
Defines a function to be called when a touch point is released.- Returns:
- the event handler that is called when a touch point is released
- Since:
- JavaFX 2.2
- See Also:
-
setOnTouchStationary
Sets the value of theonTouchStationary
property.- Property description:
- Defines a function to be called when a touch point stays pressed and still.
- Parameters:
value
- the value for theonTouchStationary
property- Since:
- JavaFX 2.2
- See Also:
-
getOnTouchStationary
Gets the value of theonTouchStationary
property.- Property description:
- Defines a function to be called when a touch point stays pressed and still.
- Returns:
- the value of the
onTouchStationary
property - Since:
- JavaFX 2.2
- See Also:
-
onTouchStationaryProperty
Defines a function to be called when a touch point stays pressed and still.- Returns:
- the event handler that is called when a touch point stays pressed and still
- Since:
- JavaFX 2.2
- See Also:
-
toBack
public void toBack()Moves thisNode
to the back of its sibling nodes in terms of z-order. This is accomplished by moving thisNode
to the first position in its parent'scontent
ObservableList. This function has no effect if thisNode
is not part of a group. -
toFront
public void toFront()Moves thisNode
to the front of its sibling nodes in terms of z-order. This is accomplished by moving thisNode
to the last position in its parent'scontent
ObservableList. This function has no effect if thisNode
is not part of a group.
-