Package eu.simuline.testhelpers
Class GUIRunner.TreePathIterator
- java.lang.Object
-
- eu.simuline.testhelpers.GUIRunner.TreePathIterator
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static classGUIRunner.TreePathIterator.TreePathUpdaterExpands the tree along the current path, forGUIRunner.TreePathIterator.TreePathUpdater.Genericafter incrementing the current path.
-
Field Summary
Fields Modifier and Type Field Description private TreePathcurrPathprivate TreeModeltreeModelA model of the tree of testsuites and tests.private GUIRunner.TreePathIterator.TreePathUpdatertreePathUpdaterDecides how to update the current path: For the first path, just inkoke ***** .
-
Constructor Summary
Constructors Constructor Description TreePathIterator(JTree tree, int index)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) TreePathgetPath()(package private) TreePathincPath()IncrementscurrPathand returns the result.(package private) static TreePathprolonguePath(TreePath path)Prolongues path as long as possible in each step with 0th child.(package private) voidsetFirstPath()private intshortenPath()ReplacescurrPathremoving 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.(package private) voidupdatePathI()
-
-
-
Field Detail
-
treeModel
private final TreeModel treeModel
A model of the tree of testsuites and tests.
-
currPath
private TreePath currPath
-
treePathUpdater
private GUIRunner.TreePathIterator.TreePathUpdater treePathUpdater
Decides how to update the current path: For the first path, just inkoke ***** .
-
-
Constructor Detail
-
TreePathIterator
TreePathIterator(JTree tree, int index)
-
-
Method Detail
-
updatePathI
void updatePathI()
-
setFirstPath
void setFirstPath()
-
prolonguePath
static TreePath prolonguePath(TreePath path)
Prolongues path as long as possible in each step with 0th child.
-
shortenPath
private int shortenPath()
ReplacescurrPathremoving 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
currPathcan be incremented.- Throws:
NullPointerException- ifcurrPathcannot be incremented.
-
getPath
TreePath getPath()
-
-