com.sciapp.table
Class TableUtils
java.lang.Object
com.sciapp.table.TableUtils
public class TableUtils
- extends Object
|
Method Summary |
static int |
convertRowIndexToModel(JTable table,
int viewRowIndex)
Determines the index of the row in the underlying model in terms
of the row index in the table. |
static int |
convertRowIndexToView(JTable table,
int modelRowIndex)
Determines the index of the row in the table in terms
of the row index in the underlying model. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
convertRowIndexToModel
public static int convertRowIndexToModel(JTable table,
int viewRowIndex)
- Determines the index of the row in the underlying model in terms
of the row index in the table.
- Parameters:
table - the table whose row index we are convertingviewRowIndex - the index of the row in the table
- Returns:
- the index of the corresponding row in the underlying model
convertRowIndexToView
public static int convertRowIndexToView(JTable table,
int modelRowIndex)
- Determines the index of the row in the table in terms
of the row index in the underlying model.
If the row is not viewable in the table (such as filtered out),
-1 is returned.
- Parameters:
table - the table whose row index we are convertingmodelRowIndex - the index of the row in the underlying model
- Returns:
- the index of the corresponding row in the table