Class AbstractLazyLoadingTreeNode<T extends javax.swing.tree.TreeNode>
- java.lang.Object
-
- com.inductiveautomation.ignition.client.util.gui.tree.AbstractLazyLoadingTreeNode<T>
-
- All Implemented Interfaces:
javax.swing.tree.TreeNode
- Direct Known Subclasses:
PropTreeComponentNode,PropTreePageNode,PropTreePropertyNode,PropTreeRootNode,PropTreeScopeNode,PropTreeSessionNode,PropTreeViewNode,ViewFolderTreeNode
public abstract class AbstractLazyLoadingTreeNode<T extends javax.swing.tree.TreeNode> extends java.lang.Object implements javax.swing.tree.TreeNodeTree Node implementation which only populates its children upon demand.
-
-
Field Summary
Fields Modifier and Type Field Description protected javax.swing.tree.TreeNodeparent
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractLazyLoadingTreeNode(javax.swing.tree.TreeNode parent)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected voidcheckChildren()java.util.Enumeration<? extends javax.swing.tree.TreeNode>children()java.util.Optional<T>findChild(java.util.function.Predicate<T> predicate)booleangetAllowsChildren()javax.swing.tree.TreeNodegetChildAt(int index)intgetChildCount()intgetIndex(javax.swing.tree.TreeNode node)javax.swing.tree.TreeNodegetParent()booleanisLeaf()protected abstract java.util.List<T>loadChildren()This will be called as late a possible for the node to populate its children list.protected voidsetChildren(java.util.List<T> children)
-
-
-
Method Detail
-
checkChildren
protected void checkChildren()
-
setChildren
protected void setChildren(java.util.List<T> children)
-
loadChildren
@Nullable protected abstract java.util.List<T> loadChildren()
This will be called as late a possible for the node to populate its children list. May return null if there are no children.
-
getChildAt
public javax.swing.tree.TreeNode getChildAt(int index)
- Specified by:
getChildAtin interfacejavax.swing.tree.TreeNode
-
getChildCount
public int getChildCount()
- Specified by:
getChildCountin interfacejavax.swing.tree.TreeNode
-
getParent
public javax.swing.tree.TreeNode getParent()
- Specified by:
getParentin interfacejavax.swing.tree.TreeNode
-
getIndex
public int getIndex(javax.swing.tree.TreeNode node)
- Specified by:
getIndexin interfacejavax.swing.tree.TreeNode
-
getAllowsChildren
public boolean getAllowsChildren()
- Specified by:
getAllowsChildrenin interfacejavax.swing.tree.TreeNode
-
isLeaf
public boolean isLeaf()
- Specified by:
isLeafin interfacejavax.swing.tree.TreeNode
-
children
public java.util.Enumeration<? extends javax.swing.tree.TreeNode> children()
- Specified by:
childrenin interfacejavax.swing.tree.TreeNode
-
-