assertj / assertj-swing

Fluent assertions for Swing apps
Other
108 stars 52 forks source link

Ability to unselect rows on a JTableFixture #182

Closed fedelopez closed 8 years ago

fedelopez commented 8 years ago

Currently the JTableFixture allows selecting one or more rows via the method selectRows(int... rows). It would be very useful to have a method which allows unselecting rows too.

My current workaround is the following:

tableFixture.selectRows(row);
...
tableFixture.pressKey(KeyEvent.VK_CONTROL);
TableCellInSelectedRow column = new TableCellInSelectedRow.TableCellBuilder().column(0);
tableFixture.cell(column).click();
tableFixture.releaseKey(KeyEvent.VK_CONTROL);

Is there a better way to unselect a row?

croesch commented 8 years ago

Currently there is no good way. You can use Platform.controlOrCommandKey() instead of the control key .. but there's no support for deselecting rows. Not yet :)

croesch commented 8 years ago

Contained in 3.3.0