Class AsyncSwingTreeModel

  • All Implemented Interfaces:
    javax.swing.tree.TreeModel

    public class AsyncSwingTreeModel
    extends AsyncTreeModel
    implements javax.swing.tree.TreeModel
    Tree model, which dynamically represents running components.
    • Constructor Detail

      • AsyncSwingTreeModel

        public AsyncSwingTreeModel()
        Create a component tree model.
    • Method Detail

      • getRoot

        public ITreeNode getRoot()
        Get the root node.
        Specified by:
        getRoot in interface javax.swing.tree.TreeModel
        Overrides:
        getRoot in class AsyncTreeModel
      • getChild

        public ITreeNode getChild​(java.lang.Object parent,
                                  int index)
        Get the given child of a node.
        Specified by:
        getChild in interface javax.swing.tree.TreeModel
        Overrides:
        getChild in class AsyncTreeModel
      • getChildCount

        public int getChildCount​(java.lang.Object parent)
        Get the number of children of a node.
        Specified by:
        getChildCount in interface javax.swing.tree.TreeModel
        Overrides:
        getChildCount in class AsyncTreeModel
      • getIndexOfChild

        public int getIndexOfChild​(java.lang.Object parent,
                                   java.lang.Object child)
        Get the index of a child.
        Specified by:
        getIndexOfChild in interface javax.swing.tree.TreeModel
        Overrides:
        getIndexOfChild in class AsyncTreeModel
      • isLeaf

        public boolean isLeaf​(java.lang.Object node)
        Test if the node is a leaf.
        Specified by:
        isLeaf in interface javax.swing.tree.TreeModel
        Overrides:
        isLeaf in class AsyncTreeModel
      • valueForPathChanged

        public void valueForPathChanged​(javax.swing.tree.TreePath path,
                                        java.lang.Object newValue)
        Edit the value of a node.
        Specified by:
        valueForPathChanged in interface javax.swing.tree.TreeModel
      • addTreeModelListener

        public void addTreeModelListener​(javax.swing.event.TreeModelListener l)
        Add a listener.
        Specified by:
        addTreeModelListener in interface javax.swing.tree.TreeModel
      • removeTreeModelListener

        public void removeTreeModelListener​(javax.swing.event.TreeModelListener l)
        Remove a listener.
        Specified by:
        removeTreeModelListener in interface javax.swing.tree.TreeModel
      • buildTreePath

        public java.util.List buildTreePath​(ITreeNode node)
        Build a tree path to the given node.
        Overrides:
        buildTreePath in class AsyncTreeModel
        Parameters:
        desc - The node.
        Returns:
        The path items.
      • isZombieNode

        public boolean isZombieNode​(java.lang.Object id)
        Check, if a node is a zombie.
        Overrides:
        isZombieNode in class AsyncTreeModel
      • dispose

        public void dispose()
        Called when the tree is removed.
        Overrides:
        dispose in class AsyncTreeModel