Spec-Zone .ru
спецификации, руководства, описания, API

JavaFX: Bringing Rich Experiences To All the Screens Of Your Life

expand all

Profile: desktop, common

Overview

Base class for scene graph nodes. A scene graph is a set of tree data structures where every item has zero or one parent, and each item is either a "leaf" with zero sub-items or a "branch" with zero or more sub-items.

Each item in the scene graph is called a Node. Branch nodes are of type Parent, whose concrete subclasses are Group, javafx.scene.layout.Container, javafx.scene.control.Control, CustomNode, or subclasses thereof.

Leaf nodes are classes such as javafx.scene.shape.Rectangle, javafx.scene.text.Text, javafx.scene.image.ImageView, javafx.scene.media.MediaView, or other such leaf classes which cannot have children. Only a single node within each scene graph tree will have no parent, which is often referred to as the "root" node.

There may be several trees in the scene graph. Some trees may be part of a Scene, in which case they are eligible to be displayed. Other trees might not part of any Scene.

A node may occur at most once anywhere in the scene graph. Specifically, a node must appear no more than once in all of the following: in the content sequence of a Group or javafx.scene.layout.Container, in the content sequence of a Scene, in the children sequence of a Parent, or as the clip of a Node. Note that the return value of the create function of a CustomNode subclass is added to the children sequence of that CustomNode, and as such, is subject to these restrictions.

The scene graph must not have cycles. A cycle would exist if a node is an ancestor of itself in the tree, considering the Group content sequence, Parent children sequence, and Node clip relationships mentioned above.

If a program adds a child node to a Parent (including Group, Container, CustomNode) or Scene, and that node is already a child of a different Parent or Scene, the node is automatically (and silently) removed from its former parent. If a program attempts to modify the scene graph in any other way that violates the above rules, an exception is thrown, the modification attempt is ignored and the scene graph is restored to its previous state.

It is possible to rearrange the structure of the scene graph, for example, to move a subtree from one location in the scene graph to another. In order to do this, one would normally remove the subtree from its old location before inserting it at the new location. However, the subtree will be automatically removed as described above if the application doesn't explicitly remove it.

String ID

Each node in the scene graph can be given a unique id. This id is much like the "id" attribute of an HTML tag in that it is up to the designer and developer to ensure that the id is unique within the scene graph. A convenience function called lookup(String) can be used to find a node with a unique id within the scene graph, or within a subtree of the scene graph.

Coordinate System

The Node class defines a traditional computer graphics "local" coordinate system in which the x axis increases to the right and the y axis increases downwards. The concrete node classes for shapes provide variables for configuring the geometry and location of the shape within this local coordinate space. For example, javafx.scene.shape.Rectangle provides x, y, width, height variables while javafx.scene.shape.Circle provides centerX, centerY, and radius.

Transformations

Any Node can have transformations applied to it. These include translation, rotation, scaling, or shearing transformations.

A translation transformation is one which shifts the origin of the node's coordinate space along either the x or y axis. For example, if you create a javafx.scene.shape.Rectangle which is drawn at the origin (x=0, y=0) and has a width of 100 and a height of 50, and then apply a javafx.scene.transform.Translate with a shift of 10 along the x axis (x=10), then the rectangle will appear drawn at (x=10, y=0) and remain 100 points wide and 50 tall. Note that the origin was shifted, not the x variable of the rectangle.

A rotation transformation is one which rotates the coordinate space of the node about a specified "pivot" point, causing the node to appear rotated. For example, if you create a javafx.scene.shape.Rectangle which is drawn at the origin (x=0, y=0) and has a width of 100 and height of 30 and you apply a javafx.scene.transform.Rotate with a 90 degree rotation (angle=90) and a pivot at the origin (pivotX=0, pivotY=0), then the rectangle will be drawn as if its x and y were zero but its height was 100 and its width -30. That is, it is as if a pin is being stuck at the top left corner and the rectangle is rotating 90 degrees clockwise around that pin. If the pivot point is instead placed in the center of the rectangle (at point x=50, y=15) then the rectangle will instead appear to rotate about its center.

Note that as with all transformations, the x, y, width, and height variables of the rectangle (which remain relative to the local coordinate space) have not changed, but rather the transformation alters the entire coordinate space of the rectangle.

A scaling transformation causes a node to either appear larger or smaller depending on the scaling factor. Scaling alters the coordinate space of the node such that each unit of distance along the axis in local coordinates is multipled by the scale factor. As with rotation transformations, scaling transformations are applied about a "pivot" point. You can think of this as the point in the Node around which you "zoom". For example, if you create a javafx.scene.shape.Rectangle with a strokeWidth of 5, and a width and height of 50, and you apply a javafx.scene.transform.Scale with scale factors (x=2.0, y=2.0) and a pivot at the origin (pivotX=0, pivotY=0), the entire rectangle (including the stroke) will double in size, growing to the right and downwards from the origin.

A shearing transformation, sometimes called a skew, effectively rotates one axis so that the x and y axes are no longer perpendicular.

Multiple transformations may be applied to a node by specifying an ordered chain of transforms. The order in which the transforms are applied is defined by the sequence specified in the transforms variable.

Bounding Rectangles

Since every Node has transformations, every Node's geometric bounding rectangle that can be described differently depending on whether transformations are accounted for or not.

At the simplest, Node's have a read-only boundsInLocal variable which specifies the bounding rectangle of the Node in untransformed local coordinates. boundsInLocal includes the Node's shape geometry, including any space required for a non-zero stroke that may fall outside the local position/size variables, and its clip and effect variables.

Each Node also has a read-only boundsInParent variable which specifies the bounding rectangle of the Node after all transformations have been applied, including those set in transforms, scaleX/scaleY, rotate, translateX/translateY, and layoutX/layoutY. It is called "boundsInParent" because the rectangle will be relative to the parent's coordinate system.

Finally, the layoutBounds variable defines the rectangular bounds of the Node that should be used as the basis for layout calculations and may differ from the visual bounds of the node. For shapes, Text, and ImageView, layoutBounds by default includes only the shape geometry, including space required for a non-zero strokeWidth, but does not include the effect, clip, or any transforms. For javafx.scene.layout.Resizable classes (Containers and Controls) layoutBounds will be mapped to 0,0 width x height.

Profile: common

Script Variable Summary

accessnametypeCan ReadCan InitCan WriteDefault Valuedescription

Variable Summary

accessnametypeCan ReadCan InitCan WriteDefault Valuedescription
publicblocksMouseBooleanfalse

If true, consumes mouse events in this Node and does not send them to other nodes further up the scene graph.

If true, consumes mouse events in this Node and does not send them to other nodes further up the scene graph. If a Node wants to block mouse events from going to nodes which are visually obscured by this Node, then set blocksMouse to true.

false

Profile: common

 
public-readboundsInLocalBounds

The rectangular bounds of this Node in the node's untransformed local coordinate space.

The rectangular bounds of this Node in the node's untransformed local coordinate space. For nodes that extend javafx.scene.shape.Shape, the local bounds will also include space required for a non-zero stroke that may fall outside the shape's geometry that is defined by position and size attributes. The local bounds will also include any clipping set with clip as well as effects set with effect.

Note that this method does not take the node's visibility into account; the test is based on the geometry of this Node only.

This variable will always be a non-null value.

Note that boundsInLocal is automatically recomputed whenever the geometry of a node changes. For this reason, it is an error to bind any of these values in a node to an expression that depends upon this variable. For example, the "x" or "y" variables of a shape should never be bound to boundsInLocal for the purpose of positioning the node.

Profile: common

 
public-readboundsInParentBounds

The rectangular bounds of this Node which include its transforms.

The rectangular bounds of this Node which include its transforms. boundsInParent is calculated by taking its local bounds (defined by boundsInLocal) and applying the transform created by setting the following additional variables:

  1. transforms[] sequence
  2. scaleX, scaleY
  3. rotate
  4. layoutX, layoutY
  5. translateX, translateY

The resulting bounds will be conceptually in the coordinate space of the Node's parent, however the node need not have a parent to calculate these bounds.

Note that this method does not take the node's visibility into account; the test is based on the geometry of this Node only.

This variable will always be a non-null value.

Note that boundsInParent is automatically recomputed whenever the geometry of a node changes, or when any of the following change: the transforms sequence, the translateX, translateY, layoutX, layoutY, scaleX, scaleY, or rotate variable. For this reason, it is an error to bind any of these values in a node to an expression that depends upon this variable. For example, the "x" or "y" variables of a shape, or translateX, translateY should never be bound to boundsInParent for the purpose of positioning the node.

Profile: common

 
publiccacheBooleanfalse

A performance hint to the system to indicate that this Node should be cached as a bitmap.

A performance hint to the system to indicate that this Node should be cached as a bitmap. Rendering a bitmap representation of a node will be faster than rendering primitives in many cases, especially in the case of primitives with effects applied (such as a blur). However, it also increases memory usage. This hint indicates whether that trade-off (increased memory usage for increased performance) is worthwhile. Also note that on some platforms such as GPU accelerated platforms there is little benefit to caching Nodes as bitmaps when blurs and other effects are used since they are very fast to render on the GPU. The cacheHint variable provides additional options for enabling more aggressive bitmap caching.

false

See Also:
Node.cacheHint

Profile: common

 
publiccacheHintCacheHintCacheHint.DEFAULT

Additional hint for controlling bitmap caching.

Additional hint for controlling bitmap caching.

Under certain circumstances, such as animating nodes that are very expensive to render, it is desirable to be able to perform transformations on the node without having to regenerate the cached bitmap. An option in such cases is to perform the transforms on the cached bitmap itself.

This technique can provide a dramatic improvement to animation performance, though may also result in a reduction in visual quality. The cacheHint variable provides a hint to the system about how and when that trade-off (visual quality for animation performance) is acceptable.

It is possible to enable the cacheHint only at times when your node is animating. In this way, expensive nodes can appear on screen with full visual quality, yet still animate smoothly.

Example:


 expensiveNode.cache = true;
 expensiveNode.cacheHint = CacheHint.QUALITY;
 ...
 // Do an animation
 expensiveNode.cacheHint = CacheHint.SPEED;
 Timeline {
     keyFrames: [
         KeyFrame {
             time: 2s
             values: [
                 expensiveNode.scaleX => 2.0,
                 expensiveNode.scaleY => 2.0,
                 expensiveNode.rotate=> 360,
                 expensiveNode.cacheHint => CacheHint.QUALITY
             ]
        }
     ]
 }.play();
 
Note that cacheHint is only a hint to the system. Depending on the details of the node or the transform, this hint may be ignored.

If Node.cache is false, cacheHint is ignored.

CacheHint.DEFAULT

See Also:
Node.cache

Profile: common

 
publicclipNodenull

Specifies a Node to use to define the the clipping shape for this Node.

Specifies a Node to use to define the the clipping shape for this Node. This clipping Node is not a child of this Node in the scene graph sense. Rather, it is used to define the clip for this Node.

For example, you can use an javafx.scene.image.ImageView Node as a mask to represent the Clip. Or you could use one of the geometric shape Nodes such as javafx.scene.shape.Rectangle or javafx.scene.shape.Circle. Or you could use a javafx.scene.text.Text node to represent the Clip.

See the class documentation for Node for scene graph structure restrictions on setting the clip. If these restrictions are violated by a change to the clip variable, the change is ignored and the previous value of the clip variable is restored.

Note: this is a conditional feature. See ConditionalFeature.SHAPE_CLIP for more information.

null

Profile: common conditional shape_clip

 
publiccursorCursornull

Defines the mouse cursor for this Node and subnodes.

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.

null

Profile: common

 
publicdisableBooleanfalse

Sets the individual disabled state of this Node.

Sets the individual disabled state of this Node. Setting disable to true will cause this Node and any subnodes to become disabled. This variable should be used only to set the disabled state of a Node. For querying the disabled state of a Node, the disabled variable should instead be used, since it is possible that a Node was disabled as a result of an ancestor being disabled even if the individual disable state on this Node is false.

false

Profile: common

 
public-readdisabledBooleanfalse

Indicates whether or not this Node is disabled.

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.

false

Profile: common

 
publiceffectEffectnull

Specifies an effect to apply to this Node.

Specifies an effect to apply to this Node.

Note: this is a conditional feature. See ConditionalFeature.EFFECT for more information.

null

Profile: common conditional effect

 
public-read protectedfocusedBooleansubclasssubclassfalse

Indicates whether this Node currently has the input focus.

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.

false

Profile: common

 
publicfocusTraversableBooleanfalse

Specifies whether this Node should be a part of focus traversal cycle.

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().

false

Profile: common

 
public-read protectedhoverBooleansubclasssubclassfalse

Whether or not this Node is being hovered over.

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: the 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.

false

Profile: common

 
publicidStringempty string

The id of this Node.

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 much like the "id" attribute of an HTML element.

empty string

Profile: common

 
public-read protectedlayoutBoundsBoundssubclasssubclass

The rectangular bounds that should be used for layout calculations on this Node.

The rectangular bounds that should be used for layout calculations on this Node. layoutBounds may differ from the visual bounds of the node and is computed differently depending on the node type.

See javafx.scene.shape.Shape, javafx.scene.text.Text, Group, and javafx.scene.layout.Resizable for detailed descriptions on how layoutBounds are computed.

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.

Profile: common

 
publiclayoutInfoLayoutInfoBase

Hook for node-specific layout information used by layout containers.

Hook for node-specific layout information used by layout containers. If the node is not a child of a container which supports layout info, this variable will be ignored.

Note that layoutInfo object literals may be shared across nodes, which means altering the vars on a LayoutInfo will affect all such nodes.

 
publiclayoutXNumber0

Defines the x coordinate of the translation that is added to this Node's transform for the purpose of layout.

Defines the x coordinate of the translation that is added to this Node's transform for the purpose of layout. The value should be computed as the offset required to adjust the position of the node from its current layoutBounds.minX position (which might not be 0) to the desired location.

For example, if textnode should be positioned at finalX:

     textnode.layoutX = finalX - textnode.layoutBounds.minX;
 

Failure to subtract layoutBounds.minX may result in misplacement of the node.

The node's final translation will be computed as layoutX + translateX, where layoutX establishes the node's stable position and translateX) optionally makes dynamic adjustments to that position.

If the node is managed and has a javafx.scene.layout.Container as its parent, then the container will set layoutX according to its own layout policy. If the node is unmanaged or parented by a Group or Scene , then the application may set layoutX directly to position it.

0

Profile: common

 
publiclayoutYNumber0

Defines the y coordinate of the translation that is added to this Node's transform for the purpose of layout.

Defines the y coordinate of the translation that is added to this Node's transform for the purpose of layout. The value should be computed as the offset required to adjust the position of the node from its current layoutBounds.minY position (which might not be 0) to the desired location.

For example, if textnode should be positioned at finalY:

     textnode.layoutY = finalY - textnode.layoutBounds.minY;
 

Failure to subtract layoutBounds.minY may result in misplacement of the node.

The node's final translation will be computed as layoutY + translateY, where layoutY establishes the node's stable position and translateY) optionally makes dynamic adjustments to that position.

If the node is managed and has a javafx.scene.layout.Container as its parent, then the container will set layoutY according to its own layout policy. If the node is unmanaged or parented by a Group or Scene , then the application may set layoutY directly to position it.

0

Profile: common

 
publicmanagedBooleantrue

Defines whether or not this node's layout will be managed by it's parent.

Defines whether or not this node's layout will be managed by it's parent. Each parent class follows a strategy for laying out managed children during the scene's layout pass:

  • Group: sets the size of any Resizable children to their preferred size; does not alter the size of non-Resizable children; does not position children.
  • javafx.scene.layout.Container classes: set the size of any javafx.scene.layout.Resizable content according to its layout rules and each Resizable's sizing preferences; does not alter the size of non-Resizable content; will position nodes (setting layoutX/layoutY) according to its layout rules.
  • CustomNode: by default it behaves like Group, however its layout behavior may be overridden by a subclass.
Parents will ignore unmanaged children for the purposes of layout and it is the application's responsibility to set the size and position of an unmanaged node. By default all nodes are managed.

If a Parent node is unmanaged, then it will act as a root for layout, which means that layout requests beneath it will cause only the branch rooted by the parent node to be relayed out.

true  
publiconKeyPressedfunction(:KeyEvent):Void

Defines a function to be called when this Node has input focus and a key has been pressed.

publiconKeyReleasedfunction(:KeyEvent):Void

Defines a function to be called when this Node has input focus and a key has been released.

publiconKeyTypedfunction(:KeyEvent):Void

Defines a function to be called when this Node has input focus and a key has been typed.

publiconMouseClickedfunction(:MouseEvent):Void

Defines a function to be called when a mouse button has been clicked (pressed and released) on this Node.

publiconMouseDraggedfunction(:MouseEvent):Void

Defines a function to be called when a mouse button is pressed on this Node and then dragged.

publiconMouseEnteredfunction(:MouseEvent):Void

Defines a function to be called when the mouse enters this Node.

publiconMouseExitedfunction(:MouseEvent):Void

Defines a function to be called when the mouse exits this Node.

publiconMouseMovedfunction(:MouseEvent):Void

Defines a function to be called when mouse cursor moves within this Node but no buttons have been pushed.

publiconMousePressedfunction(:MouseEvent):Void

Defines a function to be called when a mouse button has been pressed on this Node.

publiconMouseReleasedfunction(:MouseEvent):Void

Defines a function to be called when a mouse button has been released on this Node.

publiconMouseWheelMovedfunction(:MouseEvent):Void

Defines a function to be called when the mouse scroll wheel has moved.

publicopacityNumber1.0

Specifies how opaque (that is, solid) the Node appears.

Specifies how opaque (that is, solid) the Node appears. A Node with 0% opacity is fully translucent. That is, while it is still visible and rendered, you generally won't be able to see it. The exception to this rule is when the ZNode is combined with a blending mode and blend effect in which case a translucent Node may still have an impact in rendering. An opacity of 50% will render the node as being 50% transparent.

A visible node with any opacity setting still receives mouse events and can receive keyboard focus. For example, if you want to have a large invisible rectangle overlay all Nodes in the scene graph in order to intercept mouse events but not be visible to the user, you could create a large Rectangle that had an opacity of 0%.

Opacity is specified as a value between 0 and 1. Values less than 0 or greater than 1 are clipped to 0 and 1 respectively.

On some platforms ImageView might not support opacity variable.

1.0

Profile: common

 
public-read packageparentParentnull

The parent of this Node.

The parent of this Node. If this Node has not been added to a scene graph, then parent will be null.

null

Profile: common

 
publicpickOnBoundsBooleanfalse

Defines how the picking computation is done for this node when triggered by a MouseEvent or a contains function call.

Defines how the picking computation is done for this node when triggered by a MouseEvent or a contains function call. If pickOnBounds is true, then picking is computed by intersecting with the bounds of this node, else picking is computed by intersecting with the geometric shape of this node.

false

Profile: common

 
public-read protectedpressedBooleansubclasssubclassfalse

Whether or not the Node is pressed.

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".

false

Profile: common

 
publicrotateNumber0.0

Defines the angle of rotation about the Node's center, measured in degrees.

Defines the angle of rotation about the Node's center, measured in degrees. This is used to rotate the Node.

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

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

Note that because the pivot point is computed as the center of this Node's layout bounds, any change to the layout bounds will cause the pivot point to change, which can move the object. For a leaf node, any change to the geometry will cause the layout bounds to change. For a group node, any change to any of its children, including a change in a child's geometry, clip, effect, position, orientation, or scale, will cause the group's layout bounds to change. If this movement of the pivot point is not desired, applications should instead use the Node's transforms[] sequence, and add a javafx.scene.transform.Rotate transform, which has a user-specifiable pivot point.

0.0

Profile: common

 
publicrotationAxisPoint3DRotate.Z_AXIS

Defines the axis of rotation of this Node.

Defines the axis of rotation of this Node.

Note: this is a conditional feature. See ConditionalFeature.SCENE3D for more information.

Rotate.Z_AXIS

Profile: common conditional scene3d

 
publicscaleXNumber1.0

Defines the factor by which coordinates are scaled about the center of the object along the X axis of this Node.

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 animate 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.

1.0

Profile: common

 
publicscaleYNumber1.0

Defines the factor by which coordinates are scaled about the center of the object along the Y axis of this Node.

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 animate 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.

1.0

Profile: common

 
publicscaleZNumber1.0

Defines the factor by which coordinates are scaled about the center of the object along the Z axis of this Node.

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 animate 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 rectangular bounds formed by taking boundsInLocal and applying all the transforms in the transforms[] sequence.

Note: this is a conditional feature. See ConditionalFeature.SCENE3D for more information.

1.0

Profile: common conditional scene3d

 
public-read packagesceneScenenull

The Scene that this Node is part of.

The Scene that this Node is part of. If the Node is not part of a scene, then this variable will be null.

null

Profile: common

 
publicstyleStringempty string

A string representation of the CSS style associated with this specific Node.

A string representation of the CSS style associated with this specific Node. This is exactly analogous to the "style" attribute on an HTML element, but uses the syntax defined in JavaFX CSS. Parsing this style might not be supported on some limited platforms. It is recomended to use standalone CSS file instead.

empty string

Profile: common

 
publicstyleClassStringempty string

A String identifier which can be used to logically group Nodes, specifically for an external style engine.

A String identifier which can be used to logically group Nodes, specifically for an external style engine. This variable is exactly analogous to the styleClass attribute on an HTML element.

empty string

Profile: common

 
publictransformsTransform[]empty

Defines the sequence of javafx.scene.transform.Transform objects to be applied to this Node.

Defines the sequence of javafx.scene.transform.Transform objects to be applied to this Node. This sequence of transforms is applied before translateX, translateY, scaleX, and scaleY, rotate transforms.

empty

Profile: common

 
publictranslateXNumber0

Defines the x coordinate of the translation that is added to this Node's transform.

Defines the x coordinate of the translation that is added to this Node's transform.

The node's final translation will be computed as layoutX + translateX, where layoutX establishes the node's stable position and translateX optionally makes dynamic adjustments to that position.

This variable can be used to alter the location of a node without disturbing its layoutBounds, which makes it useful for animating a node's location.

0

Profile: common

 
publictranslateYNumber0

Defines the y coordinate of the translation that is added to this Node's transform.

Defines the y coordinate of the translation that is added to this Node's transform.

The node's final translation will be computed as layoutY + translateY, where layoutY establishes the node's stable position and translateY optionally makes dynamic adjustments to that position.

This variable can be used to alter the location of a node without disturbing its layoutBounds, which makes it useful for animating a node's location.

0

Profile: common

 
publictranslateZNumber0

Defines the Z coordinate of the translation that is added to the transformed coordinates of this Node.

Defines the Z coordinate of the translation that is added to the transformed coordinates of this Node. This value will be added to any translation defined by the transforms sequence and layoutZ.

This variable can be used to alter the location of a Node without disturbing its layout bounds, which makes it useful for animating a node's location.

Note: this is a conditional feature. See ConditionalFeature.SCENE3D for more information.

0

Profile: common conditional scene3d

 
publicvisibleBooleantrue

Specifies whether this Node and any subnodes should be rendered as part of the scene graph.

Specifies whether this Node and any subnodes should be rendered as part of the scene graph. A node may be visible and yet not be shown in the rendered scene if, for instance, it is off the screen or obscured by another Node. Invisible nodes never receive mouse events or keyboard focus, and never maintain keyboard focus when they become invisible.

true

Profile: common

 

Inherited Variables

Function Summary

public contains(localX: Number, localY: Number) : Boolean

Returns true if the given point (specified in the local coordinate space of this Node) is contained within the shape of this Node.

Returns true if the given point (specified in the local coordinate space of this Node) is contained within the shape of this Node. Note that this method does not take visibility into account; the test is based on the geometry of this Node only.

Parameters
localX
localY
Returns
Boolean

Profile: common

 
public contains(localPoint: Point2D) : Boolean

Returns true if the given point (specified in the local coordinate space of this Node) is contained within the shape of this Node.

Returns true if the given point (specified in the local coordinate space of this Node) is contained within the shape of this Node. Note that this method does not take visibility into account; the test is based on the geometry of this Node only.

Parameters
localPoint
Returns
Boolean

Profile: common

 
public intersects(localX: Number, localY: Number, localWidth: Number, localHeight: Number) : Boolean

Returns true if the given rectangle (specified in the local coordinate space of this Node) intersects the shape of this Node.

Returns true if the given rectangle (specified in the local coordinate space of this Node) intersects the shape of this Node. Note that this method does not take visibility into account; the test is based on the geometry of this Node only. The default behavior of this function is simply to check if the given coordinates intersect with the local bounds.

Parameters
localX
localY
localWidth
localHeight
Returns
Boolean

Profile: common

 
public intersects(localBounds: Bounds) : Boolean

Returns true if the given bounds (specified in the local coordinate space of this Node) intersects the shape of this Node.

Returns true if the given bounds (specified in the local coordinate space of this Node) intersects the shape of this Node. Note that this method does not take visibility into account; the test is based on the geometry of this Node only. The default behavior of this function is simply to check if the given coordinates intersect with the local bounds.

Parameters
localBounds
Returns
Boolean

Profile: common

 
public localToParent(localX: Number, localY: Number) : Point2D

Transforms a point from the local coordinate space of this Node into the coordinate space of its parent.

Transforms a point from the local coordinate space of this Node into the coordinate space of its parent.

Parameters
localX
localY
Returns
Point2D

Profile: common

 
public localToParent(localPoint: Point2D) : Point2D

Transforms a point from the local coordinate space of this Node into the coordinate space of its parent.

Transforms a point from the local coordinate space of this Node into the coordinate space of its parent.

Parameters
localPoint
Returns
Point2D

Profile: common

 
public localToParent(localBounds: Bounds) : Bounds

Transforms a bounds from the local coordinate space of this Node into the coordinate space of its parent.

Transforms a bounds from the local coordinate space of this Node into the coordinate space of its parent.

Parameters
localBounds
Returns
Bounds

Profile: common

 
public localToScene(localX: Number, localY: Number) : Point2D

Transforms a point from the local coordinate space of this Node into the coordinate space of its javafx.scene.Scene.

Transforms a point from the local coordinate space of this Node into the coordinate space of its javafx.scene.Scene.

Parameters
localX
localY
Returns
Point2D

Profile: common

 
public localToScene(localPoint: Point2D) : Point2D

Transforms a point from the local coordinate space of this Node into the coordinate space of its javafx.scene.Scene.

Transforms a point from the local coordinate space of this Node into the coordinate space of its javafx.scene.Scene.

Parameters
localPoint
Returns
Point2D

Profile: common

 
public localToScene(localBounds: Bounds) : Bounds

Transforms a bounds from the local coordinate space of this Node into the coordinate space of its javafx.scene.Scene.

Transforms a bounds from the local coordinate space of this Node into the coordinate space of its javafx.scene.Scene.

Parameters
localBounds
Returns
Bounds

Profile: common

 
public lookup(id: java.lang.String) : Node

Finds this Node, or the first subnode, with the given id.

Finds this Node, or the first subnode, with the given id. If this node is a Parent, then this function will traverse down into the branch until it finds a match. If more than one subnode has the specified id, this function returns one of them. Which node it returns in that case is unspecified.

Parameters
id
The id of the node to find
Returns
Node
The first node, starting from this Node , which has an id of id .

Profile: common

 
public parentToLocal(parentX: Number, parentY: Number) : Point2D

Transforms a point from the coordinate space of the parent into the local coordinate space of this Node.

Transforms a point from the coordinate space of the parent into the local coordinate space of this Node.

Parameters
parentX
parentY
Returns
Point2D

Profile: common

 
public parentToLocal(parentPoint: Point2D) : Point2D

Transforms a point from the coordinate space of the parent into the local coordinate space of this Node.

Transforms a point from the coordinate space of the parent into the local coordinate space of this Node.

Parameters
parentPoint
Returns
Point2D

Profile: common

 
public parentToLocal(parentBounds: Bounds) : Bounds

Transforms a rectangle from the coordinate space of the parent into the local coordinate space of this Node.

Transforms a rectangle from the coordinate space of the parent into the local coordinate space of this Node.

Parameters
parentBounds
Returns
Bounds

Profile: common

 
public requestFocus() : Void

Requests that this Node get the input focus, and that this Node's top-level ancestor become the focused window.

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.

Profile: common

 
public sceneToLocal(sceneX: Number, sceneY: Number) : Point2D

Transforms a point from the coordinate space of the Scene into the local coordinate space of this Node.

Transforms a point from the coordinate space of the Scene into the local coordinate space of this Node.

Parameters
sceneX
sceneY
Returns
Point2D

Profile: common

 
public sceneToLocal(scenePoint: Point2D) : Point2D

Transforms a point from the coordinate space of the javafx.scene.Scene into the local coordinate space of this Node.

Transforms a point from the coordinate space of the javafx.scene.Scene into the local coordinate space of this Node.

Parameters
scenePoint
Returns
Point2D

Profile: common

 
public sceneToLocal(sceneBounds: Bounds) : Bounds

Transforms a rectangle from the coordinate space of the javafx.scene.Scene into the local coordinate space of this Node.

Transforms a rectangle from the coordinate space of the javafx.scene.Scene into the local coordinate space of this Node.

Parameters
sceneBounds
Returns
Bounds

Profile: common

 
public toBack() : Void

Moves this Node to the back of its sibling nodes in terms of z-order.

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 sequence. This function has no effect if this Node is not part of a group.

Profile: common

 
public toFront() : Void

Moves this Node to the front of its sibling nodes in terms of z-order.

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 sequence. This function has no effect if this Node is not part of a group.

Profile: common

 
public toString() : java.lang.String
Returns
String
 

Inherited Functions