/** * Simulates a user clicking a cell in this fixture's {@code JTable} once, using the specified mouse button. * * @param cell the cell to click. * @param button the mouse button to use. * @return this fixture. * @throws NullPointerException if the cell is {@code null}. * @throws IllegalStateException if this fixture's {@code JTable} is disabled. * @throws IllegalStateException if this fixture's {@code JTable} is not showing on the screen. * @throws IndexOutOfBoundsException if any of the indices (row and column) is out of bounds. */ @Nonnull public JTableFixture click(@Nonnull TableCell cell, @Nonnull MouseButton button) { click(cell, button, 1); return this; }
/** * Simulates a user double-clicking this fixture's table cell. * * @return this fixture. * @throws IllegalStateException if this fixture's {@code JTable} is disabled. * @throws IllegalStateException if this fixture's {@code JTable} is not showing on the screen. */ @Override @Nonnull public JTableCellFixture doubleClick() { table.click(cell(), LEFT_BUTTON, 2); return this; }
/** * Simulates a user clicking this fixture's table cell. * * @return this fixture. * @throws IllegalStateException if this fixture's {@code JTable} is disabled. * @throws IllegalStateException if this fixture's {@code JTable} is not showing on the screen. */ @Override @Nonnull public JTableCellFixture click() { table.click(cell(), LEFT_BUTTON); return this; }
/** * Simulates a user clicking a cell in this fixture's table cell once, using the specified mouse button. * * @param button the mouse button to use. * @return this fixture. * @throws NullPointerException if the given {@code MouseButton} is {@code null}. * @throws IllegalStateException if this fixture's {@code JTable} is disabled. * @throws IllegalStateException if this fixture's {@code JTable} is not showing on the screen. */ @Override @Nonnull public JTableCellFixture click(@Nonnull MouseButton button) { table.click(cell(), button); return this; }
/** * Simulates a user clicking this fixture's table cell. * * @param mouseClickInfo specifies the button to click and the times the button should be clicked. * @return this fixture. * @throws NullPointerException if the given {@code MouseClickInfo} is {@code null}. * @throws IllegalStateException if this fixture's {@code JTable} is disabled. * @throws IllegalStateException if this fixture's {@code JTable} is not showing on the screen. */ @Override @Nonnull public JTableCellFixture click(@Nonnull MouseClickInfo mouseClickInfo) { table.click(cell(), mouseClickInfo); return this; }
/** * Simulates a user clicking a cell in this fixture's {@code JTable}, using the specified mouse button the given * number of times. * * @param cell the cell to click. * @param mouseClickInfo specifies the mouse button to use and how many times to click. * @return this fixture. * @throws NullPointerException if the given {@code MouseClickInfo} is {@code null}. * @throws NullPointerException if the cell is {@code null}. * @throws IllegalStateException if this fixture's {@code JTable} is disabled. * @throws IllegalStateException if this fixture's {@code JTable} is not showing on the screen. * @throws IndexOutOfBoundsException if any of the indices (row and column) is out of bounds. */ @Nonnull public JTableFixture click(@Nonnull TableCell cell, @Nonnull MouseClickInfo mouseClickInfo) { checkNotNull(mouseClickInfo); click(cell, mouseClickInfo.button(), mouseClickInfo.times()); return this; }