org.fest.swing.driver
Class BasicJTreeCellReader

java.lang.Object
  extended by org.fest.swing.driver.BasicJTreeCellReader
All Implemented Interfaces:
JTreeCellReader

public class BasicJTreeCellReader
extends Object
implements JTreeCellReader

Understands the default implementation of JTreeCellReader.

Author:
Yvonne Wang, Alex Ruiz

Constructor Summary
BasicJTreeCellReader()
          Creates a new BasicJTreeCellReader that uses a BasicCellRendererReader to read the value from the cell renderer component in a JTree.
BasicJTreeCellReader(CellRendererReader rendererReader)
          Creates a new BasicJTreeCellReader.
 
Method Summary
 String valueAt(JTree tree, Object modelValue)
          Returns the internal value of a cell in a JTree as expected in a test.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicJTreeCellReader

public BasicJTreeCellReader()
Creates a new BasicJTreeCellReader that uses a BasicCellRendererReader to read the value from the cell renderer component in a JTree.


BasicJTreeCellReader

public BasicJTreeCellReader(CellRendererReader rendererReader)
Creates a new BasicJTreeCellReader.

Parameters:
rendererReader - knows how to read values from the cell renderer component in a JTree.
Throws:
NullPointerException - if rendererReader is null.
Method Detail

valueAt

@RunsInCurrentThread
public String valueAt(JTree tree,
                                          Object modelValue)
Returns the internal value of a cell in a JTree as expected in a test.

Note: This method is not guaranteed to be executed in the event dispatch thread (EDT.) Clients are responsible for calling this method from the EDT.

Specified by:
valueAt in interface JTreeCellReader
Parameters:
tree - the given JTree.
modelValue - the value of a cell, retrieved from the model.
Returns:
the internal value of a cell in a JTree as expected in a test.


Copyright © 2007-2011 FEST (Fixtures for Easy Software Testing). All Rights Reserved.