Class GUIRunner.TreePathIterator

    • Constructor Detail

      • TreePathIterator

        TreePathIterator​(JTree tree,
                         int index)
    • Method Detail

      • updatePathI

        void updatePathI()
      • setFirstPath

        void setFirstPath()
        Initializes currPath with the first path in treeModel. **** Shall be invoked by TreePathUpdater only ****
      • prolonguePath

        static TreePath prolonguePath​(TreePath path)
        Prolongues path as long as possible in each step with 0th child.
      • shortenPath

        private int shortenPath()
        Replaces currPath removing the last node as long as the last node in the path is the last child of the last but one node and after having done this returns the index of the last node as a child of the last but one node.

        CAUTION: This method shall be invoked only if currPath can be incremented.

        Throws:
        NullPointerException - if currPath cannot be incremented.