|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.jidesoft.pivot.AggregateTableUtils
public class AggregateTableUtils
Utility methods for AggregateTable.
AggregateTable will change its model each time you call aggregate() if the aggregated columns are changed. Hence, the table model is not as "solid" as in other normal table. The solid model data in AggregateTable is the order PivotDataModel keeps its PivotFields. To make sure you can get correct column name, you need convert the column index in table model to field index first. That's why we have those utility methods for AggregateTable. The field index means that the order of the PivotField inside the PivotDataModel. You would be able to invokePivotDataModel.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 Summary | |
---|---|
AggregateTableUtils()
|
Method Summary | |
---|---|
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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AggregateTableUtils()
Method Detail |
---|
public static AggregateTablePane getAggregateTablePane(JTable table)
table
- the table
public static boolean isColumnVisible(JTable table, int fieldIndex)
table
- the tablefieldIndex
- the pivot field index
public static String getColumnName(JTable table, int fieldIndex)
table
- the tablefieldIndex
- the pivot field index
public static Object getColumnIdentifier(JTable table, int fieldIndex)
table
- the tablefieldIndex
- the pivot field index
public 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 name
public 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 index
protected static int getTableModelIndex(JTable table, int fieldIndex)
table
- the tablefieldIndex
- the field index
public static void hideColumn(JTable table, Object fieldName, int modelIndex)
table
- the tablefieldName
- the pivot field namemodelIndex
- the table model indexpublic static void showColumn(JTable table, Object fieldName, int modelIndex)
table
- the tablefieldName
- the pivot filed namemodelIndex
- the table model index
|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |