Interface MixedRowTableModel
-
- All Superinterfaces:
ColumnIdentifier
,javax.swing.table.TableModel
- All Known Implementing Classes:
BufferedHeaderDetailTableModel
,HeaderDetailTableModel
public interface MixedRowTableModel extends javax.swing.table.TableModel, ColumnIdentifier
This interface defines the data model API for aMixedRowTable
. The rows are arranged in groups. Each group contains one or more sub-rows in any combination of sub-row types. All sub-row types must have the same number of columns.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.Class<?>
getCellClass(int rowIndex, int columnIndex)
java.lang.Class<?>
getColumnClass(int typeIndex, int columnIndex)
java.lang.Object
getColumnIdentifier(int typeIndex, int columnIndex)
java.lang.String
getColumnName(int typeIndex, int columnIndex)
int
getGroupNumber(int rowIndex)
int
getLeadRowForGroup(int groupNumber)
int
getRowCount(int groupNumber)
int
getRowTypeCount()
int
getRowTypeIndex(int rowIndex)
int
getSubRowIndex(int rowIndex)
-
Methods inherited from interface io.github.jonestimd.swing.table.model.ColumnIdentifier
getColumnIdentifier
-
-
-
-
Method Detail
-
getRowTypeCount
int getRowTypeCount()
- Returns:
- thw number of row types defined by this model.
-
getGroupNumber
int getGroupNumber(int rowIndex)
- Parameters:
rowIndex
- the index of the row.- Returns:
- the index of the group containing the row.
-
getLeadRowForGroup
int getLeadRowForGroup(int groupNumber)
- Parameters:
groupNumber
- the index of the group.- Returns:
- the index of the first row of the group.
-
getRowCount
int getRowCount(int groupNumber)
- Parameters:
groupNumber
- the group index.- Returns:
- the number of rows in the group.
-
getSubRowIndex
int getSubRowIndex(int rowIndex)
- Parameters:
rowIndex
- the index of the row.- Returns:
- the index of the row within its group.
-
getRowTypeIndex
int getRowTypeIndex(int rowIndex)
- Parameters:
rowIndex
- index of the row.- Returns:
- the type index of the row.
-
getColumnClass
java.lang.Class<?> getColumnClass(int typeIndex, int columnIndex)
- Parameters:
typeIndex
- the row type index.columnIndex
- the column index.- Returns:
- the
Class
of the column value.
-
getColumnName
java.lang.String getColumnName(int typeIndex, int columnIndex)
- Parameters:
typeIndex
- the row type index.columnIndex
- the column index.- Returns:
- the header text for the column.
-
getColumnIdentifier
java.lang.Object getColumnIdentifier(int typeIndex, int columnIndex)
- Parameters:
typeIndex
- the row type index.columnIndex
- the column index.- Returns:
- the
TableColumn
identifier of the column.
-
getCellClass
java.lang.Class<?> getCellClass(int rowIndex, int columnIndex)
- Parameters:
rowIndex
- the index of the row.columnIndex
- the index of the column.- Returns:
- the
Class
of the cell value.
-
-