Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Copyright 2012-2015 the original author or authors.
package org.assertj.swing.jide.grids;
import static org.junit.Assert.assertEquals;
import  com.jidesoft.grid.TableScrollPane;

A AssertJ-Swing fixture for driving a TableScrollPane.

Peter Murray
    implements ExtendedTableFixture {
  protected JTableDriver _tableDriver;
  public TableScrollPaneFixture(Robot robot, TableScrollPane pane) {
  public TableScrollPaneFixture(Robot robotString name) {
  public JideTableFixture mainTable() {
    return new JideTableFixture(robot(), targetAsTableScrollPane().getMainTable());
    return new JideTableFixture(robot(), targetAsTableScrollPane().getRowHeaderTable());
  public int rows() {
    return targetAsTableScrollPane().getRowCount();
  public int columns() {
    return targetAsTableScrollPane().getColumnCount();
  public int selectedRow() {
    return targetAsTableScrollPane().getSelectedRow();
  public int[] selectedRows() {
    return targetAsTableScrollPane().getSelectedRows();
  public void requireNoSelection() {
    assertEquals("There should be no selection in the table",
  public TableScrollPaneFixture requireSelection(int... rows) {
    return this;
  public TableScrollPaneFixture selectRow(int row) {
    return this;
  public TableScrollPane targetAsTableScrollPane() {
    return (TableScrollPane) target();
  private void checkTableInstance() {
    if (!(target() instanceof TableScrollPane)) {
      throw new IllegalStateException("The target instance is not a TableScrollPane");
New to GrepCode? Check out our FAQ X