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 class
AbstractAsynchronousTreeNode.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 void
blockLoad()
If the children haven't already been loaded, then loads the children of this node synchronously within this call.protected void
checkChildren(boolean force)
java.util.Enumeration
children()
boolean
getAllowsChildren()
T
getChildAt(int idx)
int
getChildCount()
int
getIndex(javax.swing.tree.TreeNode node)
T
getParent()
boolean
isLeaf()
protected abstract java.util.List<T>
loadChildren()
protected void
loadDone(java.util.List<T> nodeList)
protected void
loadError(java.lang.Exception ex)
protected abstract T
newErrorNode(java.lang.Throwable ex)
protected abstract T
newLoadingNode()
void
reload()
protected void
showLoadingError(java.lang.Exception ex)
Optional override to display a loading errorvoid
sortChildren(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:
blockLoad
in interfaceAsynchronousTreeNode
-
getChildAt
public T getChildAt(int idx)
- Specified by:
getChildAt
in interfacejavax.swing.tree.TreeNode
-
getParent
public T getParent()
- Specified by:
getParent
in interfacejavax.swing.tree.TreeNode
-
reload
public void reload()
-
children
public java.util.Enumeration children()
- Specified by:
children
in interfacejavax.swing.tree.TreeNode
-
sortChildren
public void sortChildren(java.util.Comparator<T> comparator)
-
getAllowsChildren
public boolean getAllowsChildren()
- Specified by:
getAllowsChildren
in interfacejavax.swing.tree.TreeNode
-
getChildCount
public int getChildCount()
- Specified by:
getChildCount
in interfacejavax.swing.tree.TreeNode
-
getIndex
public int getIndex(javax.swing.tree.TreeNode node)
- Specified by:
getIndex
in interfacejavax.swing.tree.TreeNode
-
isLeaf
public boolean isLeaf()
- Specified by:
isLeaf
in interfacejavax.swing.tree.TreeNode
-
-