APIdia Launch Partner
Top Description Fields Constructors Methods
com.sun.javafx.scene.traversal

public abstract Class TopMostTraversalEngine

extends TraversalEngine
Class Inheritance
Known Direct Subclasses
com.sun.javafx.scene.traversal.SceneTraversalEngine, com.sun.javafx.scene.traversal.SubSceneTraversalEngine
Imports
com.sun.javafx.scene.NodeHelper, .ParentHelper, javafx.scene.Node, .Parent

This is the class for all top-level traversal engines in scenes and subscenes. These traversal engines are created automatically and can only have the default algorithm. These engines should be used by calling trav(javafx.scene.Node, Direction), traverseToFirst() and traverseToLast() methods. These methods do the actual traversal - selecting the Node that's should be focused next and focusing it. Also, listener calls are handled by top-most traversal engines. select* methods can be used as well, but will *not* transfer the focus to the result, they are just query methods.

Field Summary

Inherited from com.sun.javafx.scene.traversal.TraversalEngine:
algorithmDEFAULT_ALGORITHM

Constructor Summary

AccessConstructor and Description
protected
pack-priv
TopMostTraversalEngine(Algorithm algorithm)

For testing purposes only!

Method Summary

Modifier and TypeMethod and Description
private void
private void
public final Node

Returns:

the new focus owner or null if none found (in that case old focus owner is still valid)
trav
(Node
The starting node to traverse from
node
,
Direction
the traversal direction
dir
,
TraversalMethod
the traversal method
method
)

Traverse the focus to the next node in the specified direction.

public final Node

Returns:

the first node or null if there's none
traverseToFirst
()

Set focus on the first Node in this context (if any)

public final Node

Returns:

the last node or null if there's none
traverseToLast
()

Set focus on the last Node in this context (if any)

Inherited from com.sun.javafx.scene.traversal.TraversalEngine:
addTraverseListenercanTraversegetRootnotifyTraversedToselectselectFirstselectLast

Constructor Detail

TopMostTraversalEngineback to summary
protected TopMostTraversalEngine()
TopMostTraversalEngineback to summary
pack-priv TopMostTraversalEngine(Algorithm algorithm)

For testing purposes only!

Method Detail

focusAndNotifyback to summary
private void focusAndNotify(Node newNode, TraversalMethod method)
notifyTreeTraversedToback to summary
private void notifyTreeTraversedTo(Node newNode)
travback to summary
public final Node trav(Node node, Direction dir, TraversalMethod method)

Traverse the focus to the next node in the specified direction.

Parameters
node:Node

The starting node to traverse from

dir:Direction

the traversal direction

method:TraversalMethod

the traversal method

Returns:Node

the new focus owner or null if none found (in that case old focus owner is still valid)

traverseToFirstback to summary
public final Node traverseToFirst()

Set focus on the first Node in this context (if any)

Returns:Node

the first node or null if there's none

traverseToLastback to summary
public final Node traverseToLast()

Set focus on the last Node in this context (if any)

Returns:Node

the last node or null if there's none