Interface ColumnModel
- All Known Subinterfaces:
MutableColumnModel
- All Known Implementing Classes:
AbstractColumnModel,DefaultColumnModel
public interface ColumnModel
A
ColumnModel holds information about columns e.g. which columns are available, visible etc.-
Method Summary
Modifier and TypeMethodDescriptionvoidaddColumnModelListener(ColumnModelListener listener) Registerslistenerwith this column model.intfindColumn(ColumnDescriptor colDescr) Returns the index of the column represented bycolDescror-1</code if it is not available or hidden.getCellEditor(int columnIndex) Gets the cell editor.getCellRenderer(int columnIndex) Gets the cell renderer.getColumn(int columnIndex) Returns the column with indexcolumnIndex.Returns all columns (visible and hidden) held by this model.getColumnWidth(ColumnDescriptor colDescr) Gets the column width.getColumnWidth(ColumnDescriptor colDescr, Boolean returnDefault) Gets the column width.Returns all the columns which are currently marked as invisible.getHiddenLocalizedColumns(ColumnDescriptor colDescr) Gets the hidden localized columns.getLocalizedColumn(ColumnDescriptor colDescr, LanguageModel lang) Gets the localized column.Gets the menu popup builder which is responsible for building table header menu popups.getNewInlineItemRenderer(int columnIndex) Gets the new inline item renderer.getPropertyDescriptor(ColumnDescriptor colDescr) Gets the property descriptor.Returns the rootColumnGroupi.e.intReturns the index of the currently selected column.Returns the indexes of the currently selected columns.intReturns the index of the column by which values are currently sorted.getValueAt(int columnIndex, TypedObject object) Returns the value of the specified object's cell.getVisibleColumn(int columnIndex) Returns the visible column at positioncolumnIndex.Returns all the columns which are currently marked as visible.getVisibleLocalizedColumns(ColumnDescriptor colDescr) Gets the visible localized columns.booleanisColumnLocalized(ColumnDescriptor colDescr) Checks if is column localized.booleanisColumnSelected(int columnIndex) Returns whether the column with indexcolumnIndexis selected or not.booleanReturns the sort order of the column by which values are currently sorted.voidremoveColumnModelListener(ColumnModelListener listener) Unregisterslistenerwith this column model.
-
Method Details
-
addColumnModelListener
Registerslistenerwith this column model.- Parameters:
listener- theColumnModelListenerto register
-
findColumn
Returns the index of the column represented bycolDescror-1</code if it is not available or hidden.- Parameters:
colDescr- column which index should be retrieved- Returns:
- the zero based position index of the column with the specified name
-
getCellEditor
Gets the cell editor.- Parameters:
columnIndex- the column index- Returns:
- the cell editor
-
getCellRenderer
Gets the cell renderer.- Parameters:
columnIndex- the column index- Returns:
- the cell renderer
-
getColumn
Returns the column with indexcolumnIndex.- Parameters:
columnIndex- the zero based position index of column to be returned- Returns:
- the column at position
columnIndex - Throws:
IndexOutOfBoundsException- if there is no column with the specified index- See Also:
-
getColumns
List<ColumnDescriptor> getColumns()Returns all columns (visible and hidden) held by this model.- Returns:
- all the columns held by this model
-
getColumnWidth
Gets the column width.- Parameters:
colDescr- the col descr- Returns:
- the column width
-
getColumnWidth
Gets the column width.- Parameters:
colDescr- the col descrreturnDefault- the return default- Returns:
- the column width
-
getHiddenColumns
List<ColumnDescriptor> getHiddenColumns()Returns all the columns which are currently marked as invisible.- Returns:
- all the hidden columns
-
getHiddenLocalizedColumns
Gets the hidden localized columns.- Parameters:
colDescr- the col descr- Returns:
- the hidden localized columns
-
getLocalizedColumn
Gets the localized column.- Parameters:
colDescr- the col descrlang- the lang- Returns:
- the localized column
-
getMenuPopupBuilder
ListViewMenuPopupBuilder getMenuPopupBuilder()Gets the menu popup builder which is responsible for building table header menu popups.- Returns:
- the menu popup builder
-
getNewInlineItemRenderer
Gets the new inline item renderer.- Parameters:
columnIndex- the column index- Returns:
- the new inline item render
-
getPropertyDescriptor
Gets the property descriptor.- Parameters:
colDescr- the col descr- Returns:
- the property descriptor
-
getRootColumnGroup
ColumnGroup getRootColumnGroup()Returns the rootColumnGroupi.e. the column group which holds all other groups and columns, held by this model.- Returns:
- the root column group node held by this model
-
getSelectedIndex
int getSelectedIndex()Returns the index of the currently selected column.- Returns:
- zero based position index of the currently selected column
-
getSelectedIndexes
Returns the indexes of the currently selected columns.- Returns:
- a list containing zero based position indexes of the currently selected columns
-
getSortedByColumnIndex
int getSortedByColumnIndex()Returns the index of the column by which values are currently sorted.- Returns:
- zero based position index of the column by which values are currently sorted
- See Also:
-
getValueAt
Returns the value of the specified object's cell.- Parameters:
columnIndex- zero based column position index of the cell which value is to be returnedobject- the object which cell's value is to be returned- Returns:
- the value at
-
getVisibleColumn
Returns the visible column at positioncolumnIndex.- Parameters:
columnIndex- the zero based position index of the visible column to be returned- Returns:
- the visible column at position
columnIndex - Throws:
IndexOutOfBoundsException- if there is no column at the specified position- See Also:
-
getVisibleColumns
List<ColumnDescriptor> getVisibleColumns()Returns all the columns which are currently marked as visible.- Returns:
- all the visible columns
-
getVisibleLocalizedColumns
Gets the visible localized columns.- Parameters:
colDescr- the col descr- Returns:
- the visible localized columns
-
isColumnLocalized
Checks if is column localized.- Parameters:
colDescr- the col descr- Returns:
- true, if is column localized
-
isColumnSelected
boolean isColumnSelected(int columnIndex) Returns whether the column with indexcolumnIndexis selected or not.- Parameters:
columnIndex- zero based position index of the column which selection status is to be retrieved- Returns:
trueif a column at positioncolumnIndexexists and is marked as selected,falseotherwise
-
isSortAscending
boolean isSortAscending()Returns the sort order of the column by which values are currently sorted.- Returns:
trueif the sort order is ascending,falseotherwise- See Also:
-
removeColumnModelListener
Unregisterslistenerwith this column model.- Parameters:
listener- theColumnModelListenerto unregister
-