public class TableModelWrapperUtils extends Object
Constructor and Description |
---|
TableModelWrapperUtils() |
Modifier and Type | Method and Description |
---|---|
static int |
getActualColumnAt(TableModel outerModel,
int column)
Gets the actual column index on the innermost model according to the column index on the outerModel.
|
static int |
getActualColumnAt(TableModel outerModel,
int column,
Class innerModelClass)
Gets the actual column index on an inner model whose class is the innerModelClass.
|
static int |
getActualColumnAt(TableModel outerModel,
int column,
TableModel innerModel)
Gets the actual column index on the innerModel according to the column index on the outerModel.
|
static int |
getActualColumnCount(TableModel outerModel)
Gets the innermost table model column count.
|
static int[] |
getActualColumnsAt(TableModel outerModel,
int[] columnIndices,
boolean sort)
Gets the actual columns on the innermost table model based on the column indices on the outer TableModel.
|
static int |
getActualRowAt(TableModel outerModel,
int rowIndex)
Gets the actual row index on the innermost model according to the rowIndex on the outerModel.
|
static int |
getActualRowAt(TableModel outerModel,
int rowIndex,
Class innerModelClass)
Gets the actual row index on an innerModel whose class is innerModelClass according to the rowIndex on the
outerModel.
|
static int |
getActualRowAt(TableModel outerModel,
int rowIndex,
TableModel innerModel)
Gets the actual row index on the innerModel according to the rowIndex on the outerModel.
|
static int |
getActualRowCount(TableModel outerModel)
Gets the innermost table model row count.
|
static int[] |
getActualRowsAt(TableModel outerModel,
int[] rowIndices,
boolean sort)
Gets the actual rows index on the inner most table model based on the row indices of the outer TableModel.
|
static TableModel |
getActualTableModel(TableModel outerModel)
Gets the inner most table model.
|
static TableModel |
getActualTableModel(TableModel outerModel,
Class innerModelClass)
Gets the inner table model whose class is an instance of the innerModelClass.
|
static int |
getColumnAt(TableModel outerModel,
int columnInInnerModel)
Gets the column index on the outer model knowing the column index on the innermost model
|
static int |
getColumnAt(TableModel outerModel,
TableModel innerModel,
int columnInInnerModel)
Gets the column index on the outer model knowing the column index on an inner model
|
static int[] |
getColumnsAt(TableModel outerModel,
int[] columnIndices,
boolean sort)
Gets the visual column array based on the column indices on the inner TableModel.
|
static TableModel |
getNextInnerTableModel(TableModel outerModel)
Gets next inner table model.
|
static int |
getRowAt(TableModel outerModel,
int rowInInnerModel)
Gets the row index on the outer model knowing the row index on the innermost model
|
static int |
getRowAt(TableModel outerModel,
TableModel innerModel,
int rowInInnerModel)
Gets the row on the outer model knowing the row index on an inner model
|
static int[] |
getRowsAt(TableModel outerModel,
int[] rowIndices,
boolean sort)
Gets the visual rows on the outerModel based on the row indices on the innermost TableModel.
|
static int |
getVisibleChildrenCount(TableModel model,
Row parent)
Deprecated.
|
static int |
getVisibleChildrenCount(TableModel model,
Row parent,
boolean leafOnly,
boolean countCollapsedNodes)
Deprecated.
|
public static TableModel getActualTableModel(TableModel outerModel, Class innerModelClass)
outerModel
- the outermost TableModelinnerModelClass
- the class for the inner model.public static TableModel getActualTableModel(TableModel outerModel)
outerModel
- the outer TableModelpublic static TableModel getNextInnerTableModel(TableModel outerModel)
outerModel
- the outer TableModelpublic static int getActualRowAt(TableModel outerModel, int rowIndex, Class innerModelClass)
outerModel
- the outer TableModel.rowIndex
- the row index on the outer TableModelinnerModelClass
- the class of the inner TableModelpublic static int getActualRowAt(TableModel outerModel, int rowIndex, TableModel innerModel)
outerModel
- the outer TableModel.rowIndex
- the row index on the outer TableModelinnerModel
- the inner TableModelpublic static int getActualRowAt(TableModel outerModel, int rowIndex)
outerModel
- the outer TableModel.rowIndex
- the row index on the outer TableModelpublic static int getActualRowCount(TableModel outerModel)
outerModel
- the outer TableModelpublic static int getRowAt(TableModel outerModel, TableModel innerModel, int rowInInnerModel)
outerModel
- the outer TableModelinnerModel
- the inner TableModelrowInInnerModel
- the row index on the inner TableModelpublic static int getRowAt(TableModel outerModel, int rowInInnerModel)
outerModel
- the outer TableModelrowInInnerModel
- the row index on the innermost TableModelpublic static int getActualColumnAt(TableModel outerModel, int column, Class innerModelClass)
outerModel
- the outer TableModel.column
- the column index on outer TableModelinnerModelClass
- the class of the inner TableModelpublic static int getActualColumnAt(TableModel outerModel, int column, TableModel innerModel)
outerModel
- the outer TableModel.column
- the column index on outer TableModelinnerModel
- the inner TableModelpublic static int getActualColumnAt(TableModel outerModel, int column)
outerModel
- the outer TableModel.column
- the column index on outer TableModelpublic static int getActualColumnCount(TableModel outerModel)
outerModel
- the outer TableModelpublic static int getColumnAt(TableModel outerModel, TableModel innerModel, int columnInInnerModel)
outerModel
- the outer TableModelinnerModel
- the inner modelcolumnInInnerModel
- the column index on the inner model.public static int getColumnAt(TableModel outerModel, int columnInInnerModel)
outerModel
- the outer TableModelcolumnInInnerModel
- the column index on the innermost modelpublic static int[] getActualRowsAt(TableModel outerModel, int[] rowIndices, boolean sort)
outerModel
- the outer TableModel.rowIndices
- the row index array on the outer TableModelsort
- true to sort the returned row indices. If false, the order will be the same as the order of the
rowIndices parameter.public static int[] getActualColumnsAt(TableModel outerModel, int[] columnIndices, boolean sort)
outerModel
- the outer TableModel.columnIndices
- the column index array on the outer TableModelsort
- true to sort the returned column indices. If false, the order will be the same as the order
of the columnIndices parameter.public static int[] getRowsAt(TableModel outerModel, int[] rowIndices, boolean sort)
outerModel
- the outer TableModel.rowIndices
- the row index array on the innermost TableModelsort
- true to sort the returned row indices. If false, the order will be the same as the order of the
rowIndices parameter.public static int[] getColumnsAt(TableModel outerModel, int[] columnIndices, boolean sort)
outerModel
- the outer TableModel.columnIndices
- the column index array of the innermost TableModelsort
- true to sort the returned column indices. If false, the order will be the same as the order
of the columnIndices parameter.@Deprecated public static int getVisibleChildrenCount(TableModel model, Row parent, boolean leafOnly, boolean countCollapsedNodes)
TreeTableUtils.getDescendantCount(javax.swing.table.TableModel,
Row, boolean, boolean)
TreeTableModel
to find the current visible children count. It has two options, leaf only or
count collapsed nodes.
It could hit performance since we have to expand all to count the actual leaf nodes then set the original
expansion state back.model
- the outer table modelparent
- the Row to be queriedleafOnly
- the count will only include leaf children or notcountCollapsedNodes
- if the collapsed nodes need to be counted@Deprecated public static int getVisibleChildrenCount(TableModel model, Row parent)
TreeTableUtils.getDescendantCount(javax.swing.table.TableModel,
Row, boolean, boolean)
TreeTableModel
to find the current visible children count.model
- the outer table modelparent
- the Row to be queried