|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object junit.swingui.TestTreeModel
class TestTreeModel
A tree model for a Test.
Field Summary | |
---|---|
private Hashtable |
fErrors
|
private Hashtable |
fFailures
|
private Vector |
fModelListeners
|
private Test |
fRoot
|
private Hashtable |
fRunTests
|
Constructor Summary | |
---|---|
TestTreeModel(Test root)
Constructs a tree model with the given test as its root. |
Method Summary | |
---|---|
(package private) void |
addError(Test t)
Remembers a test error |
(package private) void |
addFailure(Test t)
Remembers a test failure |
(package private) void |
addRunTest(Test t)
Remembers that a test was run |
void |
addTreeModelListener(TreeModelListener l)
adds a TreeModelListener |
int |
findTest(Test target,
Test node,
Vector path)
Finds the path to a test. |
void |
fireNodeChanged(TreePath path,
int index)
Fires a node changed event |
Object |
getChild(Object parent,
int index)
Gets the test at the given index |
int |
getChildCount(Object parent)
Gets the number of tests. |
int |
getIndexOfChild(Object parent,
Object child)
Gets the index of a test in a test suite |
Object |
getRoot()
Returns the root of the tree |
(package private) boolean |
isError(Test t)
Tests whether a test was an error |
(package private) boolean |
isFailure(Test t)
Tests whether a test was a failure |
boolean |
isLeaf(Object node)
Tests if the test is a leaf. |
(package private) TestSuite |
isTestSuite(Object node)
Tests if the node is a TestSuite. |
void |
removeTreeModelListener(TreeModelListener l)
Removes a TestModelListener |
(package private) void |
resetResults()
Resets the test results |
void |
valueForPathChanged(TreePath path,
Object newValue)
Called when the value of the model object was changed in the view |
(package private) boolean |
wasRun(Test t)
Returns whether a test was run |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private Test fRoot
private Vector fModelListeners
private Hashtable fFailures
private Hashtable fErrors
private Hashtable fRunTests
Constructor Detail |
---|
public TestTreeModel(Test root)
Method Detail |
---|
public void addTreeModelListener(TreeModelListener l)
addTreeModelListener
in interface TreeModel
public void removeTreeModelListener(TreeModelListener l)
removeTreeModelListener
in interface TreeModel
public int findTest(Test target, Test node, Vector path)
public void fireNodeChanged(TreePath path, int index)
public Object getChild(Object parent, int index)
getChild
in interface TreeModel
public int getChildCount(Object parent)
getChildCount
in interface TreeModel
public int getIndexOfChild(Object parent, Object child)
getIndexOfChild
in interface TreeModel
public Object getRoot()
getRoot
in interface TreeModel
public boolean isLeaf(Object node)
isLeaf
in interface TreeModel
TestSuite isTestSuite(Object node)
public void valueForPathChanged(TreePath path, Object newValue)
valueForPathChanged
in interface TreeModel
void addFailure(Test t)
void addError(Test t)
void addRunTest(Test t)
boolean wasRun(Test t)
boolean isError(Test t)
boolean isFailure(Test t)
void resetResults()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |