|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.assertj.swing.driver.BasicJTableCellReader
public class BasicJTableCellReader
Default implementation of JTableCellReader
.
Constructor Summary | |
---|---|
BasicJTableCellReader()
Creates a new BasicJTableCellReader that uses a BasicCellRendererReader to read the value from the
cell renderer component in a JTable . |
|
BasicJTableCellReader(CellRendererReader reader)
Creates a new BasicJTableCellReader . |
Method Summary | |
---|---|
Color |
backgroundAt(JTable table,
int row,
int column)
Returns the background color of the cell renderer for the given JTable cell. |
Font |
fontAt(JTable table,
int row,
int column)
Returns the font of the cell renderer for the given JTable cell. |
Color |
foregroundAt(JTable table,
int row,
int column)
Returns the foreground color of the cell renderer for the given JTable cell. |
String |
valueAt(JTable table,
int row,
int column)
Returns the internal value of a cell in a JTable 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 |
---|
public BasicJTableCellReader()
BasicJTableCellReader
that uses a BasicCellRendererReader
to read the value from the
cell renderer component in a JTable
.
public BasicJTableCellReader(@Nonnull CellRendererReader reader)
BasicJTableCellReader
.
reader
- knows how to read values from the cell renderer component in a JTable
.
NullPointerException
- if reader
is null
.Method Detail |
---|
@RunsInCurrentThread @Nullable public String valueAt(@Nonnull JTable table, int row, int column)
Returns the internal value of a cell in a 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 String
JCheckBox
, 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 accessed in the current executing thread. Such thread may or may not be the event dispatch thread (EDT.) Client code must call this method from the EDT.
valueAt
in interface JTableCellReader
table
- the given JTable
.row
- the row index of the cell.column
- the column index of the cell.
JTable
as expected in a test.@RunsInCurrentThread @Nullable public Font fontAt(@Nonnull JTable table, int row, int column)
Returns the font of the cell renderer for the given JTable
cell.
Note: This method is accessed in the current executing thread. Such thread may or may not be the event dispatch thread (EDT.) Client code must call this method from the EDT.
fontAt
in interface JTableCellReader
table
- the given JTable
.row
- the row index of the cell.column
- the column index of the cell.
JTable
cell.@RunsInCurrentThread @Nullable public Color backgroundAt(@Nonnull JTable table, int row, int column)
Returns the background color of the cell renderer for the given JTable
cell.
backgroundAt
in interface JTableCellReader
table
- the given JTable
.row
- the row index of the cell.column
- the column index of the cell.
JTable
cell.@RunsInCurrentThread @Nullable public Color foregroundAt(@Nonnull JTable table, int row, int column)
Returns the foreground color of the cell renderer for the given JTable
cell.
Note: This method is accessed in the current executing thread. Such thread may or may not be the event dispatch thread (EDT.) Client code must call this method from the EDT.
foregroundAt
in interface JTableCellReader
table
- the given JTable
.row
- the row index of the cell.column
- the column index of the cell.
JTable
cell.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |