Details
-
Type:
New Feature
-
Status:
Resolved
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: FEST-Swing 1.1
-
Fix Version/s: FEST-Swing 1.2a4
-
Component/s: Swing
-
Labels:None
-
Number of attachments :
Description
From Ken Geis:
I would like to have a method on TableCell and TableCellByColumnName so that I could do something like
tableFixture.cell(TableCell.selectedRow().column(1)).enterValue("foo");
I would expect selectedRow() to throw an exception (or return null, but I that would just lead to an annoying NPE that the developer needs to track down) if no row is selected. If multiple rows are selected, it would throw an exception.
Original report: Issue 226 (Google Code)
It is really not possible to add the method selectedRow to TableCell, without getting into a "weird" API. TableCell only cares about row and column indices, and has no idea which is the selected row of any JTable, because it is not bound to any JTable. I tried to add a "useSelectedRow" flag, but the state of the TableCell looks pretty weird to me.
Instead, I added the method selectedRow to JTableFixture, so at least we can write something like: