use of org.fest.swing.fixture.JTableFixture in project ats-framework by Axway.
the class SwingTable method getSelectedRows.
/**
* Get selected rows in the table
*
* @return an array with the selected rows
* @throws VerificationException if the table element doesn't exist
*/
@PublicAtsApi
public int[] getSelectedRows() {
new SwingElementState(this).waitToBecomeExisting();
JTableFixture tableFixture = (JTableFixture) SwingElementLocator.findFixture(this);
try {
return tableFixture.component().getSelectedRows();
} catch (Exception e) {
throw new UiElementException(e.getMessage(), this);
}
}
use of org.fest.swing.fixture.JTableFixture in project ats-framework by Axway.
the class SwingTable method selectRow.
/**
* Select table rows
*
* @param rows row numbers to select
* @throws VerificationException if the element doesn't exist
*/
@PublicAtsApi
public void selectRow(int... rows) {
new SwingElementState(this).waitToBecomeExisting();
JTableFixture tableFixture = (JTableFixture) SwingElementLocator.findFixture(this);
try {
tableFixture.selectRows(rows);
} catch (Exception e) {
throw new UiElementException(e.getMessage(), this);
}
}
use of org.fest.swing.fixture.JTableFixture in project ats-framework by Axway.
the class SwingTable method selectCell.
/**
* Select table cell
*
* @param row the row number
* @param column the column number
* @throws VerificationException if the table element doesn't exist
*/
@PublicAtsApi
public void selectCell(int row, int column) {
new SwingElementState(this).waitToBecomeExisting();
JTableFixture tableFixture = (JTableFixture) SwingElementLocator.findFixture(this);
try {
tableFixture.selectCell(new TableCell(row, column) {
});
} catch (Exception e) {
throw new UiElementException(e.getMessage(), this);
}
}
use of org.fest.swing.fixture.JTableFixture in project ats-framework by Axway.
the class SwingTable method drop.
/**
* Simulates a user dropping an item into a specific table cell
*
* @param row the row number
* @param column the column number
*/
@PublicAtsApi
public void drop(int row, int column) {
new SwingElementState(this).waitToBecomeExisting();
((JTableFixture) SwingElementLocator.findFixture(this)).drop(new TableCell(row, column) {
});
}
use of org.fest.swing.fixture.JTableFixture in project ats-framework by Axway.
the class SwingTable method getCellBackgroundColor.
/**
* Returns the table cell background {@link Color}
*
* @param row the row number
* @param column the column number
*/
@PublicAtsApi
public Color getCellBackgroundColor(int row, int column) {
new SwingElementState(this).waitToBecomeExisting();
JTableFixture tableFixture = (JTableFixture) SwingElementLocator.findFixture(this);
return tableFixture.backgroundAt(new TableCell(row, column) {
}).target();
}
Aggregations