Class AbstractAsynchronousTreeNode<T extends javax.swing.tree.TreeNode>
- java.lang.Object
-
- com.inductiveautomation.ignition.client.util.gui.tree.AbstractAsynchronousTreeNode<T>
-
- All Implemented Interfaces:
AsynchronousTreeNode,javax.swing.tree.TreeNode
- Direct Known Subclasses:
AbstractOPCTreeNode,HistoricalProvidersNode,HistoricalProvidersNode.HistoricalBrowseResultNode
public abstract class AbstractAsynchronousTreeNode<T extends javax.swing.tree.TreeNode> extends java.lang.Object implements AsynchronousTreeNode
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classAbstractAsynchronousTreeNode.LoadingStatus
-
Constructor Summary
Constructors Constructor Description AbstractAsynchronousTreeNode(javax.swing.tree.DefaultTreeModel treeModel, T parent)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidblockLoad()If the children haven't already been loaded, then loads the children of this node synchronously within this call.protected voidcheckChildren(boolean force)java.util.Enumerationchildren()booleangetAllowsChildren()TgetChildAt(int idx)intgetChildCount()intgetIndex(javax.swing.tree.TreeNode node)TgetParent()booleanisLeaf()protected abstract java.util.List<T>loadChildren()protected voidloadDone(java.util.List<T> nodeList)protected voidloadError(java.lang.Exception ex)protected abstract TnewErrorNode(java.lang.Throwable ex)protected abstract TnewLoadingNode()voidreload()protected voidshowLoadingError(java.lang.Exception ex)Optional override to display a loading errorvoidsortChildren(java.util.Comparator<T> comparator)
-
-
-
Field Detail
-
treeModel
protected javax.swing.tree.DefaultTreeModel treeModel
-
loadingNode
protected T extends javax.swing.tree.TreeNode loadingNode
-
errorNode
protected T extends javax.swing.tree.TreeNode errorNode
-
nodeList
protected java.util.List<T extends javax.swing.tree.TreeNode> nodeList
-
parent
protected T extends javax.swing.tree.TreeNode parent
-
-
Constructor Detail
-
AbstractAsynchronousTreeNode
public AbstractAsynchronousTreeNode(javax.swing.tree.DefaultTreeModel treeModel, T parent)
-
-
Method Detail
-
newLoadingNode
protected abstract T newLoadingNode()
-
newErrorNode
protected abstract T newErrorNode(java.lang.Throwable ex)
-
loadChildren
protected abstract java.util.List<T> loadChildren() throws java.lang.Exception
- Throws:
java.lang.Exception
-
loadDone
protected void loadDone(java.util.List<T> nodeList)
-
loadError
protected void loadError(java.lang.Exception ex)
-
showLoadingError
protected void showLoadingError(java.lang.Exception ex)
Optional override to display a loading error
-
checkChildren
protected void checkChildren(boolean force)
-
blockLoad
public void blockLoad()
If the children haven't already been loaded, then loads the children of this node synchronously within this call.- Specified by:
blockLoadin interfaceAsynchronousTreeNode
-
getChildAt
public T getChildAt(int idx)
- Specified by:
getChildAtin interfacejavax.swing.tree.TreeNode
-
getParent
public T getParent()
- Specified by:
getParentin interfacejavax.swing.tree.TreeNode
-
reload
public void reload()
-
children
public java.util.Enumeration children()
- Specified by:
childrenin interfacejavax.swing.tree.TreeNode
-
sortChildren
public void sortChildren(java.util.Comparator<T> comparator)
-
getAllowsChildren
public boolean getAllowsChildren()
- Specified by:
getAllowsChildrenin interfacejavax.swing.tree.TreeNode
-
getChildCount
public int getChildCount()
- Specified by:
getChildCountin interfacejavax.swing.tree.TreeNode
-
getIndex
public int getIndex(javax.swing.tree.TreeNode node)
- Specified by:
getIndexin interfacejavax.swing.tree.TreeNode
-
isLeaf
public boolean isLeaf()
- Specified by:
isLeafin interfacejavax.swing.tree.TreeNode
-
-