public class TableCellInRowByValue extends Object implements TableCellFinder
JTable
whose values match the given ones.
Example:
// import static org.fest.swing.data.TableCellInSelectedRow.row;cell = dialog.table("records").cell(
TableCell
rowWithValue
("column1", "column2", "column3").column(2));
Modifier and Type | Class and Description |
---|---|
static class |
TableCellInRowByValue.TableCellBuilder
Understands creation of
s. |
Modifier | Constructor and Description |
---|---|
protected |
TableCellInRowByValue(String[] values,
int column)
Creates a new
TableCellInRowByValue . |
Modifier and Type | Method and Description |
---|---|
TableCell |
findCell(JTable table,
JTableCellReader cellReader)
Finds a cell in the given
that:
is located in the first row whose values match the given ones
has a matching row index
|
static TableCellInRowByValue.TableCellBuilder |
rowWithValue(String... values)
Starting point for the creation of a
. |
String |
toString() |
protected TableCellInRowByValue(String[] values, int column)
TableCellInRowByValue
.values
- the values in the cells of the row we are looking for.column
- the index of the column in the table cell to find.public static TableCellInRowByValue.TableCellBuilder rowWithValue(String... values)
TableCellInRowByValue
.
Example:
// import static org.fest.swing.data.TableCellInRowByValue.rowWithValue; TableCellByColumnId cell = rowWithValue("column1", "column2", "column3").column(3);
values
- the values in the cells of the row we are looking for.NullPointerException
- if the given array of values is null
.@RunsInEDT public TableCell findCell(JTable table, JTableCellReader cellReader)
JTable
that:
findCell
in interface TableCellFinder
table
- the target JTable
.cellReader
- knows how to read the contents of a cell in a JTable
.IllegalStateException
- if the size of values to look up is not equal to the number of columns in the given
JTable
.ActionFailedException
- if a matching cell could not be found.Copyright © 2007-2013 FEST (Fixtures for Easy Software Testing). All Rights Reserved.