public class BasicJTableCellReader extends Object implements JTableCellReader
JTableCellReader.| Constructor and Description |
|---|
BasicJTableCellReader()
Creates a new
BasicJTableCellReader that uses a
to read the value from the cell renderer component in a
JTable. |
BasicJTableCellReader(CellRendererReader reader)
Creates a new
BasicJTableCellReader. |
| Modifier and Type | Method and Description |
|---|---|
Color |
backgroundAt(JTable table,
int row,
int column)
Returns the background color of the cell renderer for the given table cell.
|
Font |
fontAt(JTable table,
int row,
int column)
Returns the font of the cell renderer for the given table cell.
|
Color |
foregroundAt(JTable table,
int row,
int column)
Returns the foreground color of the cell renderer for the given table cell.
|
String |
valueAt(JTable table,
int row,
int column)
Returns the internal value of a cell in a
as expected in a test. |
public BasicJTableCellReader()
BasicJTableCellReader that uses a
BasicCellRendererReader to read the value from the cell renderer component in a
JTable.public BasicJTableCellReader(CellRendererReader reader)
BasicJTableCellReader.reader - knows how to read values from the cell renderer component in a
JTable.NullPointerException - if reader is null.@RunsInCurrentThread public String valueAt(JTable table, int row, int column)
JTable as expected in a test. This method first
tries to return the value displayed in the JTable's cell renderer.
JLabel, this method returns its textJComboBox, this method returns the value of its selection as a
StringJCheckBox, this method returns whether it is selected or nottoString implementation
of the object stored in the JTable's model at the specified indices.
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.
valueAt in interface JTableCellReadertable - the given JTable.row - the row index of the cell.column - the column index of the cell.JTable as expected in a test.@RunsInCurrentThread public Font fontAt(JTable table, int row, int column)
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.
fontAt in interface JTableCellReadertable - the given JTable.row - the row index of the cell.column - the column index of the cell.@RunsInCurrentThread public Color backgroundAt(JTable table, int row, int column)
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.
backgroundAt in interface JTableCellReadertable - the given JTable.row - the row index of the cell.column - the column index of the cell.@RunsInCurrentThread public Color foregroundAt(JTable table, int row, int column)
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.
foregroundAt in interface JTableCellReadertable - the given JTable.row - the row index of the cell.column - the column index of the cell.Copyright © 2007-2012 FEST (Fixtures for Easy Software Testing). All Rights Reserved.