Package javafx.scene

Class Node

java.lang.Object
javafx.scene.Node
All Implemented Interfaces:
LayoutMeasurable, LayoutMeasurableMixin, HasBlendModeProperty, HasClipProperty, HasEffectProperty, HasLayoutXProperty, HasLayoutYProperty, HasManagedProperty, HasMouseTransparentProperty, HasOnMouseClickedProperty, HasOpacityProperty, HasParentProperty, HasVisibleProperty, Styleable, EventTarget, INode
Direct Known Subclasses:
Canvas, ImageView, MediaView, Parent, Shape

public abstract class Node extends Object implements INode, EventTarget, Styleable
Author:
Bruno Salmon
  • Property Details

  • Constructor Details

    • Node

      public Node()
  • Method Details

    • parentProperty

      public Property<Parent> parentProperty()
      Specified by:
      parentProperty in interface HasParentProperty
      Returns:
      the parent property
      See Also:
    • sceneProperty

      public ObjectProperty<Scene> sceneProperty()
      Returns:
      the scene property
      See Also:
    • getScene

      public Scene getScene()
      Gets the value of the scene property.
      Specified by:
      getScene in interface INode
      Property description:
      Returns:
      the value of the scene property
      See Also:
    • setScene

      public void setScene(Scene scene)
      Sets the value of the scene property.
      Property description:
      Parameters:
      scene - the value for the scene property
      See Also:
    • managedProperty

      public Property<Boolean> managedProperty()
      Specified by:
      managedProperty in interface HasManagedProperty
      Returns:
      the managed property
      See Also:
    • mouseTransparentProperty

      public Property<Boolean> mouseTransparentProperty()
      Specified by:
      mouseTransparentProperty in interface HasMouseTransparentProperty
      Returns:
      the mouseTransparent property
      See Also:
    • setOnContextMenuRequested

      public final void setOnContextMenuRequested(EventHandler<? super ContextMenuEvent> value)
      Sets the value of the onContextMenuRequested property.
      Property description:
      Defines a function to be called when a context menu has been requested on this Node.
      Parameters:
      value - the value for the onContextMenuRequested property
      Since:
      JavaFX 2.1
      See Also:
    • getOnContextMenuRequested

      public final EventHandler<? super ContextMenuEvent> getOnContextMenuRequested()
      Gets the value of the onContextMenuRequested property.
      Property description:
      Defines a function to be called when a context menu has been requested on this Node.
      Returns:
      the value of the onContextMenuRequested property
      Since:
      JavaFX 2.1
      See Also:
    • onContextMenuRequestedProperty

      public final ObjectProperty<EventHandler<? super ContextMenuEvent>> onContextMenuRequestedProperty()
      Defines a function to be called when a context menu has been requested on this Node.
      Returns:
      the event handler that is called when a context menu has been requested on this Node
      Since:
      JavaFX 2.1
      See Also:
    • onMouseClickedProperty

      public final ObjectProperty<EventHandler<? super MouseEvent>> onMouseClickedProperty()
      Defines a function to be called when a mouse button has been clicked (pressed and released) on this Node.
      Specified by:
      onMouseClickedProperty in interface HasOnMouseClickedProperty
      Returns:
      the onMouseClicked property
      See Also:
    • visibleProperty

      public Property<Boolean> visibleProperty()
      Specified by:
      visibleProperty in interface HasVisibleProperty
      Returns:
      the visible property
      See Also:
    • setCursor

      public final void setCursor(Cursor value)
      Sets the value of the cursor property.
      Property description:
      Defines the mouse cursor for this Node and subnodes. If null, then the cursor of the first parent node with a non-null cursor will be used. If no Node in the scene graph defines a cursor, then the cursor of the Scene will be used.
      Default value:
      null
      Parameters:
      value - the value for the cursor property
      See Also:
    • getCursor

      public final Cursor getCursor()
      Gets the value of the cursor property.
      Property description:
      Defines the mouse cursor for this Node and subnodes. If null, then the cursor of the first parent node with a non-null cursor will be used. If no Node in the scene graph defines a cursor, then the cursor of the Scene will be used.
      Default value:
      null
      Returns:
      the value of the cursor property
      See Also:
    • cursorProperty

      public final ObjectProperty<Cursor> cursorProperty()
      Defines the mouse cursor for this Node and subnodes. If null, then the cursor of the first parent node with a non-null cursor will be used. If no Node in the scene graph defines a cursor, then the cursor of the Scene will be used.
      Default value:
      null
      Returns:
      the cursor property
      See Also:
    • opacityProperty

      public DoubleProperty opacityProperty()
      Specified by:
      opacityProperty in interface HasOpacityProperty
      Returns:
      the opacity property
      See Also:
    • clipProperty

      public Property<Node> clipProperty()
      Specified by:
      clipProperty in interface HasClipProperty
      Returns:
      the clip property
      See Also:
    • blendModeProperty

      public Property<BlendMode> blendModeProperty()
      Specified by:
      blendModeProperty in interface HasBlendModeProperty
      Returns:
      the blendMode property
      See Also:
    • effectProperty

      public Property<Effect> effectProperty()
      Specified by:
      effectProperty in interface HasEffectProperty
      Returns:
      the effect property
      See Also:
    • layoutXProperty

      public DoubleProperty layoutXProperty()
      Specified by:
      layoutXProperty in interface HasLayoutXProperty
      Returns:
      the layoutX property
      See Also:
    • layoutYProperty

      public DoubleProperty layoutYProperty()
      Specified by:
      layoutYProperty in interface HasLayoutYProperty
      Returns:
      the layoutY property
      See Also:
    • cacheProperty

      public final BooleanProperty cacheProperty()
      Returns:
      the cache property
      See Also:
    • setCache

      public final void setCache(boolean value)
      Sets the value of the cache property.
      Property description:
      Parameters:
      value - the value for the cache property
      See Also:
    • isCache

      public final boolean isCache()
      Gets the value of the cache property.
      Property description:
      Returns:
      the value of the cache property
      See Also:
    • cacheHintProperty

      public final Property<CacheHint> cacheHintProperty()
      Returns:
      the cacheHint property
      See Also:
    • setCacheHint

      public final void setCacheHint(CacheHint value)
      Sets the value of the cacheHint property.
      Property description:
      Parameters:
      value - the value for the cacheHint property
      See Also:
    • getCacheHint

      public final CacheHint getCacheHint()
      Gets the value of the cacheHint property.
      Property description:
      Returns:
      the value of the cacheHint property
      See Also:
    • setDisabled

      protected final void setDisabled(boolean value)
      Sets the value of the disabled property.
      Property description:
      Indicates whether or not this Node is disabled. A Node will become disabled if disable is set to true on either itself or one of its ancestors in the scene graph.

      A disabled Node should render itself differently to indicate its disabled state to the user. Such disabled rendering is dependent on the implementation of the Node. The shape classes contained in javafx.scene.shape do not implement such rendering by default, therefore applications using shapes for handling input must implement appropriate disabled rendering themselves. The user-interface controls defined in javafx.scene.control will implement disabled-sensitive rendering, however.

      A disabled Node does not receive mouse or key events.

      Default value:
      false
      Parameters:
      value - the value for the disabled property
      See Also:
    • isDisabled

      public final boolean isDisabled()
      Gets the value of the disabled property.
      Property description:
      Indicates whether or not this Node is disabled. A Node will become disabled if disable is set to true on either itself or one of its ancestors in the scene graph.

      A disabled Node should render itself differently to indicate its disabled state to the user. Such disabled rendering is dependent on the implementation of the Node. The shape classes contained in javafx.scene.shape do not implement such rendering by default, therefore applications using shapes for handling input must implement appropriate disabled rendering themselves. The user-interface controls defined in javafx.scene.control will implement disabled-sensitive rendering, however.

      A disabled Node does not receive mouse or key events.

      Default value:
      false
      Returns:
      the value of the disabled property
      See Also:
    • disabledProperty

      public final ReadOnlyBooleanProperty disabledProperty()
      Indicates whether or not this Node is disabled. A Node will become disabled if disable is set to true on either itself or one of its ancestors in the scene graph.

      A disabled Node should render itself differently to indicate its disabled state to the user. Such disabled rendering is dependent on the implementation of the Node. The shape classes contained in javafx.scene.shape do not implement such rendering by default, therefore applications using shapes for handling input must implement appropriate disabled rendering themselves. The user-interface controls defined in javafx.scene.control will implement disabled-sensitive rendering, however.

      A disabled Node does not receive mouse or key events.

      Default value:
      false
      Returns:
      the disabled property
      See Also:
    • setDisable

      public final void setDisable(boolean value)
      Sets the value of the disable property.
      Property description:
      Parameters:
      value - the value for the disable property
      See Also:
    • isDisable

      public final boolean isDisable()
    • disableProperty

      public final Property<Boolean> disableProperty()
      Returns:
      the disable property
      See Also:
    • setHover

      protected final void setHover(boolean value)
      Sets the value of the hover property.
      Property description:
      Whether or not this Node is being hovered over. Typically this is due to the mouse being over the node, though it could be due to a pen hovering on a graphics tablet or other form of input.

      Note that current implementation of hover relies on mouse enter and exit events to determine whether this Node is in the hover state; this means that this feature is currently supported only on systems that have a mouse. Future implementations may provide alternative means of supporting hover.

      Default value:
      false
      Parameters:
      value - the value for the hover property
      See Also:
    • isHover

      public final boolean isHover()
    • hoverProperty

      public final ReadOnlyProperty<Boolean> hoverProperty()
      Whether or not this Node is being hovered over. Typically this is due to the mouse being over the node, though it could be due to a pen hovering on a graphics tablet or other form of input.

      Note that current implementation of hover relies on mouse enter and exit events to determine whether this Node is in the hover state; this means that this feature is currently supported only on systems that have a mouse. Future implementations may provide alternative means of supporting hover.

      Default value:
      false
      Returns:
      the hover property
      See Also:
    • setPressed

      protected final void setPressed(boolean value)
      Sets the value of the pressed property.
      Property description:
      Whether or not the Node is pressed. Typically this is true when the primary mouse button is down, though subclasses may define other mouse button state or key state to cause the node to be "pressed".
      Default value:
      false
      Parameters:
      value - the value for the pressed property
      See Also:
    • isPressed

      public final boolean isPressed()
    • pressedProperty

      public final ReadOnlyProperty<Boolean> pressedProperty()
      Whether or not the Node is pressed. Typically this is true when the primary mouse button is down, though subclasses may define other mouse button state or key state to cause the node to be "pressed".
      Default value:
      false
      Returns:
      the pressed property
      See Also:
    • setId

      public final void setId(String value)
      Sets the value of the id property.
      Property description:
      The id of this Node. This simple string identifier is useful for finding a specific Node within the scene graph. While the id of a Node should be unique within the scene graph, this uniqueness is not enforced. This is analogous to the "id" attribute on an HTML element (CSS ID Specification).

      For example, if a Node is given the id of "myId", then the lookup method can be used to find this node as follows: scene.lookup("#myId");.

      Default value:
      null
      Parameters:
      value - the value for the id property
      See Also:
    • getId

      public final String getId()
      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).
      Specified by:
      getId in interface Styleable
      Default value:
      null
      Returns:
      the id assigned to this Node using the setId method or null, if no id has been assigned.
      See Also:
    • idProperty

      public final StringProperty idProperty()
      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
      Returns:
      the id property
      See Also:
    • getStyleClass

      public final ObservableList<String> getStyleClass()
      Description copied from interface: Styleable
      A list of String identifiers which can be used to logically group Nodes, specifically for an external style engine. This variable is analogous to the "class" attribute on an HTML element and, as such, each element of the list is a style class to which this Node belongs.
      Specified by:
      getStyleClass in interface Styleable
      See Also:
    • setStyle

      public final void setStyle(String value)
      A string representation of the CSS style associated with this specific Node. 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 this Node. null is implicitly converted to an empty String.
      See Also:
    • getStyle

      public final String getStyle()
      A string representation of the CSS style associated with this specific Node. 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.
      Specified by:
      getStyle in interface Styleable
      Default value:
      empty string
      Returns:
      The inline CSS style associated with this Node. If this Node does not have an inline style, an empty String is returned.
      See Also:
    • styleProperty

      public final StringProperty styleProperty()
      A string representation of the CSS style associated with this specific Node. This is analogous to the "style" attribute of an HTML element. Note that, like the HTML style attribute, this variable contains style properties and values and not the selector portion of a style rule.
      Default value:
      empty string
      Returns:
      the style property
      See Also:
    • getTransforms

      public ObservableList<Transform> getTransforms()
      Specified by:
      getTransforms in interface INode
    • getAllNodeTransforms

      public List<Transform> getAllNodeTransforms()
      Specified by:
      getAllNodeTransforms in interface INode
    • autosize

      public void autosize()
      Specified by:
      autosize in interface INode
    • getProperties

      public final ObservableMap<Object,Object> getProperties()
      Returns an observable map of properties on this node for use primarily by application developers.
      Specified by:
      getProperties in interface INode
      Returns:
      an observable map of properties on this node for use primarily by application developers
    • hasProperties

      public boolean hasProperties()
      Tests if Node has properties.
      Specified by:
      hasProperties in interface INode
      Returns:
      true if node has properties.
    • requestFocus

      public void requestFocus()
      Requests that this Node get the input focus, and that this Node'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 this Scene'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 a Stage that is both visible and active.
    • impl_traverse

      public final boolean impl_traverse(Direction dir)
      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 the focusTraversable property.
      Property description:
      Specifies whether this Node should be a part of focus traversal cycle. When this property is true focus can be moved to this Node and from this Node using regular focus traversal keys. On a desktop such keys are usually TAB for moving focus forward and SHIFT+TAB for moving focus backward. When a Scene is created, the system gives focus to a Node whose focusTraversable variable is true and that is eligible to receive the focus, unless the focus had been set explicitly via a call to requestFocus().
      Default value:
      false
      Parameters:
      value - the value for the focusTraversable property
      See Also:
    • isFocusTraversable

      public final boolean isFocusTraversable()
    • focusTraversableProperty

      public final Property<Boolean> focusTraversableProperty()
      Specifies whether this Node should be a part of focus traversal cycle. When this property is true focus can be moved to this Node and from this Node using regular focus traversal keys. On a desktop such keys are usually TAB for moving focus forward and SHIFT+TAB for moving focus backward. When a Scene is created, the system gives focus to a Node whose focusTraversable variable is true and that is eligible to receive the focus, unless the focus had been set explicitly via a call to requestFocus().
      Default value:
      false
      Returns:
      the focusTraversable property
      See Also:
    • setFocused

      public final void setFocused(boolean value)
      Sets the value of the focused property.
      Property description:
      Indicates whether this Node currently has the input focus. To have the input focus, a node must be the Scene's focus owner, and the scene must be in a Stage that is visible and active. See requestFocus() for more information.
      Default value:
      false
      Parameters:
      value - the value for the focused property
      See Also:
    • isFocused

      public final boolean isFocused()
      Gets the value of the focused property.
      Property description:
      Indicates whether this Node currently has the input focus. To have the input focus, a node must be the Scene's focus owner, and the scene must be in a Stage that is visible and active. See requestFocus() for more information.
      Default value:
      false
      Returns:
      the value of the focused property
      See Also:
    • focusedProperty

      public final ReadOnlyBooleanProperty focusedProperty()
      Indicates whether this Node currently has the input focus. To have the input focus, a node must be the Scene's focus owner, and the scene must be in a Stage that is visible and active. See requestFocus() for more information.
      Default value:
      false
      Returns:
      the focused property
      See Also:
    • setEventDispatcher

      public final void setEventDispatcher(EventDispatcher value)
      Sets the value of the eventDispatcher property.
      Property description:
      Specifies the event dispatcher for this node. The default event dispatcher sends the received events to the registered event handlers and filters. When replacing the value with a new EventDispatcher, the new dispatcher should forward events to the replaced dispatcher to maintain the node's default event handling behavior.
      Parameters:
      value - the value for the eventDispatcher property
      See Also:
    • getEventDispatcher

      public final EventDispatcher getEventDispatcher()
      Gets the value of the eventDispatcher property.
      Property description:
      Specifies the event dispatcher for this node. The default event dispatcher sends the received events to the registered event handlers and filters. When replacing the value with a new EventDispatcher, the new dispatcher should forward events to the replaced dispatcher to maintain the node's default event handling behavior.
      Returns:
      the value of the eventDispatcher property
      See Also:
    • eventDispatcherProperty

      public final ObjectProperty<EventDispatcher> 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 new EventDispatcher, the new dispatcher should forward events to the replaced dispatcher to maintain the node's default event handling behavior.
      Returns:
      the eventDispatcher property
      See Also:
    • addEventHandler

      public final <T extends Event> void addEventHandler(EventType<T> eventType, EventHandler<? super T> eventHandler)
      Registers an event handler to this node. The handler is called when the node receives an Event of the specified type during the bubbling phase of event delivery.
      Type Parameters:
      T - the specific event class of the handler
      Parameters:
      eventType - the type of the events to receive by the handler
      eventHandler - 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 unregister
      eventHandler - 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 an Event of the specified type during the capturing phase of event delivery.
      Type Parameters:
      T - the specific event class of the filter
      Parameters:
      eventType - the type of the events to receive by the filter
      eventFilter - 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 unregister
      eventFilter - 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 using addEventHandler(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 eventHandler
      eventHandler - the handler to register, or null to unregister
      Throws:
      NullPointerException - if the event type is null
    • buildEventDispatchChain

      public EventDispatchChain buildEventDispatchChain(EventDispatchChain tail)
      Construct an event dispatch chain for this node. The event dispatch chain contains all event dispatchers from the stage to this node.
      Specified by:
      buildEventDispatchChain in interface EventTarget
      Parameters:
      tail - the initial chain to build from
      Returns:
      the resulting event dispatch chain for this node
    • fireEvent

      public final void fireEvent(Event event)
      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

      public NodePeer getNodePeer()
      Specified by:
      getNodePeer in interface INode
    • getOrCreateAndBindNodePeer

      public NodePeer getOrCreateAndBindNodePeer()
      Specified by:
      getOrCreateAndBindNodePeer in interface INode
    • setNodePeer

      public void setNodePeer(NodePeer nodePeer)
    • onNodePeerReady

      public void onNodePeerReady(Consumer<NodePeer> handler)
    • requestPeerFocus

      public void requestPeerFocus()
    • getLayoutMeasurable

      public LayoutMeasurable getLayoutMeasurable()
      Specified by:
      getLayoutMeasurable in interface LayoutMeasurableMixin
    • shouldUseLayoutMeasurable

      protected boolean shouldUseLayoutMeasurable()
    • onPeerSizeChanged

      public void onPeerSizeChanged()
    • getBoundsInLocal

      public Bounds getBoundsInLocal()
    • createLayoutMeasurable

      protected void createLayoutMeasurable(NodePeer nodePeer)
    • setTranslateX

      public final void setTranslateX(double value)
      Sets the value of the translateX property.
      Property description:
      Parameters:
      value - the value for the translateX property
      See Also:
    • getTranslateX

      public final double getTranslateX()
      Gets the value of the translateX property.
      Property description:
      Returns:
      the value of the translateX property
      See Also:
    • translateXProperty

      public final DoubleProperty translateXProperty()
      Returns:
      the translateX property
      See Also:
    • setTranslateY

      public final void setTranslateY(double value)
      Sets the value of the translateY property.
      Property description:
      Parameters:
      value - the value for the translateY property
      See Also:
    • getTranslateY

      public final double getTranslateY()
      Gets the value of the translateY property.
      Property description:
      Returns:
      the value of the translateY property
      See Also:
    • translateYProperty

      public final DoubleProperty translateYProperty()
      Returns:
      the translateY property
      See Also:
    • setScaleX

      public final void setScaleX(double value)
      Sets the value of the scaleX property.
      Property description:
      Defines the factor by which coordinates are scaled about the center of the object along the X axis of this Node. This is used to stretch or shrink the node either manually or by using an animation.

      This scale factor is not included in layoutBounds by default, which makes it ideal for scaling the entire node after all effects and transforms have been taken into account.

      The pivot point about which the scale occurs is the center of the untransformed layoutBounds.

      Default value:
      1.0
      Parameters:
      value - the value for the scaleX property
      See Also:
    • getScaleX

      public final double getScaleX()
      Gets the value of the scaleX property.
      Property description:
      Defines the factor by which coordinates are scaled about the center of the object along the X axis of this Node. This is used to stretch or shrink the node either manually or by using an animation.

      This scale factor is not included in layoutBounds by default, which makes it ideal for scaling the entire node after all effects and transforms have been taken into account.

      The pivot point about which the scale occurs is the center of the untransformed layoutBounds.

      Default value:
      1.0
      Returns:
      the value of the scaleX property
      See Also:
    • scaleXProperty

      public final DoubleProperty scaleXProperty()
      Defines the factor by which coordinates are scaled about the center of the object along the X axis of this Node. This is used to stretch or shrink the node either manually or by using an animation.

      This scale factor is not included in layoutBounds by default, which makes it ideal for scaling the entire node after all effects and transforms have been taken into account.

      The pivot point about which the scale occurs is the center of the untransformed layoutBounds.

      Default value:
      1.0
      Returns:
      the scaleX for this Node
      See Also:
    • setScaleY

      public final void setScaleY(double value)
      Sets the value of the scaleY property.
      Property description:
      Defines the factor by which coordinates are scaled about the center of the object along the Y axis of this Node. This is used to stretch or shrink the node either manually or by using an animation.

      This scale factor is not included in layoutBounds by default, which makes it ideal for scaling the entire node after all effects and transforms have been taken into account.

      The pivot point about which the scale occurs is the center of the untransformed layoutBounds.

      Default value:
      1.0
      Parameters:
      value - the value for the scaleY property
      See Also:
    • getScaleY

      public final double getScaleY()
      Gets the value of the scaleY property.
      Property description:
      Defines the factor by which coordinates are scaled about the center of the object along the Y axis of this Node. This is used to stretch or shrink the node either manually or by using an animation.

      This scale factor is not included in layoutBounds by default, which makes it ideal for scaling the entire node after all effects and transforms have been taken into account.

      The pivot point about which the scale occurs is the center of the untransformed layoutBounds.

      Default value:
      1.0
      Returns:
      the value of the scaleY property
      See Also:
    • scaleYProperty

      public final DoubleProperty scaleYProperty()
      Defines the factor by which coordinates are scaled about the center of the object along the Y axis of this Node. This is used to stretch or shrink the node either manually or by using an animation.

      This scale factor is not included in layoutBounds by default, which makes it ideal for scaling the entire node after all effects and transforms have been taken into account.

      The pivot point about which the scale occurs is the center of the untransformed layoutBounds.

      Default value:
      1.0
      Returns:
      the scaleY for this Node
      See Also:
    • setScaleZ

      public final void setScaleZ(double value)
      Sets the value of the scaleZ property.
      Property description:
      Defines the factor by which coordinates are scaled about the center of the object along the Z axis of this Node. This is used to stretch or shrink the node either manually or by using an animation.

      This scale factor is not included in layoutBounds by default, which makes it ideal for scaling the entire node after all effects and transforms have been taken into account.

      The pivot point about which the scale occurs is the center of the untransformed layoutBounds.

      Default value:
      1.0
      Parameters:
      value - the value for the scaleZ property
      See Also:
    • getScaleZ

      public final double getScaleZ()
      Gets the value of the scaleZ property.
      Property description:
      Defines the factor by which coordinates are scaled about the center of the object along the Z axis of this Node. This is used to stretch or shrink the node either manually or by using an animation.

      This scale factor is not included in layoutBounds by default, which makes it ideal for scaling the entire node after all effects and transforms have been taken into account.

      The pivot point about which the scale occurs is the center of the untransformed layoutBounds.

      Default value:
      1.0
      Returns:
      the value of the scaleZ property
      See Also:
    • scaleZProperty

      public final DoubleProperty scaleZProperty()
      Defines the factor by which coordinates are scaled about the center of the object along the Z axis of this Node. This is used to stretch or shrink the node either manually or by using an animation.

      This scale factor is not included in layoutBounds by default, which makes it ideal for scaling the entire node after all effects and transforms have been taken into account.

      The pivot point about which the scale occurs is the center of the untransformed layoutBounds.

      Default value:
      1.0
      Returns:
      the scaleZ for this Node
      See Also:
    • setRotate

      public final void setRotate(double value)
      Sets the value of the rotate property.
      Property description:
      Parameters:
      value - the value for the rotate property
      See Also:
    • getRotate

      public final double getRotate()
      Gets the value of the rotate property.
      Property description:
      Returns:
      the value of the rotate property
      See Also:
    • rotateProperty

      public final DoubleProperty rotateProperty()
      Returns:
      the rotate property
      See Also:
    • layoutBoundsProperty

      public ReadOnlyProperty<Bounds> layoutBoundsProperty()
      The rectangular bounds that should be used for layout calculations for this node. layoutBounds may differ from the visual bounds of the node and is computed differently depending on the node type.

      If the node type is resizable (Region, Control, or WebView) then the layoutBounds will always be 0,0 width x height. If the node type is not resizable (Shape, Text, or Group), 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, and translateY variables are not included in the layoutBounds. This is important because layout code must first determine the current size and location of the node (using layoutBounds) and then set layoutX and layoutY to adjust the translation of the node so that it will have the desired layout position.

      Because the computation of layoutBounds is often tied to a node's geometric variables, it is an error to bind any such variables to an expression that depends upon layoutBounds. For example, the x or y variables of a shape should never be bound to layoutBounds for the purpose of positioning the node.

      The layoutBounds will never be null. Webfx note: this property is set only when the target toolkit reports a change by calling the SizeChangedCallback set on the LayoutMeasurable (ex: once an image is loaded so we now know the size of the image). So layoutBoundsProperty() should be used only to listen such changes.

      Returns:
      the layoutBounds property
    • impl_getLayoutBounds

      protected Bounds 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

      protected Bounds impl_computeLayoutBounds()
      Returns geometric bounds, but may be over-ridden by a subclass.
    • impl_computeGeomBounds

      public abstract BaseBounds impl_computeGeomBounds(BaseBounds bounds, BaseTransform tx)
      Computes the geometric bounds for this Node. This method is abstract and must be implemented by each Node subclass.
    • localToScene

      public Point2D localToScene(double localX, double localY)
      Transforms a point from the local coordinate space of this Node into the coordinate space of its scene. Note that if this node is in a SubScene, the result is in the subscene coordinates, not that of Scene.
      Parameters:
      localX - x coordinate of a point in Node's space
      localY - 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

      protected void localToScene(Point2D pt)
    • localToParent

      public void localToParent(Point2D pt)
      Transforms in place the specified point from local coords to parent coords. Made package private for the sake of testing.
    • localToParent

      public Point2D localToParent(Point2D pt)
    • localToParent

      public Point2D localToParent(double localX, double localY)
    • sceneToLocal

      public Point2D sceneToLocal(Point2D pt)
    • sceneToLocal

      public Point2D sceneToLocal(double sceneX, double sceneY)
    • sceneToLocal

      protected void sceneToLocal(Point2D pt)
    • parentToLocal

      public Point2D parentToLocal(double x, double y)
    • localToScreen

      public Point2D localToScreen(double localX, double localY)
      Transforms a point from the local coordinate space of this Node into the coordinate space of its Screen.
      Parameters:
      localX - x coordinate of a point in Node's space
      localY - 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

      public Point2D localToScreen(Point2D localPoint)
      Transforms a point from the local coordinate space of this Node into the coordinate space of its Screen.
      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

      public Point2D localToScreen(double localX, double localY, double localZ)
      Transforms a point from the local coordinate space of this Node into the coordinate space of its Screen.
      Parameters:
      localX - x coordinate of a point in Node's space
      localY - y coordinate of a point in Node's space
      localZ - 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

      public Bounds localToScreen(Bounds localBounds)
      Transforms a bounds from the local coordinate space of this Node into the coordinate space of its Screen.
      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

      public void setUserData(Object value)
      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 calling getUserData().
      Parameters:
      value - The value to be stored - this can later be retrieved by calling getUserData().
    • getUserData

      public Object getUserData()
      Returns a previously set Object property, or null if no such property has been set using the setUserData(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

      public final void setOnMouseMoved(EventHandler<? super MouseEvent> value)
      Sets the value of the onMouseMoved property.
      Property description:
      Defines a function to be called when mouse cursor moves within this Node but no buttons have been pushed.
      Parameters:
      value - the value for the onMouseMoved property
      See Also:
    • getOnMouseMoved

      public final EventHandler<? super MouseEvent> getOnMouseMoved()
      Gets the value of the onMouseMoved property.
      Property description:
      Defines a function to be called when mouse cursor moves within this Node but no buttons have been pushed.
      Returns:
      the value of the onMouseMoved property
      See Also:
    • onMouseMovedProperty

      public final ObjectProperty<EventHandler<? super MouseEvent>> onMouseMovedProperty()
      Defines a function to be called when mouse cursor moves within this Node but no buttons have been pushed.
      Returns:
      the event handler that is called when a mouse cursor moves within this Node but no buttons have been pushed
      See Also:
    • setOnMousePressed

      public final void setOnMousePressed(EventHandler<? super MouseEvent> value)
      Sets the value of the onMousePressed property.
      Property description:
      Defines a function to be called when a mouse button has been pressed on this Node.
      Parameters:
      value - the value for the onMousePressed property
      See Also:
    • getOnMousePressed

      public final EventHandler<? super MouseEvent> getOnMousePressed()
      Gets the value of the onMousePressed property.
      Property description:
      Defines a function to be called when a mouse button has been pressed on this Node.
      Returns:
      the value of the onMousePressed property
      See Also:
    • onMousePressedProperty

      public final ObjectProperty<EventHandler<? super MouseEvent>> onMousePressedProperty()
      Defines a function to be called when a mouse button has been pressed on this Node.
      Returns:
      the event handler that is called when a mouse button has been pressed on this Node
      See Also:
    • setOnMouseReleased

      public final void setOnMouseReleased(EventHandler<? super MouseEvent> value)
      Sets the value of the onMouseReleased property.
      Property description:
      Defines a function to be called when a mouse button has been released on this Node.
      Parameters:
      value - the value for the onMouseReleased property
      See Also:
    • getOnMouseReleased

      public final EventHandler<? super MouseEvent> getOnMouseReleased()
      Gets the value of the onMouseReleased property.
      Property description:
      Defines a function to be called when a mouse button has been released on this Node.
      Returns:
      the value of the onMouseReleased property
      See Also:
    • onMouseReleasedProperty

      public final ObjectProperty<EventHandler<? super MouseEvent>> onMouseReleasedProperty()
      Defines a function to be called when a mouse button has been released on this Node.
      Returns:
      the event handler that is called when a mouse button has been released on this Node
      See Also:
    • setOnMouseEntered

      public final void setOnMouseEntered(EventHandler<? super MouseEvent> value)
      Sets the value of the onMouseEntered property.
      Property description:
      Defines a function to be called when the mouse enters this Node.
      Parameters:
      value - the value for the onMouseEntered property
      See Also:
    • getOnMouseEntered

      public final EventHandler<? super MouseEvent> getOnMouseEntered()
      Gets the value of the onMouseEntered property.
      Property description:
      Defines a function to be called when the mouse enters this Node.
      Returns:
      the value of the onMouseEntered property
      See Also:
    • onMouseEnteredProperty

      public final ObjectProperty<EventHandler<? super MouseEvent>> onMouseEnteredProperty()
      Defines a function to be called when the mouse enters this Node.
      Returns:
      the onMouseEntered property
      See Also:
    • setOnMouseExited

      public final void setOnMouseExited(EventHandler<? super MouseEvent> value)
      Sets the value of the onMouseExited property.
      Property description:
      Defines a function to be called when the mouse exits this Node.
      Parameters:
      value - the value for the onMouseExited property
      See Also:
    • getOnMouseExited

      public final EventHandler<? super MouseEvent> getOnMouseExited()
      Gets the value of the onMouseExited property.
      Property description:
      Defines a function to be called when the mouse exits this Node.
      Returns:
      the value of the onMouseExited property
      See Also:
    • onMouseExitedProperty

      public final ObjectProperty<EventHandler<? super MouseEvent>> onMouseExitedProperty()
      Defines a function to be called when the mouse exits this Node.
      Returns:
      the onMouseExited property
      See Also:
    • setOnMouseDragged

      public final void setOnMouseDragged(EventHandler<? super MouseEvent> value)
      Sets the value of the onMouseDragged property.
      Property description:
      Defines a function to be called when a mouse button is pressed on this Node and then dragged.
      Parameters:
      value - the value for the onMouseDragged property
      See Also:
    • getOnMouseDragged

      public final EventHandler<? super MouseEvent> getOnMouseDragged()
      Gets the value of the onMouseDragged property.
      Property description:
      Defines a function to be called when a mouse button is pressed on this Node and then dragged.
      Returns:
      the value of the onMouseDragged property
      See Also:
    • setOnDragEntered

      public final void setOnDragEntered(EventHandler<? super DragEvent> value)
      Sets the value of the onDragEntered property.
      Property description:
      Defines a function to be called when drag gesture enters this Node.
      Parameters:
      value - the value for the onDragEntered property
      See Also:
    • getOnDragEntered

      public final EventHandler<? super DragEvent> getOnDragEntered()
      Gets the value of the onDragEntered property.
      Property description:
      Defines a function to be called when drag gesture enters this Node.
      Returns:
      the value of the onDragEntered property
      See Also:
    • onDragEnteredProperty

      public final ObjectProperty<EventHandler<? super DragEvent>> onDragEnteredProperty()
      Defines a function to be called when drag gesture enters this Node.
      Returns:
      the event handler that is called when drag gesture enters this Node
      See Also:
    • setOnDragExited

      public final void setOnDragExited(EventHandler<? super DragEvent> value)
      Sets the value of the onDragExited property.
      Property description:
      Defines a function to be called when drag gesture exits this Node.
      Parameters:
      value - the value for the onDragExited property
      See Also:
    • getOnDragExited

      public final EventHandler<? super DragEvent> getOnDragExited()
      Gets the value of the onDragExited property.
      Property description:
      Defines a function to be called when drag gesture exits this Node.
      Returns:
      the value of the onDragExited property
      See Also:
    • onDragExitedProperty

      public final ObjectProperty<EventHandler<? super DragEvent>> onDragExitedProperty()
      Defines a function to be called when drag gesture exits this Node.
      Returns:
      the event handler that is called when drag gesture exits this Node
      See Also:
    • onMouseDraggedProperty

      public final ObjectProperty<EventHandler<? super MouseEvent>> onMouseDraggedProperty()
      Defines a function to be called when a mouse button is pressed on this Node and then dragged.
      Returns:
      the event handler that is called when a mouse button is pressed on this Node and then dragged
      See Also:
    • setOnDragDetected

      public final void setOnDragDetected(EventHandler<? super MouseEvent> value)
      Sets the value of the onDragDetected property.
      Property description:
      Defines a function to be called when drag gesture has been detected. This is the right place to start drag and drop operation.
      Parameters:
      value - the value for the onDragDetected property
      See Also:
    • getOnDragDetected

      public final EventHandler<? super MouseEvent> getOnDragDetected()
      Gets the value of the onDragDetected property.
      Property description:
      Defines a function to be called when drag gesture has been detected. This is the right place to start drag and drop operation.
      Returns:
      the value of the onDragDetected property
      See Also:
    • onDragDetectedProperty

      public final ObjectProperty<EventHandler<? super MouseEvent>> 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

      public final void setOnDragOver(EventHandler<? super DragEvent> value)
      Sets the value of the onDragOver property.
      Property description:
      Defines a function to be called when drag gesture progresses within this Node.
      Parameters:
      value - the value for the onDragOver property
      See Also:
    • getOnDragOver

      public final EventHandler<? super DragEvent> getOnDragOver()
      Gets the value of the onDragOver property.
      Property description:
      Defines a function to be called when drag gesture progresses within this Node.
      Returns:
      the value of the onDragOver property
      See Also:
    • onDragOverProperty

      public final ObjectProperty<EventHandler<? super DragEvent>> onDragOverProperty()
      Defines a function to be called when drag gesture progresses within this Node.
      Returns:
      the event handler that is called when drag gesture progresses within this Node
      See Also:
    • setOnDragDropped

      public final void setOnDragDropped(EventHandler<? super DragEvent> value)
      Sets the value of the onDragDropped property.
      Property description:
      Defines a function to be called when the mouse button is released on this Node during drag and drop gesture. Transfer of data from the DragEvent's dragboard should happen in this function.
      Parameters:
      value - the value for the onDragDropped property
      See Also:
    • getOnDragDropped

      public final EventHandler<? super DragEvent> getOnDragDropped()
      Gets the value of the onDragDropped property.
      Property description:
      Defines a function to be called when the mouse button is released on this Node during drag and drop gesture. Transfer of data from the DragEvent's dragboard should happen in this function.
      Returns:
      the value of the onDragDropped property
      See Also:
    • onDragDroppedProperty

      public final ObjectProperty<EventHandler<? super DragEvent>> onDragDroppedProperty()
      Defines a function to be called when the mouse button is released on this Node during drag and drop gesture. Transfer of data from the DragEvent's dragboard should happen in this function.
      Returns:
      the event handler that is called when the mouse button is released on this Node
      See Also:
    • setOnDragDone

      public final void setOnDragDone(EventHandler<? super DragEvent> value)
      Sets the value of the onDragDone property.
      Property description:
      Defines a function to be called when this Node is a drag and drop gesture source after its data has been dropped on a drop target. The transferMode of the event shows what just happened at the drop target. If transferMode has the value MOVE, then the source can clear out its data. Clearing the source's data gives the appropriate appearance to a user that the data has been moved by the drag and drop gesture. A transferMode that has the value NONE indicates that no data was transferred during the drag and drop gesture.
      Parameters:
      value - the value for the onDragDone property
      See Also:
    • getOnDragDone

      public final EventHandler<? super DragEvent> getOnDragDone()
      Gets the value of the onDragDone property.
      Property description:
      Defines a function to be called when this Node is a drag and drop gesture source after its data has been dropped on a drop target. The transferMode of the event shows what just happened at the drop target. If transferMode has the value MOVE, then the source can clear out its data. Clearing the source's data gives the appropriate appearance to a user that the data has been moved by the drag and drop gesture. A transferMode that has the value NONE indicates that no data was transferred during the drag and drop gesture.
      Returns:
      the value of the onDragDone property
      See Also:
    • onDragDoneProperty

      public final ObjectProperty<EventHandler<? super DragEvent>> onDragDoneProperty()
      Defines a function to be called when this Node is a drag and drop gesture source after its data has been dropped on a drop target. The transferMode of the event shows what just happened at the drop target. If transferMode has the value MOVE, then the source can clear out its data. Clearing the source's data gives the appropriate appearance to a user that the data has been moved by the drag and drop gesture. A transferMode that has the value NONE indicates that no data was transferred during the drag and drop gesture.
      Returns:
      the event handler that is called when this Node is a drag and drop gesture source after its data has been dropped on a drop target
      See Also:
    • startDragAndDrop

      public Dragboard startDragAndDrop(TransferMode... transferModes)
      Confirms a potential drag and drop gesture that is recognized over this Node. Can be called only from a DRAG_DETECTED event handler. The returned Dragboard is used to transfer data during the drag and drop gesture. Placing this Node's data on the Dragboard also identifies this Node as the source of the drag and drop gesture. More detail about drag and drop gestures is described in the overivew of DragEvent.
      Parameters:
      transferModes - The supported TransferMode(s) of this Node
      Returns:
      A Dragboard to place this Node's data on
      Throws:
      IllegalStateException - if drag and drop cannot be started at this moment (it's called outside of DRAG_DETECTED event handling or this node is not in scene).
      See Also:
    • setOnScroll

      public final void setOnScroll(EventHandler<? super ScrollEvent> value)
      Sets the value of the onScroll property.
      Property description:
      Defines a function to be called when user performs a scrolling action.
      Parameters:
      value - the value for the onScroll property
      See Also:
    • getOnScroll

      public final EventHandler<? super ScrollEvent> getOnScroll()
      Gets the value of the onScroll property.
      Property description:
      Defines a function to be called when user performs a scrolling action.
      Returns:
      the value of the onScroll property
      See Also:
    • onScrollProperty

      public final ObjectProperty<EventHandler<? super ScrollEvent>> 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

      public WritableImage snapshot(SnapshotParameters params, WritableImage image)
      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 fill Paint specified by the SnapshotParameters. This node is then rendered to the image. If the viewport specified by the SnapshotParameters is null, the upper-left pixel of the boundsInParent of this node, after first applying the transform specified by the SnapshotParameters, is mapped to the upper-left pixel (0,0) in the image. If a non-null viewport is specified, the upper-left pixel of the viewport is mapped to upper-left pixel (0,0) in the image. In both cases, this mapping to (0,0) of the image is done with an integer translation. The portion of the node that is outside of the rendered image will be clipped by the image.

      When taking a snapshot of a scene that is being animated, either explicitly by the application or implicitly (such as chart animation), the snapshot will be rendered based on the state of the scene graph at the moment the snapshot is taken and will not reflect any subsequent animation changes.

      NOTE: In order for CSS and layout to function correctly, the node must be part of a Scene (the Scene may be attached to a Stage, but need not be).

      Parameters:
      params - the snapshot parameters containing attributes that will control the rendering. If the SnapshotParameters object is null, then the Scene's attributes will be used if this node is part of a scene, or default attributes will be used if this node is not part of a scene.
      image - the writable image that will be used to hold the rendered node. It may be null in which case a new WritableImage will be constructed. The new image is constructed using integer width and height values that are derived either from the transformed bounds of this Node or from the size of the viewport as specified in the SnapShotParameters. These integer values are chosen such that the image will wholly contain the bounds of this Node or the specified viewport. If the image is non-null, the node will be rendered into the existing image. In this case, the width and height of the image determine the area that is rendered instead of the width and height of the bounds or viewport.
      Returns:
      the rendered image
      Throws:
      IllegalStateException - if this method is called on a thread other than the JavaFX Application Thread.
      Since:
      JavaFX 2.2
    • setOnKeyPressed

      public final void setOnKeyPressed(EventHandler<? super KeyEvent> value)
      Sets the value of the onKeyPressed property.
      Property description:
      Defines a function to be called when this Node or its child Node has input focus and a key has been pressed. The function is called only if the event hasn't been already consumed during its capturing or bubbling phase.
      Parameters:
      value - the value for the onKeyPressed property
      See Also:
    • getOnKeyPressed

      public final EventHandler<? super KeyEvent> getOnKeyPressed()
      Gets the value of the onKeyPressed property.
      Property description:
      Defines a function to be called when this Node or its child Node has input focus and a key has been pressed. The function is called only if the event hasn't been already consumed during its capturing or bubbling phase.
      Returns:
      the value of the onKeyPressed property
      See Also:
    • onKeyPressedProperty

      public final ObjectProperty<EventHandler<? super KeyEvent>> onKeyPressedProperty()
      Defines a function to be called when this Node or its child Node has input focus and a key has been pressed. The function is called only if the event hasn't been already consumed during its capturing or bubbling phase.
      Returns:
      the event handler that is called when this Node or its child Node has input focus and a key has been pressed
      See Also:
    • setOnKeyReleased

      public final void setOnKeyReleased(EventHandler<? super KeyEvent> value)
      Sets the value of the onKeyReleased property.
      Property description:
      Defines a function to be called when this Node or its child Node has input focus and a key has been released. The function is called only if the event hasn't been already consumed during its capturing or bubbling phase.
      Parameters:
      value - the value for the onKeyReleased property
      See Also:
    • getOnKeyReleased

      public final EventHandler<? super KeyEvent> getOnKeyReleased()
      Gets the value of the onKeyReleased property.
      Property description:
      Defines a function to be called when this Node or its child Node has input focus and a key has been released. The function is called only if the event hasn't been already consumed during its capturing or bubbling phase.
      Returns:
      the value of the onKeyReleased property
      See Also:
    • onKeyReleasedProperty

      public final ObjectProperty<EventHandler<? super KeyEvent>> onKeyReleasedProperty()
      Defines a function to be called when this Node or its child Node has input focus and a key has been released. The function is called only if the event hasn't been already consumed during its capturing or bubbling phase.
      Returns:
      the event handler that is called when this Node or its child Node has input focus and a key has been released
      See Also:
    • setOnKeyTyped

      public final void setOnKeyTyped(EventHandler<? super KeyEvent> value)
      Sets the value of the onKeyTyped property.
      Property description:
      Defines a function to be called when this Node or its child Node has input focus and a key has been typed. The function is called only if the event hasn't been already consumed during its capturing or bubbling phase.
      Parameters:
      value - the value for the onKeyTyped property
      See Also:
    • getOnKeyTyped

      public final EventHandler<? super KeyEvent> getOnKeyTyped()
      Gets the value of the onKeyTyped property.
      Property description:
      Defines a function to be called when this Node or its child Node has input focus and a key has been typed. The function is called only if the event hasn't been already consumed during its capturing or bubbling phase.
      Returns:
      the value of the onKeyTyped property
      See Also:
    • onKeyTypedProperty

      public final ObjectProperty<EventHandler<? super KeyEvent>> onKeyTypedProperty()
      Defines a function to be called when this Node or its child Node has input focus and a key has been typed. The function is called only if the event hasn't been already consumed during its capturing or bubbling phase.
      Returns:
      the event handler that is called when this Node or its child Node has input focus and a key has been typed
      See Also:
    • setOnSwipeUp

      public final void setOnSwipeUp(EventHandler<? super SwipeEvent> value)
      Sets the value of the onSwipeUp property.
      Property description:
      Defines a function to be called when an upward swipe gesture centered over this node happens.
      Parameters:
      value - the value for the onSwipeUp property
      Since:
      JavaFX 2.2
      See Also:
    • getOnSwipeUp

      public final EventHandler<? super SwipeEvent> getOnSwipeUp()
      Gets the value of the onSwipeUp property.
      Property description:
      Defines a function to be called when an upward swipe gesture centered over this node happens.
      Returns:
      the value of the onSwipeUp property
      Since:
      JavaFX 2.2
      See Also:
    • onSwipeUpProperty

      public final ObjectProperty<EventHandler<? super SwipeEvent>> 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

      public final void setOnSwipeDown(EventHandler<? super SwipeEvent> value)
      Sets the value of the onSwipeDown property.
      Property description:
      Defines a function to be called when a downward swipe gesture centered over this node happens.
      Parameters:
      value - the value for the onSwipeDown property
      Since:
      JavaFX 2.2
      See Also:
    • getOnSwipeDown

      public final EventHandler<? super SwipeEvent> getOnSwipeDown()
      Gets the value of the onSwipeDown property.
      Property description:
      Defines a function to be called when a downward swipe gesture centered over this node happens.
      Returns:
      the value of the onSwipeDown property
      Since:
      JavaFX 2.2
      See Also:
    • onSwipeDownProperty

      public final ObjectProperty<EventHandler<? super SwipeEvent>> 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

      public final void setOnSwipeLeft(EventHandler<? super SwipeEvent> value)
      Sets the value of the onSwipeLeft property.
      Property description:
      Defines a function to be called when a leftward swipe gesture centered over this node happens.
      Parameters:
      value - the value for the onSwipeLeft property
      Since:
      JavaFX 2.2
      See Also:
    • getOnSwipeLeft

      public final EventHandler<? super SwipeEvent> getOnSwipeLeft()
      Gets the value of the onSwipeLeft property.
      Property description:
      Defines a function to be called when a leftward swipe gesture centered over this node happens.
      Returns:
      the value of the onSwipeLeft property
      Since:
      JavaFX 2.2
      See Also:
    • onSwipeLeftProperty

      public final ObjectProperty<EventHandler<? super SwipeEvent>> 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

      public final void setOnSwipeRight(EventHandler<? super SwipeEvent> value)
      Sets the value of the onSwipeRight property.
      Property description:
      Defines a function to be called when an rightward swipe gesture centered over this node happens.
      Parameters:
      value - the value for the onSwipeRight property
      Since:
      JavaFX 2.2
      See Also:
    • getOnSwipeRight

      public final EventHandler<? super SwipeEvent> getOnSwipeRight()
      Gets the value of the onSwipeRight property.
      Property description:
      Defines a function to be called when an rightward swipe gesture centered over this node happens.
      Returns:
      the value of the onSwipeRight property
      Since:
      JavaFX 2.2
      See Also:
    • onSwipeRightProperty

      public final ObjectProperty<EventHandler<? super SwipeEvent>> 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

      public final void setOnTouchPressed(EventHandler<? super TouchEvent> value)
      Sets the value of the onTouchPressed property.
      Property description:
      Defines a function to be called when a new touch point is pressed.
      Parameters:
      value - the value for the onTouchPressed property
      Since:
      JavaFX 2.2
      See Also:
    • getOnTouchPressed

      public final EventHandler<? super TouchEvent> getOnTouchPressed()
      Gets the value of the onTouchPressed property.
      Property description:
      Defines a function to be called when a new touch point is pressed.
      Returns:
      the value of the onTouchPressed property
      Since:
      JavaFX 2.2
      See Also:
    • onTouchPressedProperty

      public final ObjectProperty<EventHandler<? super TouchEvent>> 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

      public final void setOnTouchMoved(EventHandler<? super TouchEvent> value)
      Sets the value of the onTouchMoved property.
      Property description:
      Defines a function to be called when a touch point is moved.
      Parameters:
      value - the value for the onTouchMoved property
      Since:
      JavaFX 2.2
      See Also:
    • getOnTouchMoved

      public final EventHandler<? super TouchEvent> getOnTouchMoved()
      Gets the value of the onTouchMoved property.
      Property description:
      Defines a function to be called when a touch point is moved.
      Returns:
      the value of the onTouchMoved property
      Since:
      JavaFX 2.2
      See Also:
    • onTouchMovedProperty

      public final ObjectProperty<EventHandler<? super TouchEvent>> 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

      public final void setOnTouchReleased(EventHandler<? super TouchEvent> value)
      Sets the value of the onTouchReleased property.
      Property description:
      Defines a function to be called when a touch point is released.
      Parameters:
      value - the value for the onTouchReleased property
      Since:
      JavaFX 2.2
      See Also:
    • getOnTouchReleased

      public final EventHandler<? super TouchEvent> getOnTouchReleased()
      Gets the value of the onTouchReleased property.
      Property description:
      Defines a function to be called when a touch point is released.
      Returns:
      the value of the onTouchReleased property
      Since:
      JavaFX 2.2
      See Also:
    • onTouchReleasedProperty

      public final ObjectProperty<EventHandler<? super TouchEvent>> 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

      public final void setOnTouchStationary(EventHandler<? super TouchEvent> value)
      Sets the value of the onTouchStationary property.
      Property description:
      Defines a function to be called when a touch point stays pressed and still.
      Parameters:
      value - the value for the onTouchStationary property
      Since:
      JavaFX 2.2
      See Also:
    • getOnTouchStationary

      public final EventHandler<? super TouchEvent> getOnTouchStationary()
      Gets the value of the onTouchStationary property.
      Property description:
      Defines a function to be called when a touch point stays pressed and still.
      Returns:
      the value of the onTouchStationary property
      Since:
      JavaFX 2.2
      See Also:
    • onTouchStationaryProperty

      public final ObjectProperty<EventHandler<? super TouchEvent>> 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 this Node to the back of its sibling nodes in terms of z-order. This is accomplished by moving this Node to the first position in its parent's content ObservableList. This function has no effect if this Node is not part of a group.
    • toFront

      public void toFront()
      Moves this Node to the front of its sibling nodes in terms of z-order. This is accomplished by moving this Node to the last position in its parent's content ObservableList. This function has no effect if this Node is not part of a group.