org.fest.swing.data
Class TableCellByColumnId
java.lang.Object
org.fest.swing.data.TableCellByColumnId
- All Implemented Interfaces:
- TableCellFinder
public class TableCellByColumnId
- extends Object
- implements TableCellFinder
Understands lookup of a cell in a JTable
by column identifier.
Example:
// import static org.fest.swing.data.TableCellByColumnId.row;
TableCell
cell = dialog.table("records").cell(row
(3).columnId("firstColumn"));
- Author:
- Alex Ruiz
row
public final int row
columnId
public final Object columnId
TableCellByColumnId
protected TableCellByColumnId(int row,
Object columnId)
row
public static TableCellByColumnId.TableCellBuilder row(int row)
- Starting point for the creation of a
TableCellByColumnId
.
Example:
// import static org.fest.swing.data.TableCellByColumnId.row;
TableCellByColumnId cell = row(5).columnId("hobbyColumn");
- Parameters:
row
- the row index of the table cell to find.
- Returns:
- the created builder.
findCell
@RunsInEDT
public TableCell findCell(JTable table,
JTableCellReader cellReader)
- Finds a cell in the given
JTable
that has a matching row index and column id.
- Specified by:
findCell
in interface TableCellFinder
- Parameters:
table
- the target JTable
.cellReader
- knows how to read the contents of a cell in a JTable
.
- Returns:
- the cell found, if any.
- Throws:
ActionFailedException
- if a matching cell could not be found.
toString
public String toString()
- Overrides:
toString
in class Object
Copyright © 2007-2011 FEST (Fixtures for Easy Software Testing). All Rights Reserved.