org.fest.swing.data
Class TableCellInSelectedRow

java.lang.Object
  extended by org.fest.swing.data.TableCellInSelectedRow
All Implemented Interfaces:
TableCellFinder

public class TableCellInSelectedRow
extends Object
implements TableCellFinder

Understands lookup of a cell in the first selected row of a JTable.

Example:

 // import static org.fest.swing.data.TableCellInSelectedRow.row;
 TableCell cell = dialog.table("records").cell(selectedRow().column(2));
 

Author:
Alex Ruiz

Nested Class Summary
static class TableCellInSelectedRow.TableCellBuilder
          Understands creation of TableCellInSelectedRows.
 
Constructor Summary
protected TableCellInSelectedRow(int column)
           
 
Method Summary
 TableCell findCell(JTable table, JTableCellReader cellReader)
          Finds a cell in the given JTable that belongs to the first selected row and has a matching column index.
static TableCellInSelectedRow.TableCellBuilder selectedRow()
          Starting point for the creation of a TableCellInSelectedRow.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TableCellInSelectedRow

protected TableCellInSelectedRow(int column)
Method Detail

selectedRow

public static TableCellInSelectedRow.TableCellBuilder selectedRow()
Starting point for the creation of a TableCellInSelectedRow.

Example:

 // import static org.fest.swing.data.TableCellInSelectedRow.row;
 TableCellInSelectedRow cell = selectedRow().column(2);
 

Returns:
the created builder.

findCell

public TableCell findCell(JTable table,
                          JTableCellReader cellReader)
Finds a cell in the given JTable that belongs to the first selected row and has a matching column index.

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.