N
- node typepublic class SimpleTreeWalker<N extends TreeNode> extends AbstractTreeWalker<N,TreeModel>
TreeWalker
implementation for basic trees.index, parent, tree
Constructor and Description |
---|
SimpleTreeWalker(JTree tree)
Constructs new
SimpleTreeWalker . |
Modifier and Type | Method and Description |
---|---|
protected N |
getChild(TreeModel model,
N parent,
int index)
|
protected int |
getChildCount(TreeModel model,
N parent)
Returns child count for the specified
TreeNode . |
protected int |
getIndexOfChild(TreeModel model,
N parent,
N child)
|
protected N |
getRootNode(TreeModel model)
Returns tree root node.
|
public SimpleTreeWalker(@NotNull JTree tree)
SimpleTreeWalker
.tree
- JTree
to walk through@NotNull protected N getRootNode(@NotNull TreeModel model)
AbstractTreeWalker
getRootNode
in class AbstractTreeWalker<N extends TreeNode,TreeModel>
model
- TreeModel
protected int getChildCount(@NotNull TreeModel model, @NotNull N parent)
AbstractTreeWalker
TreeNode
.getChildCount
in class AbstractTreeWalker<N extends TreeNode,TreeModel>
model
- TreeModel
parent
- TreeNode
to return child count forTreeNode
@NotNull protected N getChild(@NotNull TreeModel model, @NotNull N parent, int index)
AbstractTreeWalker
protected int getIndexOfChild(@NotNull TreeModel model, @NotNull N parent, @NotNull N child)
AbstractTreeWalker
getIndexOfChild
in class AbstractTreeWalker<N extends TreeNode,TreeModel>
model
- TreeModel
parent
- parent TreeNode
child
- child TreeNode
TreeNode
index within specified parent TreeNode
Copyright © 2020. All rights reserved.