Class GTreeModel

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

    public class GTreeModel
    extends java.lang.Object
    implements javax.swing.tree.TreeModel
    • Constructor Detail

      • GTreeModel

        public GTreeModel​(GTreeRootNode root)
        Constructs a GTreeModel with the given root node.
        Parameters:
        root - The root of the tree.
        isThreaded - True signals to perform all tree tasks in a threaded environment to avoid hanging the swing thread.
    • Method Detail

      • getRoot

        public java.lang.Object getRoot()
        Specified by:
        getRoot in interface javax.swing.tree.TreeModel
      • addTreeModelListener

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

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

        public java.lang.Object getChild​(java.lang.Object parent,
                                         int index)
        Specified by:
        getChild in interface javax.swing.tree.TreeModel
      • getChildCount

        public int getChildCount​(java.lang.Object parent)
        Specified by:
        getChildCount in interface javax.swing.tree.TreeModel
      • getIndexOfChild

        public int getIndexOfChild​(java.lang.Object parent,
                                   java.lang.Object child)
        Specified by:
        getIndexOfChild in interface javax.swing.tree.TreeModel
      • isLeaf

        public boolean isLeaf​(java.lang.Object node)
        Specified by:
        isLeaf in interface javax.swing.tree.TreeModel
      • valueForPathChanged

        public void valueForPathChanged​(javax.swing.tree.TreePath path,
                                        java.lang.Object newValue)
        Specified by:
        valueForPathChanged in interface javax.swing.tree.TreeModel
      • fireNodeStructureChanged

        public void fireNodeStructureChanged​(GTreeNode changedNode)
      • fireRootChanged

        public void fireRootChanged()
      • fireNodeDataChanged

        public void fireNodeDataChanged​(GTreeNode parentNode,
                                        GTreeNode changedNode)
      • fireNodeRemoved

        public void fireNodeRemoved​(GTreeNode parentNode,
                                    GTreeNode removedNode,
                                    int oldIndexInParent)
      • dispose

        public void dispose()