org.fest.swing.driver
Class BasicJListCellReader

java.lang.Object
  extended by org.fest.swing.driver.BasicJListCellReader
All Implemented Interfaces:
JListCellReader

public class BasicJListCellReader
extends Object
implements JListCellReader

Understands the default implementation of JListCellReader.

Author:
Alex Ruiz, Yvonne Wang

Constructor Summary
BasicJListCellReader()
          Creates a new BasicJListCellReader that uses a BasicCellRendererReader to read the value from the cell renderer component in a JList.
BasicJListCellReader(CellRendererReader rendererReader)
          Creates a new BasicJListCellReader.
 
Method Summary
 String valueAt(JList list, int index)
          Returns the internal value of a cell in a JList 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

BasicJListCellReader

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


BasicJListCellReader

public BasicJListCellReader(CellRendererReader rendererReader)
Creates a new BasicJListCellReader.

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

valueAt

@RunsInCurrentThread
public String valueAt(JList list,
                                          int index)
Returns the internal value of a cell in a JList 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 JListCellReader
Parameters:
list - the given JList.
index - the index of the cell.
Returns:
the internal value of a cell in a JList as expected in a test.
See Also:
CellRendererReader.valueFrom(Component)


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