org.fest.swing.driver
Class BasicJComboBoxCellReader

java.lang.Object
  extended by org.fest.swing.driver.BasicJComboBoxCellReader
All Implemented Interfaces:
JComboBoxCellReader

public class BasicJComboBoxCellReader
extends Object
implements JComboBoxCellReader

Understands the default implementation of JComboBoxCellReader.

Author:
Alex Ruiz, Yvonne Wang

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

BasicJComboBoxCellReader

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


BasicJComboBoxCellReader

public BasicJComboBoxCellReader(CellRendererReader rendererReader)
Creates a new BasicJComboBoxCellReader.

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

valueAt

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


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