Modifier and Type | Method and Description |
---|---|
static void |
validateCellIndices(JTable table,
TableCell cell)
Validates that the given table cell is non
null and its indices are not out of bounds. |
static void |
validateCellIsEditable(JTable table,
int row,
int column)
Validates that the table cell in the given coordinates is editable.
|
static void |
validateColumnIndex(JTable table,
int column)
Validates that the given column index exists in the given table.
|
static void |
validateIndices(JTable table,
int row,
int column)
Validates the given indices regarding the given table.
|
static void |
validateNotNull(TableCell cell)
Validates that the given table cell is not
null . |
static void |
validateRowIndex(JTable table,
int row)
Validates that the given row index exists in the given table.
|
@RunsInCurrentThread public static void validateCellIsEditable(JTable table, int row, int column)
Note: This method is not guaranteed to be executed in the event dispatch thread (EDT.) Clients are responsible for calling this method from the EDT.
table
- the target JTable
.row
- the row index of the cell to validate.column
- the column index of the cell to validate.IllegalStateException
- if the table cell in the given coordinates is not editable.@RunsInCurrentThread public static void validateCellIndices(JTable table, TableCell cell)
null
and its indices are not out of bounds.
Note: This method is not guaranteed to be executed in the event dispatch thread (EDT.) Clients are responsible for calling this method from the EDT.
table
- the target JTable
.cell
- the cell to validate.NullPointerException
- if the cell is null
.IndexOutOfBoundsException
- if any of the indices (row and column) is out of bounds.public static void validateNotNull(TableCell cell)
null
.cell
- the cell to validate.NullPointerException
- if the cell is null
.@RunsInCurrentThread public static void validateIndices(JTable table, int row, int column)
Note: This method is not guaranteed to be executed in the event dispatch thread (EDT.) Clients are responsible for calling this method from the EDT.
table
- the JTable
to use to validate the given indices.row
- the row index to validate.column
- the column index to validate.IndexOutOfBoundsException
- if any of the indices is out of bounds or if the JTable
does not
have any rows.@RunsInCurrentThread public static void validateRowIndex(JTable table, int row)
Note: This method is not guaranteed to be executed in the event dispatch thread (EDT.) Clients are responsible for calling this method from the EDT.
table
- the table the given table.row
- the row to validate.IndexOutOfBoundsException
- if the row index is out of bounds.@RunsInCurrentThread public static void validateColumnIndex(JTable table, int column)
Note: This method is not guaranteed to be executed in the event dispatch thread (EDT.) Clients are responsible for calling this method from the EDT.
table
- the table the given table.column
- the column to validate.IndexOutOfBoundsException
- if the column index is out of bounds.Copyright © 2007-2013 FEST (Fixtures for Easy Software Testing). All Rights Reserved.