Package org.fest.swing.data

Examples of org.fest.swing.data.TableCell


* @author Alex Ruiz
*/
public class JTableCellValidator_validateCellIndices_Test {
  @Test(expected = IndexOutOfBoundsException.class)
  public void should_throw_error_if_JTable_is_empty() {
    TableCell cell = TableCell.row(2).column(3);
    JTableCellPreconditions.checkCellIndicesInBounds(table().createNew(), cell);
  }
View Full Code Here


    JTableCellPreconditions.checkCellIndicesInBounds(table().createNew(), cell);
  }

  @Test(expected = IndexOutOfBoundsException.class)
  public void should_throw_error_if_row_is_negative() {
    TableCell cell = TableCell.row(-2).column(3);
    JTableCellPreconditions.checkCellIndicesInBounds(table().withRowCount(4).withColumnCount(3).createNew(), cell);
  }
View Full Code Here

    JTableCellPreconditions.checkCellIndicesInBounds(table().withRowCount(4).withColumnCount(3).createNew(), cell);
  }

  @Test(expected = IndexOutOfBoundsException.class)
  public void should_throw_error_if_column_is_negative() {
    TableCell cell = TableCell.row(2).column(-3);
    JTableCellPreconditions.checkCellIndicesInBounds(table().withRowCount(4).withColumnCount(3).createNew(), cell);
  }
View Full Code Here

    JTableCellPreconditions.checkCellIndicesInBounds(table().withRowCount(4).withColumnCount(3).createNew(), cell);
  }

  @Test(expected = IndexOutOfBoundsException.class)
  public void should_throw_error_if_row_is_out_of_bounds() {
    TableCell cell = TableCell.row(4).column(2);
    JTableCellPreconditions.checkCellIndicesInBounds(table().withRowCount(4).withColumnCount(3).createNew(), cell);
  }
View Full Code Here

    JTableCellPreconditions.checkCellIndicesInBounds(table().withRowCount(4).withColumnCount(3).createNew(), cell);
  }

  @Test(expected = IndexOutOfBoundsException.class)
  public void should_throw_error_if_column_is_out_of_bounds() {
    TableCell cell = TableCell.row(0).column(3);
    JTableCellPreconditions.checkCellIndicesInBounds(table().withRowCount(4).withColumnCount(3).createNew(), cell);
  }
View Full Code Here

    table = window.table;
  }

  @Test
  public void should_return_true_if_only_one_row_and_only_one_column_are_selected() {
    TableCell cell = row(0).column(2);
    selectCells(table, cell, cell);
    robot.waitForIdle();
    assertThat(isCellSelected(table, 0, 2)).isTrue();
  }
View Full Code Here

*/
final class JTableMatchingCellQuery {
  @RunsInEDT
  static @Nonnull TableCell cellWithValue(final @Nonnull JTable table, final @Nonnull TextMatcher matcher,
      final @Nonnull JTableCellReader cellReader) {
    TableCell result = execute(new GuiQuery<TableCell>() {
      @Override
      protected TableCell executeInEDT() {
        return findMatchingCell(table, matcher, cellReader);
      }
    });
View Full Code Here

  }

  @Test
  public void should_return_cell_with_given_text() {
    String value = createCellValueFrom(row, column);
    TableCell cell = driver.cell(table, value);
    assertThat(cell.row).isEqualTo(row);
    assertThat(cell.column).isEqualTo(column);
    assertThatCellReaderWasCalled();
  }
View Full Code Here

   * @throws ActionFailedException if a matching cell could not be found.
   */
  @RunsInEDT
  public TableCell cell(JTable table, TableCellFinder cellFinder) {
    if (cellFinder == null) throw new NullPointerException("The cell finder to use should not be null");
    TableCell cell = cellFinder.findCell(table, cellReader);
    validateCellIndices(table, cell);
    return cell;
  }
View Full Code Here

        HashSet<TableCell> testedCells = new HashSet<TableCell>();
        for (int row : testedRows) {
            for (int col : testedCols) {
                String patchName = "PN " + row + " " + col;
                TableCellBuilder cellBuilder = TableCell.row(row);
                TableCell tableCell = cellBuilder.column(col);
                if (testedCells.contains(tableCell)) {
                    LOG.info("Skipping already tested patch on " + row
                            + " row " + col + " col.");
                    continue;
                }
View Full Code Here

TOP

Related Classes of org.fest.swing.data.TableCell

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.