public abstract class TopMostTraversalEngine extends TraversalEngine
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.algorithm, DEFAULT_ALGORITHM
Modifier | Constructor and Description |
---|---|
protected |
TopMostTraversalEngine() |
(package private) |
TopMostTraversalEngine(Algorithm algorithm)
For testing purposes only!
|
Modifier and Type | Method and Description |
---|---|
private void |
focusAndNotify(Node newNode) |
private void |
notifyTreeTraversedTo(Node newNode) |
Node |
trav(Node node,
Direction dir)
Traverse the focus to the next node in the specified direction.
|
Node |
traverseToFirst()
Set focus on the first Node in this context (if any)
|
Node |
traverseToLast()
Set focus on the last Node in this context (if any)
|
addTraverseListener, canTraverse, getRoot, notifyTraversedTo, select, selectFirst, selectLast
protected TopMostTraversalEngine()
TopMostTraversalEngine(Algorithm algorithm)
public final Node trav(Node node, Direction dir)
node
- The starting node to traverse fromdir
- the traversal directionprivate void focusAndNotify(Node newNode)
private void notifyTreeTraversedTo(Node newNode)
public final Node traverseToFirst()
public final Node traverseToLast()