Top Description Inners Fields Constructors Methods
javafx.scene

public abstract sealed Class Node

extends Object
implements EventTarget, Styleable
permits AbstractNode, Camera, LightBase, Parent, SubScene, Canvas, ImageView, Shape, Shape3D
Class Inheritance
All Implemented Interfaces
javafx.css.Styleable, javafx.event.EventTarget
Known Direct Subclasses
javafx.scene.Camera, javafx.scene.LightBase, javafx.scene.Parent, javafx.scene.SubScene, javafx.scene.canvas.Canvas, javafx.scene.image.ImageView, javafx.scene.shape.Shape, javafx.scene.shape.Shape3D, com.sun.javafx.scene.AbstractNode
Annotations
@IDProperty:id
Imports
com.sun.javafx.geometry.BoundsUtils, com.sun.javafx.scene.traversal.TraversalMethod, .Direction, javafx.application.Platform, javafx.beans.InvalidationListener, .Observable, javafx.beans.binding.BooleanExpression, javafx.beans.property.BooleanProperty, .BooleanPropertyBase, .DoubleProperty, .DoublePropertyBase, .IntegerProperty, .ObjectProperty, .ObjectPropertyBase, .Property, .ReadOnlyBooleanProperty, .ReadOnlyBooleanPropertyBase, .ReadOnlyBooleanWrapper, .ReadOnlyObjectProperty, .ReadOnlyObjectPropertyBase, .ReadOnlyObjectWrapper, .SimpleBooleanProperty, .SimpleObjectProperty, .StringProperty, .StringPropertyBase, javafx.beans.value.ChangeListener, javafx.collections.FXCollections, .ListChangeListener.Change, .ObservableList, .ObservableMap, .ObservableSet, javafx.css.CssMetaData, .ParsedValue, .PseudoClass, .StyleConverter, .StyleOrigin, .Styleable, .StyleableBooleanProperty, .StyleableDoubleProperty, .StyleableObjectProperty, .StyleableProperty, .Selector, .Style, javafx.event.Event, .EventDispatchChain, .EventDispatcher, .EventHandler, .EventTarget, .EventType, javafx.geometry.BoundingBox, .Bounds, .NodeOrientation, .Orientation, .Point2D, .Point3D, .Rectangle2D, javafx.scene.canvas.Canvas, javafx.scene.effect.BlendMode, .Effect, javafx.scene.image.ImageView, .WritableImage, javafx.scene.input.ContextMenuEvent, .DragEvent, .Dragboard, .InputEvent, .InputMethodEvent, .InputMethodRequests, .KeyEvent, .MouseDragEvent, .MouseEvent, .PickResult, .RotateEvent, .ScrollEvent, .SwipeEvent, .TouchEvent, .TransferMode, .ZoomEvent, javafx.scene.shape.Shape, .Shape3D, javafx.scene.text.Font, javafx.scene.transform.Rotate, .Transform, javafx.stage.Window, javafx.util.Callback, java.util.ArrayList, .Arrays, .Collections, .EnumSet, .HashMap, .LinkedList, .List, .Map, .Set, com.sun.glass.ui.Accessible, .Application, com.sun.javafx.util.Logging, .TempState, .Utils, com.sun.javafx.beans.IDProperty, com.sun.javafx.beans.event.AbstractNotifyListener, com.sun.javafx.collections.TrackableObservableList, .UnmodifiableListSet, com.sun.javafx.css.PseudoClassState, .TransitionDefinition, .TransitionDefinitionConverter, .TransitionDefinitionCssMetaData, .TransitionTimer, com.sun.javafx.css.media.MediaQueryContext, javafx.css.converter.BooleanConverter, .CursorConverter, .EffectConverter, .EnumConverter, .SizeConverter, com.sun.javafx.effect.EffectDirtyBits, com.sun.javafx.geom.BaseBounds, .BoxBounds, .PickRay, .RectBounds, .Vec3d, com.sun.javafx.geom.transform.Affine3D, .BaseTransform, .GeneralTransform3D, .NoninvertibleTransformException, com.sun.javafx.perf.PerformanceTracker, com.sun.javafx.scene.AbstractNode, .BoundsAccessor, .CameraHelper, .CssFlags, .DirtyBits, .EventHandlerProperties, .LayoutFlags, .NodeEventDispatcher, .NodeHelper, .SceneHelper, .SceneUtils, com.sun.javafx.scene.input.PickResultChooser, com.sun.javafx.scene.transform.TransformHelper, .TransformUtils, com.sun.javafx.sg.prism.NGNode, com.sun.javafx.tk.Toolkit, com.sun.prism.impl.PrismSettings, com.sun.scenario.effect.EffectHelper, com.sun.javafx.logging.PlatformLogger, .PlatformLogger.Level

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.Region, and javafx.scene.control.Control, 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 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 be 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: as the root node of a Scene, the children ObservableList of a Parent, or as the clip of a Node.

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 ObservableList, Parent children ObservableList, and Node clip relationships mentioned above.

If a program adds a child node to a Parent (including Group, Region, etc) and that node is already a child of a different Parent or the root of a 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.

Node objects may be constructed and modified on any thread as long they are not yet attached to a Scene in a Window that is showing. An application must attach nodes to such a Scene or modify them on the JavaFX Application Thread.

The JavaFX Application Thread is created as part of the startup process for the JavaFX runtime. See the javafx.application.Application class and the Platform#startup(Runnable) method for more information.

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. The id can also be used identify nodes for applying styles; see the CSS section below.

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

At the device pixel level, integer coordinates map onto the corners and cracks between the pixels and the centers of the pixels appear at the midpoints between integer pixel locations. Because all coordinate values are specified with floating point numbers, coordinates can precisely point to these corners (when the floating point values have exact integer values) or to any location on the pixel. For example, a coordinate of (0.5, 0.5) would point to the center of the upper left pixel on the Stage. Similarly, a rectangle at (0, 0) with dimensions of 10 by 10 would span from the upper left corner of the upper left pixel on the Stage to the lower right corner of the 10th pixel on the 10th scanline. The pixel center of the last pixel inside that rectangle would be at the coordinates (9.5, 9.5).

In practice, most nodes have transformations applied to their coordinate system as mentioned below. As a result, the information above describing the alignment of device coordinates to the pixel grid is relative to the transformed coordinates, not the local coordinates of the nodes. The Shape class describes some additional important context-specific information about coordinate mapping and how it can affect rendering.

Transformations

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

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 common node transform is a translation by an integer distance, most often used to lay out nodes on the stage. Such integer translations maintain the device pixel mapping so that local coordinates that are integers still map to the cracks between pixels.

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 multiplied 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. Custom transforms are applied using the transforms list. Predefined transforms are applied using the properties specified below. The matrices that represent the transforms are multiplied in this order:

  1. Layout (layoutX, layoutY) and translate (translateX, translateY, translateZ)
  2. Rotate (rotate)
  3. Scale (scaleX, scaleY, scaleZ)
  4. Transforms list (transforms) starting from element 0
The transforms are applied in the reverse order of the matrix multiplication outlined above: last element of the transforms list to 0th element, scale, rotate, and layout and translate. By applying the transforms in this order, the bounds in the local coordinates of the node are transformed to the bounds in the parent coordinate of the node (see the Bounding Rectangles section).

Bounding Rectangles

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

Each Node has 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 as specified in the Transformations section. It is called "boundsInParent" because the rectangle will be relative to the parent's coordinate system. This is the 'visual' bounds of the node.

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 resizable classes (Regions and Controls) layoutBounds will always map to 0,0 width x height.

The image shows a node without any transformation and its boundsInLocal:

A sine wave shape enclosed by
an axis-aligned rectangular bounds

If we rotate the image by 20 degrees we get following result:

An axis-aligned rectangular
bounds that encloses the shape rotated by 20 degrees

The red rectangle represents boundsInParent in the coordinate space of the Node's parent. The boundsInLocal stays the same as in the first image, the green rectangle in this image represents boundsInLocal in the coordinate space of the Node.

The images show a filled and stroked rectangle and their bounds. The first rectangle [x:10.0 y:10.0 width:100.0 height:100.0 strokeWidth:0] has the following bounds bounds: [x:10.0 y:10.0 width:100.0 height:100.0]. The second rectangle [x:10.0 y:10.0 width:100.0 height:100.0 strokeWidth:5] has the following bounds: [x:7.5 y:7.5 width:105 height:105] (the stroke is centered by default, so only half of it is outside of the original bounds; it is also possible to create inside or outside stroke). Since neither of the rectangles has any transformation applied, boundsInParent and boundsInLocal are the same.

The rectangles are enclosed by their
respective bounds

CSS

The Node class contains id, styleClass, and style variables that are used in styling this node from CSS. The id and styleClass variables are used in CSS style sheets to identify nodes to which styles should be applied. The style variable contains style properties and values that are applied directly to this node.

For further information about CSS and how to apply CSS styles to nodes, see the CSS Reference Guide.

Since
JavaFX 2.0

Nested and Inner Type Summary

Modifier and TypeClass and Description
private class
private class
pack-priv abstract class
Node.FocusPropertyBase

Special boolean property which allows for atomic focus change.

private class
private abstract static class
private abstract static class
private class
private class
private class
private static class
Node.StyleableProperties

Super-lazy instantiation pattern from Bill Pugh.

private static class
Node.TransitionDefinitionCollection

Contains descriptions of the animated transitions that are currently defined for properties of this Node.

private static class
Node.TransitionTimerCollection

The list of running transition timers for this node, implemented as a mapping of CSS property names to TransitionTimer instances.

pack-priv class

Field Summary

Modifier and TypeField and Description
private BaseBounds
_geomBounds

A temporary rect used for computing bounds by the various bounds variables.

private BaseBounds
pack-priv Node.AccessibilityProperties
pack-priv Accessible
private ObjectProperty<AccessibleRole>
accessibleRole

The accessible role for this Node.

private static final byte
private static final byte
private static final byte
public static final double
BASELINE_OFFSET_SAME_AS_HEIGHT

This is a special value that might be returned by getBaselineOffset().

private ObjectProperty<BlendMode>
blendMode

The javafx.scene.effect.BlendMode used to blend this individual node into the scene behind it.

private static final BoundsAccessor
pack-priv boolean
boundsChanged

This special flag is used only by Parent to flag whether or not the *parent* has processed the fact that bounds have changed for this child Node.

private boolean
private Node
clipParent

If this Node is being used as the clip of another Node, that other node is referred to as the clipParent.

pack-priv CssFlags
cssFlag

Flags used to indicate in which way this node is dirty (or whether it is clean) and what must happen during the next CSS cycle on the scenegraph.

private static final boolean
private static final CacheHint
private static final Node
private static final Cursor
private static final DepthTest
private static final boolean
private static final Effect
private static final InputMethodRequests
private static final boolean
private static final double
private static final Point3D
private static final double
private static final double
private static final double
private static final double
private static final double
private static final double
private static final double
private boolean
private Set<DirtyBits>
dirtyBits

Set of dirty bits that are set when state is invalidated and cleared by the updateState method, which is called from the synchronizer.

private ReadOnlyBooleanWrapper
disabled

Indicates whether or not this Node is disabled.

private static final PseudoClass
private static final byte
private static final byte
private static final byte
private Node.EffectiveOrientationProperty
private static final double
private ObjectProperty<EventDispatcher>
eventDispatcher

Specifies the event dispatcher for this node.

private EventHandlerProperties
private static final PseudoClass
private static final PseudoClass
private final Node.FocusPropertyBase
focused

Indicates whether this Node currently has the input focus.

private static final PseudoClass
private BooleanProperty
focusTraversable

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

pack-priv final Node.FocusPropertyBase
focusVisible

Indicates whether this Node should visibly indicate focus.

private final Node.FocusWithinProperty
focusWithin

Indicates whether this Node or any of its descendants currently has the input focus.

private BaseBounds
geomBounds

The cached bounds.

private boolean
private ReadOnlyBooleanWrapper
hover

Whether or not this Node is being hovered over.

private static final PseudoClass
private StringProperty
id

The id of this Node.

private boolean
initialCssState

A node is considered to be in its initial CSS state if it wasn't shown in a scene graph before.

private NodeEventDispatcher
private Node
labeledBy

References a node that is a labelFor this node.

private Node.LazyBoundsProperty
layoutBounds

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

private DoubleProperty
layoutX

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

private DoubleProperty
layoutY

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

private BaseBounds
localBounds

The cached local bounds (without transforms, with clip and effects).

private boolean
private BaseTransform
localToParentTx

An affine transform that holds the computed local-to-parent transform.

private BooleanProperty
managed

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

private Node.MiscProperties
private NodeHelper
private ObjectProperty<NodeOrientation>
nodeOrientation

Node orientation describes the flow of visual data within a node.

private Node.NodeTransformation
private DoubleProperty
opacity

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

private ReadOnlyObjectWrapper<Parent>
parent

The parent of this Node.

private NGNode
peer

The peer node created by the graphics Toolkit/Pipeline implementation

private boolean
private BooleanProperty
pickOnBounds

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

private EventDispatcher
preprocessMouseEventDispatcher

Event dispatcher for invoking preprocessing of mouse events

private ReadOnlyBooleanWrapper
pressed

Whether or not the Node is pressed.

private static final PseudoClass
private ObservableMap<Object, Object>
pack-priv final ObservableSet<PseudoClass>
private byte
private Node.ReadOnlyObjectWrapperManualFire<Scene>
scene

The Scene that this Node is part of.

private static final PseudoClass
private BooleanProperty
private StringProperty
style

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

private ObservableList<String>
styleClass

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

pack-priv CssStyleHelper
styleHelper

A StyleHelper for this node.

private SubScene
private boolean
transformDirty

This flag is used to indicate that localToParentTx is dirty and needs to be recomputed.

private boolean
private Node.TreeVisibleProperty
private BaseBounds
txBounds

The cached transformed bounds.

private boolean
private final ObservableSet<PseudoClass>
private static final Object
private BooleanProperty
visible

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

Constructor Summary

AccessConstructor and Description
protected
Node()

Creates a new instance of Node.

Method Summary

Modifier and TypeMethod and Description
public final ObjectProperty<String>

Returns:

the accessible help text for this Node.
accessibleHelpProperty
()

The accessible help text for this Node.

public final ObjectProperty<String>

Returns:

the role description of this Node.
accessibleRoleDescriptionProperty
()

The role description of this Node.

public final ObjectProperty<AccessibleRole>
public final ObjectProperty<String>

Returns:

accessible text for this Node.
accessibleTextProperty
()

The accessible text for this Node.

public final <T extends Event> void
addEventFilter(final EventType<T> eventType, final EventHandler<? super T> eventFilter)

Overrides default javafx.event.EventTarget.addEventFilter.

Registers an event filter for this target.

public final <T extends Event> void
addEventHandler(final EventType<T> eventType, final EventHandler<? super T> eventHandler)

Overrides default javafx.event.EventTarget.addEventHandler.

Registers an event handler for this target.

private void
private void
addTransitionTimer(String
the CSS name of the targeted property
propertyName
,
TransitionTimer
the transition timer
timer
)

Called by animatable StyleableProperty implementations in order to register a running TransitionTimer with this Node.

pack-priv static boolean
almostZero(double a)

public final void
applyCss()

If required, apply styles to this Node and its children, if any.

public final void
autosize()

If the node is resizable, will set its layout bounds to its current preferred width and height.

public final ObjectProperty<BlendMode>
pack-priv double
boundedSize(double value, double min, double max)

public final ReadOnlyObjectProperty<Bounds>

Returns:

the boundsInLocal for this Node
boundsInLocalProperty
()

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

public final ReadOnlyObjectProperty<Bounds>

Returns:

the boundsInParent property for this Node
boundsInParentProperty
()

The rectangular bounds of this Node in the parent coordinate system.

public EventDispatchChain
buildEventDispatchChain(EventDispatchChain tail)

Implements javafx.event.EventTarget.buildEventDispatchChain.

Construct an event dispatch chain for this target.

public final ObjectProperty<CacheHint>

Returns:

the CacheHint for this Node
cacheHintProperty
()

Additional hint for controlling bitmap caching.

public final BooleanProperty

Returns:

the hint to cache for this Node
cacheProperty
()

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

private byte
private byte
pack-priv final void
clearDirty(DirtyBits dirtyBit)

Clear the specified dirty bit

private void
clearDirty()

Clear all dirty bits

pack-priv void
public final ObjectProperty<Node>

Returns:

the the clipping shape for this Node
clipProperty
()

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

pack-priv void
completeTransitionTimers()

Completes all running timers, which skips the rest of their animation and sets the property to the target value.

public double

Returns:

the area of this Node projected onto the physical screen
computeAreaInScreen
()

Returns the area of this Node projected onto the physical screen in pixel units.

pack-priv void
computeDerivedDepthTest()

Recompute the derived depth test flag.

private BaseBounds
computeLocalBounds(BaseBounds bounds, BaseTransform tx)

Computes the local bounds of this Node.

public boolean

Returns:

the result of contains for this Node
contains
(double
the x coordinate of the point in Node's space
localX
,
double
the y coordinate of the point in Node's space
localY
)

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

public boolean

Returns:

the result of contains for this Node
contains
(Point2D
the 2D point in Node's space
localPoint
)

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

private boolean
containsBounds(double localX, double localY)

private NodeEventDispatcher
public final ObjectProperty<Cursor>

Returns:

the mouse cursor for this Node and subnodes
cursorProperty
()

Defines the mouse cursor for this Node and subnodes.

public final ObjectProperty<DepthTest>

Returns:

the depth test setting for this Node
depthTestProperty
()

Indicates whether depth testing is used when rendering this node.

public final ReadOnlyBooleanProperty
private ReadOnlyBooleanWrapper
public final BooleanProperty

Returns:

the disabled state for this Node
disableProperty
()

Defines the individual disabled state of this Node.

private double
private boolean
private Bounds
private void
private void
private void
private void
private void
doMarkDirty(DirtyBits dirtyBit)

Mark the specified bit as dirty, and add this node to the scene's dirty list.

private void
private void
private void
private WritableImage
private void
private void
public final ReadOnlyObjectProperty<NodeOrientation>

Returns:

the node orientation for this Node
effectiveNodeOrientationProperty
()

The effective orientation of a node resolves the inheritance of node orientation, returning either left-to-right or right-to-left.

public final ObjectProperty<Effect>

Returns:

the effect for this Node
effectProperty
()

Specifies an effect to apply to this Node.

public final ObjectProperty<EventDispatcher>
public void
executeAccessibleAction(AccessibleAction
the action to execute
action
,
Object...
optional list of parameters
parameters
)

This method is called by the assistive technology to request the action indicated by the argument should be executed.

pack-priv Map<StyleableProperty<?>, List<Style>>
private TransitionTimer

Returns:

the transition timer, or null if the property is not targeted by a transition timer
findTransitionTimer
(String
the CSS name of the targeted property
propertyName
)

Finds the transition timer that targets the specified propertyName.

private Map<String, TransitionTimer>

Returns:

a mapping of property names to transition timers, or an empty map if the property is not targeted by any transition timers
findTransitionTimers
(StyleableProperty<?>
the targeted property
property
)

Finds all transition timers that target the specified property.

public final void
fireEvent(Event
the event to fire
event
)

Fires the specified event.

public final ReadOnlyBooleanProperty
private void
focusSetDirty(Scene s)

Called when something has changed on this node that *may* have made the scene's focus dirty.

public final BooleanProperty
public final ReadOnlyBooleanProperty
public final ReadOnlyBooleanProperty
private Node.AccessibilityProperties
pack-priv Accessible
public final String
public final AccessibleRole
public final String
public final String
private static byte
getAutomaticOrientation(final byte resolvedNodeOrientation)

public double

Returns:

offset of text baseline from layoutBounds.minY for non-resizable Nodes or BASELINE_OFFSET_SAME_AS_HEIGHT otherwise
getBaselineOffset
()

The 'alphabetic' (or 'roman') baseline offset from the node's layoutBounds.minY location that should be used when this node is being vertically aligned by baseline with other nodes.

public final BlendMode
public final Bounds
public final Bounds
public final CacheHint
public static List<CssMetaData<? extends Styleable, ?>>

Returns:

the CssMetaData
getClassCssMetaData
()

Gets the CssMetaData associated with this class, which may include the CssMetaData of its superclasses.

public final Node
pack-priv final Node
public Orientation

Returns:

orientation of width/height dependency or null if there is none
getContentBias
()

Returns the orientation of a node's resizing bias for layout purposes.

pack-priv final CssFlags
getCSSFlags()

Needed for testing.

public List<CssMetaData<? extends Styleable, ?>>

Returns:

The CssMetaData associated with this node, which may include the CssMetaData of its superclasses.
getCssMetaData
()

Implements javafx.css.Styleable.getCssMetaData.

This method should delegate to Node#getClassCssMetaData() so that a Node's CssMetaData can be accessed without the need for reflection.

pack-priv Transform
public final Cursor
public final DepthTest
public final Effect
public final NodeOrientation
private static byte
getEffectiveOrientation(final byte resolvedNodeOrientation)

public final EventDispatcher
private EventHandlerProperties
pack-priv BaseBounds
getGeomBounds(BaseBounds bounds, BaseTransform tx)

Loads the given bounds object with the geometric bounds relative to, and based on, the given transform.

public final String

Returns:

the id assigned to this Node using the setId method or null, if no id has been assigned.
getId
()

Implements javafx.css.Styleable.getId.

The id of this Node.

protected Cursor

Returns:

the initial cursor state for this Node.
getInitialCursor
()

Returns the initial cursor state of this node, for use by the JavaFX CSS engine to correctly set its initial value.

protected Boolean

Returns:

the initial focus traversable state for this Node.
getInitialFocusTraversable
()

Returns the initial focus traversable state of this node, for use by the JavaFX CSS engine to correctly set its initial value.

public final InputMethodRequests
private NodeEventDispatcher
public final Bounds
public final double
public final double
pack-priv final BaseTransform
pack-priv BaseBounds
getLocalBounds(BaseBounds bounds, BaseTransform tx)

Loads the given bounds object with the local bounds relative to, and based on, the given transform.

pack-priv BaseTransform
getLocalToParentTransform(BaseTransform tx)

Copy the localToParent transform into specified transform.

public final Transform
public final Transform
pack-priv static List<Style>
getMatchingStyles(CssMetaData<S extends Styleable, V> cssMetaData, Styleable styleable)

private MediaQueryContext
private Node
private Node.MiscProperties
public final NodeOrientation
private Node.NodeTransformation
public final EventHandler<? super ContextMenuEvent>
public final EventHandler<? super MouseEvent>
public final EventHandler<? super DragEvent>
public final EventHandler<? super DragEvent>
public final EventHandler<? super DragEvent>
public final EventHandler<? super DragEvent>
public final EventHandler<? super DragEvent>
public final EventHandler<? super InputMethodEvent>
public final EventHandler<? super KeyEvent>
public final EventHandler<? super KeyEvent>
public final EventHandler<? super KeyEvent>
public final EventHandler<? super MouseEvent>
public final EventHandler<? super MouseDragEvent>
public final EventHandler<? super MouseDragEvent>
public final EventHandler<? super MouseEvent>
public final EventHandler<? super MouseDragEvent>
public final EventHandler<? super MouseDragEvent>
public final EventHandler<? super MouseEvent>
public final EventHandler<? super MouseEvent>
public final EventHandler<? super MouseEvent>
public final EventHandler<? super MouseEvent>
public final EventHandler<? super MouseEvent>
public final EventHandler<? super RotateEvent>
public final EventHandler<? super RotateEvent>
public final EventHandler<? super RotateEvent>
public final EventHandler<? super ScrollEvent>
public final EventHandler<? super ScrollEvent>
public final EventHandler<? super ScrollEvent>
public final EventHandler<? super SwipeEvent>
public final EventHandler<? super SwipeEvent>
public final EventHandler<? super SwipeEvent>
public final EventHandler<? super SwipeEvent>
public final EventHandler<? super TouchEvent>
public final EventHandler<? super TouchEvent>
public final EventHandler<? super TouchEvent>
public final EventHandler<? super TouchEvent>
public final EventHandler<? super ZoomEvent>
public final EventHandler<? super ZoomEvent>
public final EventHandler<? super ZoomEvent>
public final double
private Node
public final Parent
pack-priv <P extends NGNode> P
pack-priv final double
pack-priv final double
pack-priv final double
public final ObservableMap<Object, Object>

Returns:

an observable map of properties on this node for use primarily by application developers
getProperties
()

Returns an observable map of properties on this node for use primarily by application developers.

public final ObservableSet<PseudoClass>

Returns:

The active pseudo-class states of this Node, wrapped in an unmodifiable ObservableSet
getPseudoClassStates
()

Implements javafx.css.Styleable.getPseudoClassStates.

Return the pseudo-class state of this Styleable.

public final double
public final Point3D
public final double
public final double
public final double
public final Scene
public final String

Returns:

The inline CSS style associated with this Node. If this Node does not have an inline style, an empty String is returned.
getStyle
()

Implements javafx.css.Styleable.getStyle.

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

public Styleable

Returns:

getParent()
getStyleableParent
()

Implements javafx.css.Styleable.getStyleableParent.

Return the parent of this Styleable, or null if there is no parent.

public final ObservableList<String>
getStyleClass()

Implements javafx.css.Styleable.getStyleClass.

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

pack-priv final ObservableMap<StyleableProperty<?>, List<Style>>
pack-priv final SubScene
pack-priv BaseBounds
getTransformedBounds(BaseBounds bounds, BaseTransform tx)

Loads the given bounds object with the transformed bounds relative to, and based on, the given transform.

public final ObservableList<Transform>

Returns:

the transforms for this Node
getTransforms
()

The ObservableList of custom javafx.scene.transform.Transforms to be applied to this Node.

pack-priv List<TransitionDefinition>
pack-priv Map<String, TransitionTimer>
public final double
public final double
public final double
public String

Returns:

getClass().getName() without the package name
getTypeSelector
()

Implements javafx.css.Styleable.getTypeSelector.

The type of this Styleable that is to be used in selector matching.

public Object

Returns:

The Object that was previously set, or null if no property has been set or if null was set.
getUserData
()

Returns a previously set Object property, or null if no such property has been set using the Node#setUserData(java.lang.Object) method.

public final double
pack-priv final boolean
public boolean

Returns:

true if node has properties.
hasProperties
()

Tests if Node has properties.

private boolean
public final ReadOnlyBooleanProperty
private ReadOnlyBooleanWrapper
public final StringProperty
pack-priv String
private void
public final ObjectProperty<InputMethodRequests>

Returns:

InputMethodRequestsProperty
inputMethodRequestsProperty
()

Property holding InputMethodRequests.

public boolean

Returns:

the result of intersects for this Node
intersects
(double
the x coordinate of a rectangle in Node's space
localX
,
double
the y coordinate of a rectangle in Node's space
localY
,
double
the width of a rectangle in Node's space
localWidth
,
double
the height of a rectangle in Node's space
localHeight
)

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

public boolean

Returns:

the result of intersects for this Node
intersects
(Bounds
the bounds
localBounds
)

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

pack-priv final boolean
intersects(PickRay pickRay, PickResultChooser pickResult)

pack-priv final double
private void
private void
private void
invalidatedScenes(Scene oldScene, SubScene oldSubScene)

private void
private void
public final boolean
pack-priv final boolean
pack-priv boolean
isConnected()

Determines whether this node is connected anywhere in the scene graph.

pack-priv boolean
pack-priv final boolean
isDirty(DirtyBits dirtyBit)

Test whether the specified dirty bit is set

private boolean
isDirtyEmpty()

Test whether the set of dirty bits is empty

public final boolean
public final boolean
public final boolean
public final boolean
public final boolean
public final boolean
public final boolean
public final boolean
public final boolean
public final boolean
public final boolean
public boolean

Returns:

whether or not this node type can be resized by its parent during layout
isResizable
()

Indicates whether this node is a type which can be resized by its parent.

pack-priv final boolean
pack-priv final boolean
pack-priv final boolean
public final boolean
private boolean
pack-priv final void
public final ReadOnlyObjectProperty<Bounds>
public final DoubleProperty
public final DoubleProperty
pack-priv void
localBoundsChanged()

Responds to changes in the local bounds by invalidating boundsInLocal and notifying this node that its transformed bounds have changed.

public Point2D

Returns:

the transformed 2D point in Parent's space
localToParent
(double
the x coordinate of the point in Node's space
localX
,
double
the y coordinate of the point in Node's space
localY
)

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

public Point2D

Returns:

the transformed 2D point in Parent's space
localToParent
(Point2D
the 2D point in Node's space
localPoint
)

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

public Point3D

Returns:

the transformed 3D point in Parent's space
localToParent
(Point3D
the 3D point in Node's space
localPoint
)

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

public Point3D

Returns:

the transformed 3D point in Parent's space
localToParent
(double
the x coordinate of the point in Node's space
x
,
double
the y coordinate of the point in Node's space
y
,
double
the z coordinate of the point in Node's space
z
)

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

public Bounds

Returns:

the transformed bounds in Parent's space
localToParent
(Bounds
the bounds in Node's space
localBounds
)

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

pack-priv void
localToParent(Point2D pt)

Transforms in place the specified point from local coords to parent coords.

pack-priv void
public final ReadOnlyObjectProperty<Transform>

Returns:

the localToParent transform for this Node
localToParentTransformProperty
()

An affine transform that holds the computed local-to-parent transform.

public Point2D

Returns:

scene coordinates of the point or null if Node is not in a Window
localToScene
(double
x coordinate of a point in Node's space
localX
,
double
y coordinate of a point in Node's space
localY
)

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

public Point2D

Returns:

scene coordinates of the point or null if Node is not in a Window
localToScene
(Point2D
a point in Node's space
localPoint
)

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

public Point3D

Returns:

the transformed 3D point in Scene's space
localToScene
(Point3D
a 3D point in Node's space
localPoint
)

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

public Point3D

Returns:

the transformed 3D point in Scene's space
localToScene
(double
the x coordinate of a point in Node's space
x
,
double
the y coordinate of a point in Node's space
y
,
double
the z coordinate of a point in Node's space
z
)

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

public Point3D

Returns:

transformed point
localToScene
(Point3D
the point in local coordinates
localPoint
,
boolean
whether Scene coordinates should be used even if the Node is in a SubScene
rootScene
)

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

public Point3D

Returns:

transformed point
localToScene
(double
the x coordinate of the point in local coordinates
x
,
double
the y coordinate of the point in local coordinates
y
,
double
the z coordinate of the point in local coordinates
z
,
boolean
whether Scene coordinates should be used even if the Node is in a SubScene
rootScene
)

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

public Point2D

Returns:

transformed point
localToScene
(Point2D
the point in local coordinates
localPoint
,
boolean
whether Scene coordinates should be used even if the Node is in a SubScene
rootScene
)

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

public Point2D

Returns:

transformed point
localToScene
(double
the x coordinate of the point in local coordinates
x
,
double
the y coordinate of the point in local coordinates
y
,
boolean
whether Scene coordinates should be used even if the Node is in a SubScene
rootScene
)

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

public Bounds

Returns:

transformed bounds
localToScene
(Bounds
the bounds in local coordinates
localBounds
,
boolean
whether Scene coordinates should be used even if the Node is in a SubScene
rootScene
)

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

public Bounds

Returns:

the bounds in the scene coordinates or null if Node is not in a Window
localToScene
(Bounds
bounds in Node's space
localBounds
)

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

pack-priv void
pack-priv void
public final ReadOnlyObjectProperty<Transform>

Returns:

the localToScene transform for this Node
localToSceneTransformProperty
()

An affine transform that holds the computed local-to-scene transform.

public Point2D

Returns:

screen coordinates of the point or null if Node is not in a Window
localToScreen
(double
x coordinate of a point in Node's space
localX
,
double
y coordinate of a point in Node's space
localY
)

Transforms a point from the local coordinate space of this Node into the coordinate space of its javafx.stage.Screen.

public Point2D

Returns:

screen coordinates of the point or null if Node is not in a Window
localToScreen
(Point2D
a point in Node's space
localPoint
)

Transforms a point from the local coordinate space of this Node into the coordinate space of its javafx.stage.Screen.

public Point2D

Returns:

screen coordinates of the point or null if Node is not in a Window
localToScreen
(double
x coordinate of a point in Node's space
localX
,
double
y coordinate of a point in Node's space
localY
,
double
z coordinate of a point in Node's space
localZ
)

Transforms a point from the local coordinate space of this Node into the coordinate space of its javafx.stage.Screen.

public Point2D

Returns:

screen coordinates of the point or null if Node is not in a Window
localToScreen
(Point3D
a point in Node's space
localPoint
)

Transforms a point from the local coordinate space of this Node into the coordinate space of its javafx.stage.Screen.

public Bounds

Returns:

the bounds in screen coordinates or null if Node is not in a Window
localToScreen
(Bounds
bounds in Node's space
localBounds
)

Transforms a bounds from the local coordinate space of this Node into the coordinate space of its javafx.stage.Screen.

public Node

Returns:

The first node, starting from this Node, which matches the CSS selector, null if none is found.
lookup
(String
The css selector of the node to find
selector
)

Finds this Node, or the first sub-node, based on the given CSS selector.

public Set<Node>

Returns:

All nodes, starting from and including this Node, which match the CSS selector. The returned set is always unordered and unmodifiable, and never null.
lookupAll
(String
The css selector of the nodes to find
selector
)

Finds all Nodes, including this one and any children, which match the given CSS selector.

pack-priv List<Node>

Returns:

list of matching nodes
lookupAll
(Selector
the css selector of the nodes to find
selector
,
List<Node>
the results
results
)

Used by Node and Parent for traversing the tree and adding all nodes which match the given selector.

public final BooleanProperty
pack-priv void
public double

Returns:

the maximum height that the node should be resized to during layout The result will never be NaN, nor will it ever be negative.
maxHeight
(double
the width that should be used if maximum height depends on it
width
)

Returns the node's maximum height for use in layout calculations.

public double

Returns:

the maximum width that the node should be resized to during layout The result will never be NaN, nor will it ever be negative.
maxWidth
(double
the height that should be used if maximum width depends on it
height
)

Returns the node's maximum width for use in layout calculations.

public double

Returns:

the minimum height that the node should be resized to during layout The result will never be NaN, nor will it ever be negative.
minHeight
(double
the width that should be used if minimum height depends on it
width
)

Returns the node's minimum height for use in layout calculations.

public double

Returns:

the minimum width that the node should be resized to during layout. The result will never be NaN, nor will it ever be negative.
minWidth
(double
the height that should be used if minimum width depends on it
height
)

Returns the node's minimum width for use in layout calculations.

public final BooleanProperty

Returns:

is this Node (together with all its children) is completely transparent to mouse events.
mouseTransparentProperty
()

If true, this node (together with all its children) is completely transparent to mouse events.

public final ObjectProperty<NodeOrientation>
pack-priv void
pack-priv final void
public final void
notifyAccessibleAttributeChanged(AccessibleAttribute
the attribute whose value has changed
attributes
)

This method is called by the application to notify the assistive technology that the value for an attribute has changed.

pack-priv final void
notifyFocusListeners()

Fires change notifications if the value of focused, focusVisible or focusWithin has changed.

pack-priv void
notifyManagedChanged()

Called whenever the "managed" flag has changed.

pack-priv void
notifyParentOfBoundsChange()

Notifies both the real parent and the clip parent (if they exist) that the bounds of the child has changed.

pack-priv final void
public final ObjectProperty<EventHandler<? super ContextMenuEvent>>

Returns:

the event handler that is called when a context menu has been requested on this Node
onContextMenuRequestedProperty
()

Defines a function to be called when a context menu has been requested on this Node.

public final ObjectProperty<EventHandler<? super MouseEvent>>

Returns:

the event handler that is called when drag gesture has been detected
onDragDetectedProperty
()

Defines a function to be called when drag gesture has been detected.

public final ObjectProperty<EventHandler<? super DragEvent>>

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

public final ObjectProperty<EventHandler<? super DragEvent>>

Returns:

the event handler that is called when the mouse button is released on this Node
onDragDroppedProperty
()

Defines a function to be called when the mouse button is released on this Node during drag and drop gesture.

public final ObjectProperty<EventHandler<? super DragEvent>>

Returns:

the event handler that is called when drag gesture enters this Node
onDragEnteredProperty
()

Defines a function to be called when drag gesture enters this Node.

public final ObjectProperty<EventHandler<? super DragEvent>>

Returns:

the event handler that is called when drag gesture exits this Node
onDragExitedProperty
()

Defines a function to be called when drag gesture exits this Node.

public final ObjectProperty<EventHandler<? super DragEvent>>

Returns:

the event handler that is called when drag gesture progresses within this Node
onDragOverProperty
()

Defines a function to be called when drag gesture progresses within this Node.

public final ObjectProperty<EventHandler<? super InputMethodEvent>>

Returns:

the event handler that is called when this Node has input focus and the input method text has changed
onInputMethodTextChangedProperty
()

Defines a function to be called when this Node has input focus and the input method text has changed.

public final ObjectProperty<EventHandler<? super KeyEvent>>

Returns:

the event handler that is called when this Node or its child Node has input focus and a key has been pressed
onKeyPressedProperty
()

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

public final ObjectProperty<EventHandler<? super KeyEvent>>

Returns:

the event handler that is called when this Node or its child Node has input focus and a key has been released
onKeyReleasedProperty
()

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

public final ObjectProperty<EventHandler<? super KeyEvent>>

Returns:

the event handler that is called when this Node or its child Node has input focus and a key has been typed
onKeyTypedProperty
()

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

public final ObjectProperty<EventHandler<? super MouseEvent>>

Returns:

the event handler that is called when a mouse button has been clicked (pressed and released) on this Node
onMouseClickedProperty
()

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

public final ObjectProperty<EventHandler<? super MouseDragEvent>>

Returns:

the event handler that is called when a full press-drag-release gesture enters this Node
onMouseDragEnteredProperty
()

Defines a function to be called when a full press-drag-release gesture enters this Node.

public final ObjectProperty<EventHandler<? super MouseDragEvent>>

Returns:

the event handler that is called when a full press-drag-release gesture leaves this Node
onMouseDragExitedProperty
()

Defines a function to be called when a full press-drag-release gesture leaves this Node.

public final ObjectProperty<EventHandler<? super MouseEvent>>

Returns:

the event handler that is called when a mouse button is pressed on this Node and then dragged
onMouseDraggedProperty
()

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

public final ObjectProperty<EventHandler<? super MouseDragEvent>>

Returns:

the event handler that is called when a full press-drag-release gesture progresses within this Node
onMouseDragOverProperty
()

Defines a function to be called when a full press-drag-release gesture progresses within this Node.

public final ObjectProperty<EventHandler<? super MouseDragEvent>>

Returns:

the event handler that is called when a full press-drag-release gesture ends (by releasing mouse button) within this Node
onMouseDragReleasedProperty
()

Defines a function to be called when a full press-drag-release gesture ends (by releasing mouse button) within this Node.

public final ObjectProperty<EventHandler<? super MouseEvent>>

Returns:

the event handler that is called when a mouse enters this Node
onMouseEnteredProperty
()

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

public final ObjectProperty<EventHandler<? super MouseEvent>>

Returns:

the event handler that is called when a mouse exits this Node
onMouseExitedProperty
()

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

public final ObjectProperty<EventHandler<? super MouseEvent>>

Returns:

the event handler that is called when a mouse cursor moves within this Node but no buttons have been pushed
onMouseMovedProperty
()

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

public final ObjectProperty<EventHandler<? super MouseEvent>>

Returns:

the event handler that is called when a mouse button has been pressed on this Node
onMousePressedProperty
()

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

public final ObjectProperty<EventHandler<? super MouseEvent>>

Returns:

the event handler that is called when a mouse button has been released on this Node
onMouseReleasedProperty
()

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

public final ObjectProperty<EventHandler<? super RotateEvent>>

Returns:

the event handler that is called when user performs a rotation action
onRotateProperty
()

Defines a function to be called when user performs a rotation action.

public final ObjectProperty<EventHandler<? super RotateEvent>>

Returns:

the event handler that is called when a rotation gesture ends
onRotationFinishedProperty
()

Defines a function to be called when a rotation gesture ends.

public final ObjectProperty<EventHandler<? super RotateEvent>>

Returns:

the event handler that is called when a rotation gesture is detected
onRotationStartedProperty
()

Defines a function to be called when a rotation gesture is detected.

public final ObjectProperty<EventHandler<? super ScrollEvent>>

Returns:

the event handler that is called when a scrolling gesture ends
onScrollFinishedProperty
()

Defines a function to be called when a scrolling gesture ends.

public final ObjectProperty<EventHandler<? super ScrollEvent>>

Returns:

the event handler that is called when user performs a scrolling action
onScrollProperty
()

Defines a function to be called when user performs a scrolling action.

public final ObjectProperty<EventHandler<? super ScrollEvent>>

Returns:

the event handler that is called when a scrolling gesture is detected
onScrollStartedProperty
()

Defines a function to be called when a scrolling gesture is detected.

public final ObjectProperty<EventHandler<? super SwipeEvent>>

Returns:

the event handler that is called when a downward swipe gesture centered over this node happens
onSwipeDownProperty
()

Defines a function to be called when a downward swipe gesture centered over this node happens.

public final ObjectProperty<EventHandler<? super SwipeEvent>>

Returns:

the event handler that is called when a leftward swipe gesture centered over this node happens
onSwipeLeftProperty
()

Defines a function to be called when a leftward swipe gesture centered over this node happens.

public final ObjectProperty<EventHandler<? super SwipeEvent>>

Returns:

the event handler that is called when an rightward swipe gesture centered over this node happens
onSwipeRightProperty
()

Defines a function to be called when an rightward swipe gesture centered over this node happens.

public final ObjectProperty<EventHandler<? super SwipeEvent>>

Returns:

the event handler that is called when an upward swipe gesture centered over this node happens
onSwipeUpProperty
()

Defines a function to be called when an upward swipe gesture centered over this node happens.

public final ObjectProperty<EventHandler<? super TouchEvent>>

Returns:

the event handler that is called when a touch point is moved
onTouchMovedProperty
()

Defines a function to be called when a touch point is moved.

public final ObjectProperty<EventHandler<? super TouchEvent>>

Returns:

the event handler that is called when a new touch point is pressed
onTouchPressedProperty
()

Defines a function to be called when a new touch point is pressed.

public final ObjectProperty<EventHandler<? super TouchEvent>>

Returns:

the event handler that is called when a touch point is released
onTouchReleasedProperty
()

Defines a function to be called when a touch point is released.

public final ObjectProperty<EventHandler<? super TouchEvent>>

Returns:

the event handler that is called when a touch point stays pressed and still
onTouchStationaryProperty
()

Defines a function to be called when a touch point stays pressed and still.

public final ObjectProperty<EventHandler<? super ZoomEvent>>

Returns:

the event handler that is called when a zooming gesture ends
onZoomFinishedProperty
()

Defines a function to be called when a zooming gesture ends.

public final ObjectProperty<EventHandler<? super ZoomEvent>>

Returns:

the event handler that is called when user performs a zooming action
onZoomProperty
()

Defines a function to be called when user performs a zooming action.

public final ObjectProperty<EventHandler<? super ZoomEvent>>

Returns:

the event handler that is called when a zooming gesture is detected
onZoomStartedProperty
()

Defines a function to be called when a zooming gesture is detected.

public final DoubleProperty
public final ReadOnlyObjectProperty<Parent>
private ReadOnlyObjectWrapper<Parent>
pack-priv final void
public Point2D

Returns:

the transformed 2D point in Node's space
parentToLocal
(double
the x coordinate in Parent's space
parentX
,
double
the y coordinate in Parent's space
parentY
)

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

public Point2D

Returns:

the transformed 2D point in Node's space
parentToLocal
(Point2D
the 2D point in Parent's space
parentPoint
)

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

public Point3D

Returns:

the transformed 3D point in Node's space
parentToLocal
(Point3D
parentPoint the 3D point in Parent's space
parentPoint
)

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

public Point3D

Returns:

the transformed 3D point in Node's space
parentToLocal
(double
the x coordinate in Parent's space
parentX
,
double
the y coordinate in Parent's space
parentY
,
double
the z coordinate in Parent's space
parentZ
)

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

public Bounds

Returns:

the transformed bounds in Node's space
parentToLocal
(Bounds
the bounds in Parent's space
parentBounds
)

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

pack-priv void
parentToLocal(Point2D pt)

Transforms in place the specified point from parent coords to local coords.

pack-priv void
pack-priv final void
public final BooleanProperty
public double

Returns:

the preferred height that the node should be resized to during layout The result will never be NaN, nor will it ever be negative.
prefHeight
(double
the width that should be used if preferred height depends on it
width
)

Returns the node's preferred height for use in layout calculations.

public double

Returns:

the preferred width that the node should be resized to during layout The result will never be NaN, nor will it ever be negative.
prefWidth
(double
the height that should be used if preferred width depends on it
height
)

Returns the node's preferred width for use in layout calculations.

private void
public final ReadOnlyBooleanProperty
private ReadOnlyBooleanWrapper
pack-priv void
public final void
pseudoClassStateChanged(PseudoClass
the pseudo-class that has changed state
pseudoClass
,
boolean
whether or not the state is active
active
)

Used to specify that a pseudo-class of this Node has changed.

public Object

Returns:

the value for the requested attribute
queryAccessibleAttribute
(AccessibleAttribute
the requested attribute
attribute
,
Object...
optional list of parameters
parameters
)

This method is called by the assistive technology to request the value for an attribute.

pack-priv final void
private void
pack-priv final void
pack-priv void
public void
relocate(double
the target x coordinate location
x
,
double
the target y coordinate location
y
)

Sets the node's layoutX and layoutY translation properties in order to relocate this node to the x,y location in the parent.

public final <T extends Event> void
removeEventFilter(final EventType<T> eventType, final EventHandler<? super T> eventFilter)

Overrides default javafx.event.EventTarget.removeEventFilter.

Unregisters a previously registered event filter from this target.

public final <T extends Event> void
removeEventHandler(final EventType<T> eventType, final EventHandler<? super T> eventHandler)

Overrides default javafx.event.EventTarget.removeEventHandler.

Unregisters a previously registered event handler from this target.

private void
removeTransitionTimer(String
the CSS name of the targeted property
propertyName
)

Removes a timer that was previously registered with addTransitionTimer.

private void
requestCssStateTransition()

Called when a CSS pseudo-class change would cause styles to be reapplied.

public void
requestFocus()

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

public final boolean

Returns:

true if traversal was successful
requestFocusTraversal
(TraversalDirection
the direction of focus traversal, non-null
direction
)

Requests to move the focus from this Node in the specified direction.

private void
requestFocusVisible()

Requests focus as if by calling requestFocus(), and additionally sets the focusVisible flag.

private void
public void
resize(double
the target layout bounds width
width
,
double
the target layout bounds height
height
)

If the node is resizable, will set its layout bounds to the specified width and height.

public void
resizeRelocate(double
the target x coordinate location
x
,
double
the target y coordinate location
y
,
double
the target layout bounds width
width
,
double
the target layout bounds height
height
)

If the node is resizable, will set its layout bounds to the specified width and height.

public final DoubleProperty

Returns:

the rotate for this Node
rotateProperty
()

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

public final ObjectProperty<Point3D>

Returns:

the rotationAxis for this Node
rotationAxisProperty
()

Defines the axis of rotation of this Node.

public final DoubleProperty

Returns:

the scaleX for this Node
scaleXProperty
()

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

public final DoubleProperty

Returns:

the scaleY for this Node
scaleYProperty
()

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

public final DoubleProperty

Returns:

the scaleZ for this Node
scaleZProperty
()

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

public final ReadOnlyObjectProperty<Scene>
pack-priv void
scenesChanged(final Scene newScene, final SubScene newSubScene, final Scene oldScene, final SubScene oldSubScene)

Exists for Parent and LightBase

public Point2D

Returns:

local coordinates of the point
sceneToLocal
(double
the x coordinate
x
,
double
the y coordinate
y
,
boolean
whether Scene coordinates should be used even if the Node is in a SubScene
rootScene
)

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

public Point2D

Returns:

local coordinates of the point
sceneToLocal
(Point2D
the point
point
,
boolean
whether Scene coordinates should be used even if the Node is in a SubScene
rootScene
)

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

public Bounds

Returns:

local coordinates of the bounds
sceneToLocal
(Bounds
the bounds
bounds
,
boolean
whether Scene coordinates should be used even if the Node is in a SubScene
rootScene
)

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

public Point2D

Returns:

local Node's coordinates of the point or null if Node is not in a Window. Null is also returned if the transformation from local to Scene is not invertible.
sceneToLocal
(double
x coordinate of a point on a Scene
sceneX
,
double
y coordinate of a point on a Scene
sceneY
)

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

public Point2D

Returns:

local Node's coordinates of the point or null if Node is not in a Window. Null is also returned if the transformation from local to Scene is not invertible.
sceneToLocal
(Point2D
a point on a Scene
scenePoint
)

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

public Point3D

Returns:

local Node's coordinates of the point or null if Node is not in a Window. Null is also returned if the transformation from local to Scene is not invertible.
sceneToLocal
(Point3D
a point on a Scene
scenePoint
)

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

public Point3D

Returns:

local Node's coordinates of the point or null if Node is not in a Window. Null is also returned if the transformation from local to Scene is not invertible.
sceneToLocal
(double
x coordinate of a point on a Scene
sceneX
,
double
y coordinate of a point on a Scene
sceneY
,
double
z coordinate of a point on a Scene
sceneZ
)

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

public Bounds

Returns:

bounds in the local Node'space or null if Node is not in a Window. Null is also returned if the transformation from local to Scene is not invertible.
sceneToLocal
(Bounds
bounds on a Scene
sceneBounds
)

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

pack-priv void
pack-priv void
private Point3D
sceneToLocal0(double x, double y, double z)

Internal method to transform a point from scene to local coordinates.

public Point2D

Returns:

local Node's coordinates of the point or null if Node is not in a Window. Null is also returned if the transformation from local to Scene is not invertible.
screenToLocal
(double
x coordinate of a point on a Screen
screenX
,
double
y coordinate of a point on a Screen
screenY
)

Transforms a point from the coordinate space of the javafx.stage.Screen into the local coordinate space of this Node.

public Point2D

Returns:

local Node's coordinates of the point or null if Node is not in a Window. Null is also returned if the transformation from local to Scene is not invertible.
screenToLocal
(Point2D
a point on a Screen
screenPoint
)

Transforms a point from the coordinate space of the javafx.stage.Screen into the local coordinate space of this Node.

public Bounds

Returns:

bounds in the local Node'space or null if Node is not in a Window. Null is also returned if the transformation from local to Scene is not invertible.
screenToLocal
(Bounds
bounds on a Screen
screenBounds
)

Transforms a rectangle from the coordinate space of the javafx.stage.Screen into the local coordinate space of this Node.

private boolean

Returns:

true if the selector matches
selectorMatches
(Selector
selector to match
s
)

Checks whether the provided selector matches the node with both styles and pseudo states.

public final void
public final void
public final void
public final void
public final void
public final void
setCache(boolean value)

public final void
private void
setCanReceiveFocus(boolean value)

public final void
setClip(Node value)

public final void
public final void
pack-priv void
setDerivedDepthTest(boolean value)

public final void
setDisable(boolean value)

protected final void
setDisabled(boolean value)

public final void
public final void
protected final <
the specific event class of the handler
T extends Event
>
void
setEventHandler(final EventType<T>
the event type to associate with the given eventHandler
eventType
,
final EventHandler<? super T>
the handler to register, or null to unregister
eventHandler
)

Sets the handler to use for this event type.

protected final void
setFocused(boolean value)

pack-priv final void
setFocusQuietly(boolean focused, boolean focusVisible)

Sets the value of the focused and focusVisible properties without firing change events.

public final void
setFocusTraversable(boolean value)

protected final void
setHover(boolean value)

public final void
setId(String value)

public final void
public final void
setLayoutX(double value)

public final void
setLayoutY(double value)

public final void
setManaged(boolean value)

public final void
setMouseTransparent(boolean value)

public final void
public final void
public final void
public final void
public final void
public final void
public final void
public final void
public final void
public final void
public final void
public final void
public final void
public final void
public final void
public final void
public final void
public final void
public final void
public final void
public final void
public final void
public final void
public final void
public final void
public final void
public final void
public final void
public final void
public final void
public final void
public final void
public final void
public final void
public final void
public final void
public final void
public final void
public final void
public final void
public final void
setOpacity(double value)

pack-priv final void
public final void
setPickOnBounds(boolean value)

protected final void
setPressed(boolean value)

public final void
setRotate(double value)

public final void
public final void
setScaleX(double value)

public final void
setScaleY(double value)

public final void
setScaleZ(double value)

pack-priv final void
setScenes(Scene newScene, SubScene newSubScene)

pack-priv final void
setShowMnemonics(boolean value)

public final void
setStyle(String
The inline CSS style to use for this Node. null is implicitly converted to an empty String.
value
)

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

pack-priv final void
public final void
setTranslateX(double value)

public final void
setTranslateY(double value)

public final void
setTranslateZ(double value)

pack-priv final void
setTreeVisible(boolean value)

public void
setUserData(Object
The value to be stored - this can later be retrieved by calling Node#getUserData().
value
)

Convenience method for setting a single Object property that can be retrieved at a later date.

public final void
setViewOrder(double value)

public final void
setVisible(boolean value)

pack-priv final BooleanProperty
public WritableImage

Returns:

the rendered image
snapshot
(SnapshotParameters
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.
params
,
WritableImage
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.
image
)

Takes a snapshot of this node and returns the rendered image when it is ready.

public void
snapshot(Callback<SnapshotResult, Void>
a class whose call method will be called when the image is ready. The SnapshotResult that is passed into the call method of the callback will contain the rendered image, the source node that was rendered, and a copy of the SnapshotParameters. The callback parameter must not be null.
callback
,
SnapshotParameters
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.
params
,
WritableImage
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.
image
)

Takes a snapshot of this node at the next frame and calls the specified callback method when the image is ready.

public Dragboard

Returns:

A Dragboard to place this Node's data on
startDragAndDrop
(TransferMode...
The supported TransferMode(s) of this Node
transferModes
)

Confirms a potential drag and drop gesture that is recognized over this Node.

public void
startFullDrag()

Starts a full press-drag-release gesture with this node as gesture source.

public final StringProperty
private static void
syncAll(Node node)

Recursive function for synchronizing a node and all descendents

pack-priv final void
syncPeer()

Called by the synchronizer to update the state and clear dirtybits of this node in the PG graph

public void
toBack()

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

public void
toFront()

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

public String

Returns:

a string representation for the object.
toString
()

Overrides java.lang.Object.toString.

Returns a string representation for the object.

pack-priv void
transformedBoundsChanged()

Responds to changes in the transformed bounds by invalidating txBounds and boundsInParent.

private ObservableList<Transform>
public final DoubleProperty

Returns:

the translateX for this Node
translateXProperty
()

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

public final DoubleProperty

Returns:

the translateY for this Node
translateYProperty
()

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

public final DoubleProperty

Returns:

the translateZ for this Node
translateZProperty
()

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

pack-priv final boolean
traverse(Direction dir, TraversalMethod method)

Traverses from this node in the direction indicated.

pack-priv final ReadOnlyBooleanProperty
pack-priv void
private void
private void
pack-priv void
updateGeomBounds()

If necessary, recomputes the cached geom bounds.

private void
updateLocalBounds()

If necessary, recomputes the cached local bounds.

pack-priv void
updateLocalToParentTransform()

This helper function will update the transform matrix on the peer based on the "complete" transform for this node.

private void
updateParentsFocusWithin(Node oldParent, Node newParent)

Called when the current node was removed from or added to the scene graph.

private void
updateTreeVisible(boolean parentChanged)

pack-priv void
updateTxBounds()

If necessary, recomputes the cached transformed bounds.

public boolean

Returns:

true if this Node should be mirrored
usesMirroring
()

Determines whether a node should be mirrored when node orientation is right-to-left.

public final DoubleProperty

Returns:

the view order for this Node
viewOrderProperty
()

Defines the rendering and picking order of this Node within its parent.

public final BooleanProperty
pack-priv boolean
wouldCreateCycle(Node parent, Node child)

Tests whether creating a parent-child relationship between these nodes would cause a cycle.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait