Class AbstractAsynchronousTreeNode<T extends javax.swing.tree.TreeNode>

    • 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 interface AsynchronousTreeNode
      • getChildAt

        public T getChildAt​(int idx)
        Specified by:
        getChildAt in interface javax.swing.tree.TreeNode
      • getParent

        public T getParent()
        Specified by:
        getParent in interface javax.swing.tree.TreeNode
      • reload

        public void reload()
      • children

        public java.util.Enumeration children()
        Specified by:
        children in interface javax.swing.tree.TreeNode
      • sortChildren

        public void sortChildren​(java.util.Comparator<T> comparator)
      • getAllowsChildren

        public boolean getAllowsChildren()
        Specified by:
        getAllowsChildren in interface javax.swing.tree.TreeNode
      • getChildCount

        public int getChildCount()
        Specified by:
        getChildCount in interface javax.swing.tree.TreeNode
      • getIndex

        public int getIndex​(javax.swing.tree.TreeNode node)
        Specified by:
        getIndex in interface javax.swing.tree.TreeNode
      • isLeaf

        public boolean isLeaf()
        Specified by:
        isLeaf in interface javax.swing.tree.TreeNode