public class AggregateTableUtils extends Object
PivotDataModel.getField(int)
to get the PivotField instance with the field index.
In those utility methods, we will use fieldIndex to indicate the solid index in PivotField while tableModelIndex means
the model index in current view.Constructor and Description |
---|
AggregateTableUtils() |
Modifier and Type | Method and Description |
---|---|
static AggregateTablePane |
getAggregateTablePane(JTable table)
Gets AggregateTablePane which contains the table if any.
|
static Object |
getColumnIdentifier(JTable table,
int fieldIndex)
Gets column identifier of the table.
|
static String |
getColumnName(JTable table,
int fieldIndex)
Gets column name of the table.
|
static JTable |
getColumnTable(JTable table,
Object fieldName)
Get which table the column identifier belongs to.
|
static int |
getFieldIndex(JTable table,
Object fieldName)
Gets the field index from the column fieldName you have.
|
protected static int |
getInnerModelIndex(JTable table,
Object fieldName)
Deprecated.
replaced by
getFieldIndex(javax.swing.JTable, Object) |
protected static int |
getOuterModelIndex(JTable table,
int fieldIndex)
Deprecated.
replaced by
getTableModelIndex(javax.swing.JTable, int) |
protected static int |
getTableModelIndex(JTable table,
int fieldIndex)
Gets the model index in table model from the field index.
|
static void |
hideColumn(JTable table,
Object fieldName,
int modelIndex)
Hide column with fieldName and table model index.
|
static boolean |
isColumnVisible(JTable table,
int fieldIndex)
Checks if the column is visible in the table.
|
static void |
showColumn(JTable table,
Object fieldName,
int modelIndex)
Show column with fieldName and table model index
|
public static AggregateTablePane getAggregateTablePane(JTable table)
table
- the tablepublic static boolean isColumnVisible(JTable table, int fieldIndex)
table
- the tablefieldIndex
- the pivot field indexpublic static String getColumnName(JTable table, int fieldIndex)
table
- the tablefieldIndex
- the pivot field indexpublic static Object getColumnIdentifier(JTable table, int fieldIndex)
table
- the tablefieldIndex
- the pivot field indexpublic static JTable getColumnTable(JTable table, Object fieldName)
table
- the index tablefieldName
- the pivot field name@Deprecated protected static int getInnerModelIndex(JTable table, Object fieldName)
getFieldIndex(javax.swing.JTable, Object)
table
- the tablefieldName
- the pivot field namepublic static int getFieldIndex(JTable table, Object fieldName)
table
- the tablefieldName
- the pivot field name@Deprecated protected static int getOuterModelIndex(JTable table, int fieldIndex)
getTableModelIndex(javax.swing.JTable, int)
table
- the tablefieldIndex
- the field indexprotected static int getTableModelIndex(JTable table, int fieldIndex)
table
- the tablefieldIndex
- the field indexpublic static void hideColumn(JTable table, Object fieldName, int modelIndex)
table
- the tablefieldName
- the pivot field namemodelIndex
- the table model index