public static class TreeVisitor.ByTreePath<T> extends java.lang.Object implements TreeVisitor
TreeVisitor.Acceptor, TreeVisitor.Action, TreeVisitor.ByComponent<C,T>, TreeVisitor.ByTreePath<T>
Constructor and Description |
---|
ByTreePath(boolean ignoreRoot,
javax.swing.tree.TreePath path,
Function<java.lang.Object,? extends T> converter) |
ByTreePath(javax.swing.tree.TreePath path,
Function<java.lang.Object,? extends T> converter) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
matches(T pathComponent,
java.lang.Object thisComponent) |
TreeVisitor.Action |
visit(javax.swing.tree.TreePath path) |
protected TreeVisitor.Action |
visit(javax.swing.tree.TreePath path,
T component) |
protected TreeVisitor.Action |
visit(javax.swing.tree.TreePath path,
T component,
int depth) |
public ByTreePath(javax.swing.tree.TreePath path, Function<java.lang.Object,? extends T> converter)
public TreeVisitor.Action visit(javax.swing.tree.TreePath path)
visit
in interface TreeVisitor
path
- a currently visited pathprotected TreeVisitor.Action visit(javax.swing.tree.TreePath path, T component)
path
- a currently visited pathcomponent
- a corresponding componentprotected TreeVisitor.Action visit(javax.swing.tree.TreePath path, T component, int depth)
path
- a currently visited pathcomponent
- a corresponding componentdepth
- a depth starting from the found nodeprotected boolean matches(T pathComponent, java.lang.Object thisComponent)
pathComponent
- a last component of the current paththisComponent
- a component of the seeking path at the same leveltrue
if both components match each other