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
PropertiesTypePropertyDescriptionfinal BooleanPropertyfinal ObjectProperty<Cursor>Defines the mouse cursor for thisNodeand subnodes.final ReadOnlyBooleanPropertyIndicates whether or not thisNodeis disabled.final BooleanPropertyfinal ObjectProperty<EventDispatcher>Specifies the event dispatcher for this node.final ReadOnlyBooleanPropertyIndicates whether thisNodecurrently has the input focus.final BooleanPropertySpecifies whether thisNodeshould be a part of focus traversal cycle.final ReadOnlyBooleanPropertyWhether or not thisNodeis being hovered over.final StringPropertyThe 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 thisNodeis 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 thisNodeduring 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 thisNodeor its childNodehas input focus and a key has been pressed.final ObjectProperty<EventHandler<? super KeyEvent>>Defines a function to be called when thisNodeor its childNodehas input focus and a key has been released.final ObjectProperty<EventHandler<? super KeyEvent>>Defines a function to be called when thisNodeor its childNodehas 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 thisNodeand 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 thisNodebut 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 ReadOnlyBooleanPropertyWhether or not theNodeis pressed.final DoublePropertyfinal DoublePropertyDefines the factor by which coordinates are scaled about the center of the object along the X axis of thisNode.final DoublePropertyDefines the factor by which coordinates are scaled about the center of the object along the Y axis of thisNode.final DoublePropertyDefines the factor by which coordinates are scaled about the center of the object along the Z axis of thisNode.final StringPropertyA string representation of the CSS style associated with this specificNode.final DoublePropertyfinal DoubleProperty -
Field Summary
Fields inherited from interface javafx.scene.INode
BASELINE_OFFSET_SAME_AS_HEIGHT -
Constructor Summary
Constructors -
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.voidautosize()Construct an event dispatch chain for this node.final BooleanPropertyprotected voidcreateLayoutMeasurable(NodePeer nodePeer) final ObjectProperty<Cursor>Defines the mouse cursor for thisNodeand subnodes.final ReadOnlyBooleanPropertyIndicates whether or not thisNodeis disabled.final BooleanPropertyfinal ObjectProperty<EventDispatcher>Specifies the event dispatcher for this node.final voidFires the specified event.final ReadOnlyBooleanPropertyIndicates whether thisNodecurrently has the input focus.final BooleanPropertySpecifies whether thisNodeshould be a part of focus traversal cycle.final CacheHintGets the value of thecacheHintproperty.final CursorGets the value of thecursorproperty.final EventDispatcherGets the value of theeventDispatcherproperty.final StringgetId()The id of thisNode.final EventHandler<? super ContextMenuEvent>Gets the value of theonContextMenuRequestedproperty.final EventHandler<? super MouseEvent>Gets the value of theonDragDetectedproperty.final EventHandler<? super DragEvent>Gets the value of theonDragDoneproperty.final EventHandler<? super DragEvent>Gets the value of theonDragDroppedproperty.final EventHandler<? super DragEvent>Gets the value of theonDragEnteredproperty.final EventHandler<? super DragEvent>Gets the value of theonDragExitedproperty.final EventHandler<? super DragEvent>Gets the value of theonDragOverproperty.final EventHandler<? super KeyEvent>Gets the value of theonKeyPressedproperty.final EventHandler<? super KeyEvent>Gets the value of theonKeyReleasedproperty.final EventHandler<? super KeyEvent>Gets the value of theonKeyTypedproperty.final EventHandler<? super MouseEvent>Gets the value of theonMouseDraggedproperty.final EventHandler<? super MouseEvent>Gets the value of theonMouseEnteredproperty.final EventHandler<? super MouseEvent>Gets the value of theonMouseExitedproperty.final EventHandler<? super MouseEvent>Gets the value of theonMouseMovedproperty.final EventHandler<? super MouseEvent>Gets the value of theonMousePressedproperty.final EventHandler<? super MouseEvent>Gets the value of theonMouseReleasedproperty.final EventHandler<? super ScrollEvent>Gets the value of theonScrollproperty.final EventHandler<? super SwipeEvent>Gets the value of theonSwipeDownproperty.final EventHandler<? super SwipeEvent>Gets the value of theonSwipeLeftproperty.final EventHandler<? super SwipeEvent>Gets the value of theonSwipeRightproperty.final EventHandler<? super SwipeEvent>Gets the value of theonSwipeUpproperty.final EventHandler<? super TouchEvent>Gets the value of theonTouchMovedproperty.final EventHandler<? super TouchEvent>Gets the value of theonTouchPressedproperty.final EventHandler<? super TouchEvent>Gets the value of theonTouchReleasedproperty.final EventHandler<? super TouchEvent>Gets the value of theonTouchStationaryproperty.final ObservableMap<Object,Object> Returns an observable map of properties on this node for use primarily by application developers.final doubleGets the value of therotateproperty.final doubleGets the value of thescaleXproperty.final doubleGets the value of thescaleYproperty.final doubleGets the value of thescaleZproperty.getScene()Gets the value of thesceneproperty.final StringgetStyle()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 doubleGets the value of thetranslateXproperty.final doubleGets the value of thetranslateYproperty.Returns a previously set Object property, or null if no such property has been set using thesetUserData(java.lang.Object)method.booleanTests if Node has properties.final ReadOnlyBooleanPropertyWhether or not thisNodeis being hovered over.final StringPropertyThe id of thisNode.abstract BaseBoundsimpl_computeGeomBounds(BaseBounds bounds, BaseTransform tx) Computes the geometric bounds for this Node.protected BoundsReturns geometric bounds, but may be over-ridden by a subclass.protected Boundsfinal booleanprotected doubleimpl_maxHeight(double width) protected doubleimpl_maxWidth(double height) protected doubleimpl_minHeight(double width) protected doubleimpl_minWidth(double height) protected doubleimpl_prefHeight(double width) protected doubleimpl_prefWidth(double height) final booleanimpl_traverse(Direction dir) Traverses from this node in the direction indicated.final booleanisCache()Gets the value of thecacheproperty.final booleanGets the value of thedisableproperty.final booleanGets the value of thedisabledproperty.final booleanGets the value of thefocusedproperty.final booleanGets the value of thefocusTraversableproperty.final booleanisHover()Gets the value of thehoverproperty.final booleanGets the value of thepressedproperty.The rectangular bounds that should be used for layout calculations for this node.localToParent(double localX, double localY) voidlocalToParent(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 thisNodeinto the coordinate space of its scene.protected voidlocalToScene(Point2D pt) localToScreen(double localX, double localY) Transforms a point from the local coordinate space of thisNodeinto the coordinate space of itsScreen.localToScreen(double localX, double localY, double localZ) Transforms a point from the local coordinate space of thisNodeinto the coordinate space of itsScreen.localToScreen(Bounds localBounds) Transforms a bounds from the local coordinate space of thisNodeinto the coordinate space of itsScreen.localToScreen(Point2D localPoint) Transforms a point from the local coordinate space of thisNodeinto 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 thisNodeis 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 thisNodeduring 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 thisNodeor its childNodehas input focus and a key has been pressed.final ObjectProperty<EventHandler<? super KeyEvent>>Defines a function to be called when thisNodeor its childNodehas input focus and a key has been released.final ObjectProperty<EventHandler<? super KeyEvent>>Defines a function to be called when thisNodeor its childNodehas 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 thisNodeand 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 thisNodebut 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.voidonNodePeerReady(Consumer<NodePeer> handler) voidfinal 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 ReadOnlyBooleanPropertyWhether or not theNodeis 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.voidRequests that thisNodeget the input focus, and that thisNode's top-level ancestor become the focused window.voidfinal DoublePropertyfinal DoublePropertyDefines the factor by which coordinates are scaled about the center of the object along the X axis of thisNode.final DoublePropertyDefines the factor by which coordinates are scaled about the center of the object along the Y axis of thisNode.final DoublePropertyDefines 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 voidsceneToLocal(Point2D pt) sceneToLocal(Point2D pt) final voidsetCache(boolean value) Sets the value of thecacheproperty.final voidsetCacheHint(CacheHint value) Sets the value of thecacheHintproperty.final voidSets the value of thecursorproperty.final voidsetDisable(boolean value) Sets the value of thedisableproperty.protected final voidsetDisabled(boolean value) Sets the value of thedisabledproperty.final voidSets the value of theeventDispatcherproperty.protected final <T extends Event>
voidsetEventHandler(EventType<T> eventType, EventHandler<? super T> eventHandler) Sets the handler to use for this event type.final voidsetFocused(boolean value) Sets the value of thefocusedproperty.final voidsetFocusTraversable(boolean value) Sets the value of thefocusTraversableproperty.protected final voidsetHover(boolean value) Sets the value of thehoverproperty.final voidSets the value of theidproperty.voidsetNodePeer(NodePeer nodePeer) final voidsetOnContextMenuRequested(EventHandler<? super ContextMenuEvent> value) Sets the value of theonContextMenuRequestedproperty.final voidsetOnDragDetected(EventHandler<? super MouseEvent> value) Sets the value of theonDragDetectedproperty.final voidsetOnDragDone(EventHandler<? super DragEvent> value) Sets the value of theonDragDoneproperty.final voidsetOnDragDropped(EventHandler<? super DragEvent> value) Sets the value of theonDragDroppedproperty.final voidsetOnDragEntered(EventHandler<? super DragEvent> value) Sets the value of theonDragEnteredproperty.final voidsetOnDragExited(EventHandler<? super DragEvent> value) Sets the value of theonDragExitedproperty.final voidsetOnDragOver(EventHandler<? super DragEvent> value) Sets the value of theonDragOverproperty.final voidsetOnKeyPressed(EventHandler<? super KeyEvent> value) Sets the value of theonKeyPressedproperty.final voidsetOnKeyReleased(EventHandler<? super KeyEvent> value) Sets the value of theonKeyReleasedproperty.final voidsetOnKeyTyped(EventHandler<? super KeyEvent> value) Sets the value of theonKeyTypedproperty.final voidsetOnMouseDragged(EventHandler<? super MouseEvent> value) Sets the value of theonMouseDraggedproperty.final voidsetOnMouseEntered(EventHandler<? super MouseEvent> value) Sets the value of theonMouseEnteredproperty.final voidsetOnMouseExited(EventHandler<? super MouseEvent> value) Sets the value of theonMouseExitedproperty.final voidsetOnMouseMoved(EventHandler<? super MouseEvent> value) Sets the value of theonMouseMovedproperty.final voidsetOnMousePressed(EventHandler<? super MouseEvent> value) Sets the value of theonMousePressedproperty.final voidsetOnMouseReleased(EventHandler<? super MouseEvent> value) Sets the value of theonMouseReleasedproperty.final voidsetOnScroll(EventHandler<? super ScrollEvent> value) Sets the value of theonScrollproperty.final voidsetOnSwipeDown(EventHandler<? super SwipeEvent> value) Sets the value of theonSwipeDownproperty.final voidsetOnSwipeLeft(EventHandler<? super SwipeEvent> value) Sets the value of theonSwipeLeftproperty.final voidsetOnSwipeRight(EventHandler<? super SwipeEvent> value) Sets the value of theonSwipeRightproperty.final voidsetOnSwipeUp(EventHandler<? super SwipeEvent> value) Sets the value of theonSwipeUpproperty.final voidsetOnTouchMoved(EventHandler<? super TouchEvent> value) Sets the value of theonTouchMovedproperty.final voidsetOnTouchPressed(EventHandler<? super TouchEvent> value) Sets the value of theonTouchPressedproperty.final voidsetOnTouchReleased(EventHandler<? super TouchEvent> value) Sets the value of theonTouchReleasedproperty.final voidsetOnTouchStationary(EventHandler<? super TouchEvent> value) Sets the value of theonTouchStationaryproperty.protected final voidsetPressed(boolean value) Sets the value of thepressedproperty.final voidsetRotate(double value) Sets the value of therotateproperty.final voidsetScaleX(double value) Sets the value of thescaleXproperty.final voidsetScaleY(double value) Sets the value of thescaleYproperty.final voidsetScaleZ(double value) Sets the value of thescaleZproperty.voidSets the value of thesceneproperty.final voidA string representation of the CSS style associated with this specificNode.final voidsetTranslateX(double value) Sets the value of thetranslateXproperty.final voidsetTranslateY(double value) Sets the value of thetranslateYproperty.voidsetUserData(Object value) Convenience method for setting a single Object property that can be retrieved at a later date.protected booleansnapshot(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 StringPropertyA string representation of the CSS style associated with this specificNode.voidtoBack()Moves thisNodeto the back of its sibling nodes in terms of z-order.voidtoFront()Moves thisNodeto the front of its sibling nodes in terms of z-order.final DoublePropertyfinal DoublePropertyMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasBlendModeProperty
getBlendMode, setBlendModeMethods inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasClipProperty
getClip, setClipMethods inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasEffectProperty
getEffect, setEffectMethods inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasLayoutXProperty
getLayoutX, setLayoutXMethods inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasLayoutYProperty
getLayoutY, setLayoutYMethods inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasManagedProperty
isManaged, setManagedMethods inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasMouseTransparentProperty
isMouseTransparent, setMouseTransparentMethods inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasOnMouseClickedProperty
getOnMouseClicked, setOnMouseClickedMethods inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasOpacityProperty
getOpacity, setOpacityMethods inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasParentProperty
getParent, setParentMethods inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasVisibleProperty
isVisible, setVisibleMethods inherited from interface javafx.scene.INode
getBaselineOffset, getContentBias, isResizable, relocate, resize, resizeRelocateMethods 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:
parentPropertyin interfaceHasParentProperty- Returns:
- the
parentproperty - See Also:
-
scene
- See Also:
-
managed
- Specified by:
managedPropertyin interfaceHasManagedProperty- Returns:
- the
managedproperty - See Also:
-
mouseTransparent
- Specified by:
mouseTransparentPropertyin interfaceHasMouseTransparentProperty- Returns:
- the
mouseTransparentproperty - 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:
onMouseClickedPropertyin interfaceHasOnMouseClickedProperty- Returns:
- the
onMouseClickedproperty - See Also:
-
visible
- Specified by:
visiblePropertyin interfaceHasVisibleProperty- Returns:
- the
visibleproperty - See Also:
-
cursor
Defines the mouse cursor for thisNodeand 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 theScenewill be used.- Default value:
- null
- See Also:
-
opacity
- Specified by:
opacityPropertyin interfaceHasOpacityProperty- Returns:
- the
opacityproperty - See Also:
-
clip
- Specified by:
clipPropertyin interfaceHasClipProperty- Returns:
- the
clipproperty - See Also:
-
blendMode
- Specified by:
blendModePropertyin interfaceHasBlendModeProperty- Returns:
- the
blendModeproperty - See Also:
-
effect
- Specified by:
effectPropertyin interfaceHasEffectProperty- Returns:
- the
effectproperty - See Also:
-
layoutX
- Specified by:
layoutXPropertyin interfaceHasLayoutXProperty- Returns:
- the
layoutXproperty - See Also:
-
layoutY
- Specified by:
layoutYPropertyin interfaceHasLayoutYProperty- Returns:
- the
layoutYproperty - See Also:
-
cache
- See Also:
-
cacheHint
-
disabled
Indicates whether or not thisNodeis disabled. ANodewill become disabled ifdisableis set totrueon either itself or one of its ancestors in the scene graph.A disabled
Nodeshould 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.shapedo 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.controlwill implement disabled-sensitive rendering, however.A disabled
Nodedoes not receive mouse or key events.- Default value:
- false
- See Also:
-
disable
- See Also:
-
hover
Whether or not thisNodeis 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 theNodeis 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 thisNodeshould be a part of focus traversal cycle. When this property istruefocus can be moved to thisNodeand from thisNodeusing regular focus traversal keys. On a desktop such keys are usuallyTABfor moving focus forward andSHIFT+TABfor moving focus backward. When aSceneis created, the system gives focus to aNodewhosefocusTraversablevariable 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 thisNodecurrently has the input focus. To have the input focus, a node must be theScene's focus owner, and the scene must be in aStagethat 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
layoutBoundsby 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
layoutBoundsby 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
layoutBoundsby 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.layoutBoundsmay 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, andtranslateYvariables 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 setlayoutXandlayoutYto 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 thisNodebut 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 thisNodeand 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 thisNodeis a drag and drop gesture source after its data has been dropped on a drop target. ThetransferModeof the event shows what just happened at the drop target. IftransferModehas 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. AtransferModethat has the valueNONEindicates 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 thisNodeor its childNodehas 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 thisNodeor its childNodehas 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 thisNodeor its childNodehas 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:
parentPropertyin interfaceHasParentProperty- Returns:
- the
parentproperty - See Also:
-
sceneProperty
- Returns:
- the
sceneproperty - See Also:
-
getScene
Gets the value of thesceneproperty. -
setScene
Sets the value of thesceneproperty.- Property description:
- Parameters:
scene- the value for thesceneproperty- See Also:
-
managedProperty
- Specified by:
managedPropertyin interfaceHasManagedProperty- Returns:
- the
managedproperty - See Also:
-
mouseTransparentProperty
- Specified by:
mouseTransparentPropertyin interfaceHasMouseTransparentProperty- Returns:
- the
mouseTransparentproperty - See Also:
-
setOnContextMenuRequested
Sets the value of theonContextMenuRequestedproperty.- Property description:
- Defines a function to be called when a context menu
has been requested on this
Node. - Parameters:
value- the value for theonContextMenuRequestedproperty- Since:
- JavaFX 2.1
- See Also:
-
getOnContextMenuRequested
Gets the value of theonContextMenuRequestedproperty.- Property description:
- Defines a function to be called when a context menu
has been requested on this
Node. - Returns:
- the value of the
onContextMenuRequestedproperty - 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:
onMouseClickedPropertyin interfaceHasOnMouseClickedProperty- Returns:
- the
onMouseClickedproperty - See Also:
-
visibleProperty
- Specified by:
visiblePropertyin interfaceHasVisibleProperty- Returns:
- the
visibleproperty - See Also:
-
setCursor
Sets the value of thecursorproperty.- Property description:
- Defines the mouse cursor for this
Nodeand 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 theScenewill be used. - Default value:
- null
- Parameters:
value- the value for thecursorproperty- See Also:
-
getCursor
Gets the value of thecursorproperty.- Property description:
- Defines the mouse cursor for this
Nodeand 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 theScenewill be used. - Default value:
- null
- Returns:
- the value of the
cursorproperty - See Also:
-
cursorProperty
Defines the mouse cursor for thisNodeand 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 theScenewill be used.- Default value:
- null
- Returns:
- the
cursorproperty - See Also:
-
opacityProperty
- Specified by:
opacityPropertyin interfaceHasOpacityProperty- Returns:
- the
opacityproperty - See Also:
-
clipProperty
- Specified by:
clipPropertyin interfaceHasClipProperty- Returns:
- the
clipproperty - See Also:
-
blendModeProperty
- Specified by:
blendModePropertyin interfaceHasBlendModeProperty- Returns:
- the
blendModeproperty - See Also:
-
effectProperty
- Specified by:
effectPropertyin interfaceHasEffectProperty- Returns:
- the
effectproperty - See Also:
-
layoutXProperty
- Specified by:
layoutXPropertyin interfaceHasLayoutXProperty- Returns:
- the
layoutXproperty - See Also:
-
layoutYProperty
- Specified by:
layoutYPropertyin interfaceHasLayoutYProperty- Returns:
- the
layoutYproperty - See Also:
-
cacheProperty
- Returns:
- the
cacheproperty - See Also:
-
setCache
public final void setCache(boolean value) Sets the value of thecacheproperty.- Property description:
- Parameters:
value- the value for thecacheproperty- See Also:
-
isCache
public final boolean isCache()Gets the value of thecacheproperty.- Property description:
- Returns:
- the value of the
cacheproperty - See Also:
-
cacheHintProperty
- Returns:
- the
cacheHintproperty - See Also:
-
setCacheHint
Sets the value of thecacheHintproperty.- Property description:
- Parameters:
value- the value for thecacheHintproperty- See Also:
-
getCacheHint
Gets the value of thecacheHintproperty.- Property description:
- Returns:
- the value of the
cacheHintproperty - See Also:
-
setDisabled
protected final void setDisabled(boolean value) Sets the value of thedisabledproperty.- Property description:
- Indicates whether or not this
Nodeis disabled. ANodewill become disabled ifdisableis set totrueon either itself or one of its ancestors in the scene graph.A disabled
Nodeshould 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.shapedo 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.controlwill implement disabled-sensitive rendering, however.A disabled
Nodedoes not receive mouse or key events. - Default value:
- false
- Parameters:
value- the value for thedisabledproperty- See Also:
-
isDisabled
public final boolean isDisabled()Gets the value of thedisabledproperty.- Property description:
- Indicates whether or not this
Nodeis disabled. ANodewill become disabled ifdisableis set totrueon either itself or one of its ancestors in the scene graph.A disabled
Nodeshould 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.shapedo 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.controlwill implement disabled-sensitive rendering, however.A disabled
Nodedoes not receive mouse or key events. - Default value:
- false
- Returns:
- the value of the
disabledproperty - See Also:
-
disabledProperty
Indicates whether or not thisNodeis disabled. ANodewill become disabled ifdisableis set totrueon either itself or one of its ancestors in the scene graph.A disabled
Nodeshould 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.shapedo 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.controlwill implement disabled-sensitive rendering, however.A disabled
Nodedoes not receive mouse or key events.- Default value:
- false
- Returns:
- the
disabledproperty - See Also:
-
setDisable
public final void setDisable(boolean value) Sets the value of thedisableproperty.- Property description:
- Parameters:
value- the value for thedisableproperty- See Also:
-
isDisable
public final boolean isDisable()Gets the value of thedisableproperty.- Property description:
- Returns:
- the value of the
disableproperty - See Also:
-
disableProperty
- Returns:
- the
disableproperty - See Also:
-
setHover
protected final void setHover(boolean value) Sets the value of thehoverproperty.- Property description:
- Whether or not this
Nodeis 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 thehoverproperty- See Also:
-
isHover
public final boolean isHover()Gets the value of thehoverproperty.- Property description:
- Whether or not this
Nodeis 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 value of the
hoverproperty - See Also:
-
hoverProperty
Whether or not thisNodeis 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
hoverproperty - See Also:
-
setPressed
protected final void setPressed(boolean value) Sets the value of thepressedproperty.- Property description:
- Whether or not the
Nodeis 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 thepressedproperty- See Also:
-
isPressed
public final boolean isPressed()Gets the value of thepressedproperty.- Property description:
- Whether or not the
Nodeis 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 value of the
pressedproperty - See Also:
-
pressedProperty
Whether or not theNodeis 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
pressedproperty - See Also:
-
setId
Sets the value of theidproperty.- 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 theidproperty- 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
idproperty - See Also:
-
getStyleClass
Description copied from interface:StyleableA 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:
getStyleClassin 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.nullis 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
styleproperty - See Also:
-
getTransforms
- Specified by:
getTransformsin interfaceINode
-
getAllNodeTransforms
- Specified by:
getAllNodeTransformsin interfaceINode
-
autosize
public void autosize() -
getProperties
Returns an observable map of properties on this node for use primarily by application developers.- Specified by:
getPropertiesin 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:
hasPropertiesin interfaceINode- Returns:
- true if node has properties.
-
requestFocus
public void requestFocus()Requests that thisNodeget 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 aStagethat 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 thefocusTraversableproperty.- Property description:
- Specifies whether this
Nodeshould be a part of focus traversal cycle. When this property istruefocus can be moved to thisNodeand from thisNodeusing regular focus traversal keys. On a desktop such keys are usuallyTABfor moving focus forward andSHIFT+TABfor moving focus backward. When aSceneis created, the system gives focus to aNodewhosefocusTraversablevariable 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 thefocusTraversableproperty- See Also:
-
isFocusTraversable
public final boolean isFocusTraversable()Gets the value of thefocusTraversableproperty.- Property description:
- Specifies whether this
Nodeshould be a part of focus traversal cycle. When this property istruefocus can be moved to thisNodeand from thisNodeusing regular focus traversal keys. On a desktop such keys are usuallyTABfor moving focus forward andSHIFT+TABfor moving focus backward. When aSceneis created, the system gives focus to aNodewhosefocusTraversablevariable 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 value of the
focusTraversableproperty - See Also:
-
focusTraversableProperty
Specifies whether thisNodeshould be a part of focus traversal cycle. When this property istruefocus can be moved to thisNodeand from thisNodeusing regular focus traversal keys. On a desktop such keys are usuallyTABfor moving focus forward andSHIFT+TABfor moving focus backward. When aSceneis created, the system gives focus to aNodewhosefocusTraversablevariable 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
focusTraversableproperty - See Also:
-
setFocused
public final void setFocused(boolean value) Sets the value of thefocusedproperty.- Property description:
- Indicates whether this
Nodecurrently has the input focus. To have the input focus, a node must be theScene's focus owner, and the scene must be in aStagethat is visible and active. SeerequestFocus()for more information. - Default value:
- false
- Parameters:
value- the value for thefocusedproperty- See Also:
-
isFocused
public final boolean isFocused()Gets the value of thefocusedproperty.- Property description:
- Indicates whether this
Nodecurrently has the input focus. To have the input focus, a node must be theScene's focus owner, and the scene must be in aStagethat is visible and active. SeerequestFocus()for more information. - Default value:
- false
- Returns:
- the value of the
focusedproperty - See Also:
-
focusedProperty
Indicates whether thisNodecurrently has the input focus. To have the input focus, a node must be theScene's focus owner, and the scene must be in aStagethat is visible and active. SeerequestFocus()for more information.- Default value:
- false
- Returns:
- the
focusedproperty - See Also:
-
setEventDispatcher
Sets the value of theeventDispatcherproperty.- 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 theeventDispatcherproperty- See Also:
-
getEventDispatcher
Gets the value of theeventDispatcherproperty.- 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
eventDispatcherproperty - 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
eventDispatcherproperty - 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 anEventof 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 anEventof 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:
buildEventDispatchChainin 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:
getNodePeerin interfaceINode
-
getOrCreateAndBindNodePeer
- Specified by:
getOrCreateAndBindNodePeerin interfaceINode
-
setNodePeer
-
onNodePeerReady
-
requestPeerFocus
public void requestPeerFocus() -
getLayoutMeasurable
- Specified by:
getLayoutMeasurablein interfaceLayoutMeasurableMixin
-
shouldUseLayoutMeasurable
protected boolean shouldUseLayoutMeasurable() -
onPeerSizeChanged
public void onPeerSizeChanged() -
getBoundsInLocal
-
createLayoutMeasurable
-
setTranslateX
public final void setTranslateX(double value) Sets the value of thetranslateXproperty.- Property description:
- Parameters:
value- the value for thetranslateXproperty- See Also:
-
getTranslateX
public final double getTranslateX()Gets the value of thetranslateXproperty.- Property description:
- Returns:
- the value of the
translateXproperty - See Also:
-
translateXProperty
- Returns:
- the
translateXproperty - See Also:
-
setTranslateY
public final void setTranslateY(double value) Sets the value of thetranslateYproperty.- Property description:
- Parameters:
value- the value for thetranslateYproperty- See Also:
-
getTranslateY
public final double getTranslateY()Gets the value of thetranslateYproperty.- Property description:
- Returns:
- the value of the
translateYproperty - See Also:
-
translateYProperty
- Returns:
- the
translateYproperty - See Also:
-
setScaleX
public final void setScaleX(double value) Sets the value of thescaleXproperty.- 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
layoutBoundsby 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 thescaleXproperty- See Also:
-
getScaleX
public final double getScaleX()Gets the value of thescaleXproperty.- 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
layoutBoundsby 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
scaleXproperty - 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
layoutBoundsby 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 thescaleYproperty.- 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
layoutBoundsby 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 thescaleYproperty- See Also:
-
getScaleY
public final double getScaleY()Gets the value of thescaleYproperty.- 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
layoutBoundsby 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
scaleYproperty - 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
layoutBoundsby 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 thescaleZproperty.- 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
layoutBoundsby 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 thescaleZproperty- See Also:
-
getScaleZ
public final double getScaleZ()Gets the value of thescaleZproperty.- 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
layoutBoundsby 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
scaleZproperty - 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
layoutBoundsby 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 therotateproperty.- Property description:
- Parameters:
value- the value for therotateproperty- See Also:
-
getRotate
public final double getRotate()Gets the value of therotateproperty.- Property description:
- Returns:
- the value of the
rotateproperty - See Also:
-
rotateProperty
- Returns:
- the
rotateproperty - See Also:
-
layoutBoundsProperty
The rectangular bounds that should be used for layout calculations for this node.layoutBoundsmay 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, andtranslateYvariables 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 setlayoutXandlayoutYto 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
layoutBoundsproperty
-
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 thisNodeinto 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 thisNodeinto 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 thisNodeinto 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 thisNodeinto 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 thisNodeinto 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 theonMouseMovedproperty.- Property description:
- Defines a function to be called when mouse cursor moves within
this
Nodebut no buttons have been pushed. - Parameters:
value- the value for theonMouseMovedproperty- See Also:
-
getOnMouseMoved
Gets the value of theonMouseMovedproperty.- Property description:
- Defines a function to be called when mouse cursor moves within
this
Nodebut no buttons have been pushed. - Returns:
- the value of the
onMouseMovedproperty - See Also:
-
onMouseMovedProperty
Defines a function to be called when mouse cursor moves within thisNodebut no buttons have been pushed.- Returns:
- the event handler that is called when a mouse cursor moves
within this
Nodebut no buttons have been pushed - See Also:
-
setOnMousePressed
Sets the value of theonMousePressedproperty.- Property description:
- Defines a function to be called when a mouse button
has been pressed on this
Node. - Parameters:
value- the value for theonMousePressedproperty- See Also:
-
getOnMousePressed
Gets the value of theonMousePressedproperty.- Property description:
- Defines a function to be called when a mouse button
has been pressed on this
Node. - Returns:
- the value of the
onMousePressedproperty - 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 theonMouseReleasedproperty.- Property description:
- Defines a function to be called when a mouse button
has been released on this
Node. - Parameters:
value- the value for theonMouseReleasedproperty- See Also:
-
getOnMouseReleased
Gets the value of theonMouseReleasedproperty.- Property description:
- Defines a function to be called when a mouse button
has been released on this
Node. - Returns:
- the value of the
onMouseReleasedproperty - 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 theonMouseEnteredproperty.- Property description:
- Defines a function to be called when the mouse enters this
Node. - Parameters:
value- the value for theonMouseEnteredproperty- See Also:
-
getOnMouseEntered
Gets the value of theonMouseEnteredproperty.- Property description:
- Defines a function to be called when the mouse enters this
Node. - Returns:
- the value of the
onMouseEnteredproperty - See Also:
-
onMouseEnteredProperty
Defines a function to be called when the mouse enters thisNode.- Returns:
- the
onMouseEnteredproperty - See Also:
-
setOnMouseExited
Sets the value of theonMouseExitedproperty.- Property description:
- Defines a function to be called when the mouse exits this
Node. - Parameters:
value- the value for theonMouseExitedproperty- See Also:
-
getOnMouseExited
Gets the value of theonMouseExitedproperty.- Property description:
- Defines a function to be called when the mouse exits this
Node. - Returns:
- the value of the
onMouseExitedproperty - See Also:
-
onMouseExitedProperty
Defines a function to be called when the mouse exits thisNode.- Returns:
- the
onMouseExitedproperty - See Also:
-
setOnMouseDragged
Sets the value of theonMouseDraggedproperty.- Property description:
- Defines a function to be called when a mouse button is pressed
on this
Nodeand then dragged. - Parameters:
value- the value for theonMouseDraggedproperty- See Also:
-
getOnMouseDragged
Gets the value of theonMouseDraggedproperty.- Property description:
- Defines a function to be called when a mouse button is pressed
on this
Nodeand then dragged. - Returns:
- the value of the
onMouseDraggedproperty - See Also:
-
setOnDragEntered
Sets the value of theonDragEnteredproperty.- Property description:
- Defines a function to be called when drag gesture
enters this
Node. - Parameters:
value- the value for theonDragEnteredproperty- See Also:
-
getOnDragEntered
Gets the value of theonDragEnteredproperty.- Property description:
- Defines a function to be called when drag gesture
enters this
Node. - Returns:
- the value of the
onDragEnteredproperty - 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 theonDragExitedproperty.- Property description:
- Defines a function to be called when drag gesture
exits this
Node. - Parameters:
value- the value for theonDragExitedproperty- See Also:
-
getOnDragExited
Gets the value of theonDragExitedproperty.- Property description:
- Defines a function to be called when drag gesture
exits this
Node. - Returns:
- the value of the
onDragExitedproperty - 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 thisNodeand then dragged.- Returns:
- the event handler that is called when a mouse button is pressed
on this
Nodeand then dragged - See Also:
-
setOnDragDetected
Sets the value of theonDragDetectedproperty.- 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 theonDragDetectedproperty- See Also:
-
getOnDragDetected
Gets the value of theonDragDetectedproperty.- 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
onDragDetectedproperty - 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 theonDragOverproperty.- Property description:
- Defines a function to be called when drag gesture progresses within
this
Node. - Parameters:
value- the value for theonDragOverproperty- See Also:
-
getOnDragOver
Gets the value of theonDragOverproperty.- Property description:
- Defines a function to be called when drag gesture progresses within
this
Node. - Returns:
- the value of the
onDragOverproperty - 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 theonDragDroppedproperty. -
getOnDragDropped
Gets the value of theonDragDroppedproperty. -
onDragDroppedProperty
Defines a function to be called when the mouse button is released on thisNodeduring drag and drop gesture. Transfer of data from theDragEvent'sdragboardshould 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 theonDragDoneproperty.- Property description:
- Defines a function to be called when this
Nodeis a drag and drop gesture source after its data has been dropped on a drop target. ThetransferModeof the event shows what just happened at the drop target. IftransferModehas 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. AtransferModethat has the valueNONEindicates that no data was transferred during the drag and drop gesture. - Parameters:
value- the value for theonDragDoneproperty- See Also:
-
getOnDragDone
Gets the value of theonDragDoneproperty.- Property description:
- Defines a function to be called when this
Nodeis a drag and drop gesture source after its data has been dropped on a drop target. ThetransferModeof the event shows what just happened at the drop target. IftransferModehas 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. AtransferModethat has the valueNONEindicates that no data was transferred during the drag and drop gesture. - Returns:
- the value of the
onDragDoneproperty - See Also:
-
onDragDoneProperty
Defines a function to be called when thisNodeis a drag and drop gesture source after its data has been dropped on a drop target. ThetransferModeof the event shows what just happened at the drop target. IftransferModehas 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. AtransferModethat has the valueNONEindicates that no data was transferred during the drag and drop gesture.- Returns:
- the event handler that is called when this
Nodeis 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 returnedDragboardis used to transfer data during the drag and drop gesture. Placing thisNode's data on theDragboardalso identifies thisNodeas 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
Dragboardto place thisNode's data on - Throws:
IllegalStateException- if drag and drop cannot be started at this moment (it's called outside ofDRAG_DETECTEDevent handling or this node is not in scene).- See Also:
-
setOnScroll
Sets the value of theonScrollproperty.- Property description:
- Defines a function to be called when user performs a scrolling action.
- Parameters:
value- the value for theonScrollproperty- See Also:
-
getOnScroll
Gets the value of theonScrollproperty.- Property description:
- Defines a function to be called when user performs a scrolling action.
- Returns:
- the value of the
onScrollproperty - 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 fillPaintspecified 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 theboundsInParentof 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 theonKeyPressedproperty.- Property description:
- Defines a function to be called when this
Nodeor its childNodehas 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 theonKeyPressedproperty- See Also:
-
getOnKeyPressed
Gets the value of theonKeyPressedproperty.- Property description:
- Defines a function to be called when this
Nodeor its childNodehas 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
onKeyPressedproperty - See Also:
-
onKeyPressedProperty
Defines a function to be called when thisNodeor its childNodehas 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
Nodeor its childNodehas input focus and a key has been pressed - See Also:
-
setOnKeyReleased
Sets the value of theonKeyReleasedproperty.- Property description:
- Defines a function to be called when this
Nodeor its childNodehas 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 theonKeyReleasedproperty- See Also:
-
getOnKeyReleased
Gets the value of theonKeyReleasedproperty.- Property description:
- Defines a function to be called when this
Nodeor its childNodehas 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
onKeyReleasedproperty - See Also:
-
onKeyReleasedProperty
Defines a function to be called when thisNodeor its childNodehas 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
Nodeor its childNodehas input focus and a key has been released - See Also:
-
setOnKeyTyped
Sets the value of theonKeyTypedproperty.- Property description:
- Defines a function to be called when this
Nodeor its childNodehas 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 theonKeyTypedproperty- See Also:
-
getOnKeyTyped
Gets the value of theonKeyTypedproperty.- Property description:
- Defines a function to be called when this
Nodeor its childNodehas 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
onKeyTypedproperty - See Also:
-
onKeyTypedProperty
Defines a function to be called when thisNodeor its childNodehas 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
Nodeor its childNodehas input focus and a key has been typed - See Also:
-
setOnSwipeUp
Sets the value of theonSwipeUpproperty.- Property description:
- Defines a function to be called when an upward swipe gesture centered over this node happens.
- Parameters:
value- the value for theonSwipeUpproperty- Since:
- JavaFX 2.2
- See Also:
-
getOnSwipeUp
Gets the value of theonSwipeUpproperty.- Property description:
- Defines a function to be called when an upward swipe gesture centered over this node happens.
- Returns:
- the value of the
onSwipeUpproperty - 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 theonSwipeDownproperty.- Property description:
- Defines a function to be called when a downward swipe gesture centered over this node happens.
- Parameters:
value- the value for theonSwipeDownproperty- Since:
- JavaFX 2.2
- See Also:
-
getOnSwipeDown
Gets the value of theonSwipeDownproperty.- Property description:
- Defines a function to be called when a downward swipe gesture centered over this node happens.
- Returns:
- the value of the
onSwipeDownproperty - 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 theonSwipeLeftproperty.- Property description:
- Defines a function to be called when a leftward swipe gesture centered over this node happens.
- Parameters:
value- the value for theonSwipeLeftproperty- Since:
- JavaFX 2.2
- See Also:
-
getOnSwipeLeft
Gets the value of theonSwipeLeftproperty.- Property description:
- Defines a function to be called when a leftward swipe gesture centered over this node happens.
- Returns:
- the value of the
onSwipeLeftproperty - 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 theonSwipeRightproperty.- Property description:
- Defines a function to be called when an rightward swipe gesture centered over this node happens.
- Parameters:
value- the value for theonSwipeRightproperty- Since:
- JavaFX 2.2
- See Also:
-
getOnSwipeRight
Gets the value of theonSwipeRightproperty.- Property description:
- Defines a function to be called when an rightward swipe gesture centered over this node happens.
- Returns:
- the value of the
onSwipeRightproperty - 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 theonTouchPressedproperty.- Property description:
- Defines a function to be called when a new touch point is pressed.
- Parameters:
value- the value for theonTouchPressedproperty- Since:
- JavaFX 2.2
- See Also:
-
getOnTouchPressed
Gets the value of theonTouchPressedproperty.- Property description:
- Defines a function to be called when a new touch point is pressed.
- Returns:
- the value of the
onTouchPressedproperty - 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 theonTouchMovedproperty.- Property description:
- Defines a function to be called when a touch point is moved.
- Parameters:
value- the value for theonTouchMovedproperty- Since:
- JavaFX 2.2
- See Also:
-
getOnTouchMoved
Gets the value of theonTouchMovedproperty.- Property description:
- Defines a function to be called when a touch point is moved.
- Returns:
- the value of the
onTouchMovedproperty - 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 theonTouchReleasedproperty.- Property description:
- Defines a function to be called when a touch point is released.
- Parameters:
value- the value for theonTouchReleasedproperty- Since:
- JavaFX 2.2
- See Also:
-
getOnTouchReleased
Gets the value of theonTouchReleasedproperty.- Property description:
- Defines a function to be called when a touch point is released.
- Returns:
- the value of the
onTouchReleasedproperty - 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 theonTouchStationaryproperty.- Property description:
- Defines a function to be called when a touch point stays pressed and still.
- Parameters:
value- the value for theonTouchStationaryproperty- Since:
- JavaFX 2.2
- See Also:
-
getOnTouchStationary
Gets the value of theonTouchStationaryproperty.- Property description:
- Defines a function to be called when a touch point stays pressed and still.
- Returns:
- the value of the
onTouchStationaryproperty - 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 thisNodeto the back of its sibling nodes in terms of z-order. This is accomplished by moving thisNodeto the first position in its parent'scontentObservableList. This function has no effect if thisNodeis not part of a group. -
toFront
public void toFront()Moves thisNodeto the front of its sibling nodes in terms of z-order. This is accomplished by moving thisNodeto the last position in its parent'scontentObservableList. This function has no effect if thisNodeis not part of a group.
-