public class TableCellByColumnId extends Object implements TableCellFinder
Looks up a cell in a JTable
by column identifier.
Example:
// import static org.assertj.swing.data.TableCellByColumnId.row;JTableCellFixture
cell = dialog.table("records").cell(row
(3).columnId("firstColumn"));
Modifier and Type | Class and Description |
---|---|
static class |
TableCellByColumnId.TableCellBuilder
Factory of
TableCellByColumnId s. |
Modifier | Constructor and Description |
---|---|
protected |
TableCellByColumnId(int row,
Object columnId) |
Modifier and Type | Method and Description |
---|---|
TableCell |
findCell(JTable table,
JTableCellReader cellReader)
Finds a cell in the given
JTable that has a matching row index and column id. |
static TableCellByColumnId.TableCellBuilder |
row(int row)
Starting point for the creation of a
TableCellByColumnId . |
String |
toString() |
public final int row
public final Object columnId
public static TableCellByColumnId.TableCellBuilder row(int row)
TableCellByColumnId
.
Example:
// import static org.assertj.swing.data.TableCellByColumnId.row; TableCellByColumnId cell = row(5).columnId("hobbyColumn");
row
- the row index of the table cell to find.@RunsInEDT @Nonnull public TableCell findCell(@Nonnull JTable table, @Nonnull JTableCellReader cellReader)
JTable
that has a matching row index and column id.findCell
in interface TableCellFinder
table
- the target JTable
.cellReader
- knows how to read the contents of a cell in a JTable
.ActionFailedException
- if a matching cell could not be found.Copyright © 2014–2019 AssertJ. All rights reserved.