Interface ColumnModel
-
- All Known Subinterfaces:
MutableColumnModel
- All Known Implementing Classes:
AbstractColumnModel
,DefaultColumnModel
public interface ColumnModel
AColumnModel
holds information about columns e.g. which columns are available, visible etc.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addColumnModelListener(ColumnModelListener listener)
Registerslistener
with this column model.int
findColumn(ColumnDescriptor colDescr)
Returns the index of the column represented bycolDescr
or-1
UIEditor
getCellEditor(int columnIndex)
Gets the cell editor.CellRenderer
getCellRenderer(int columnIndex)
Gets the cell renderer.ColumnDescriptor
getColumn(int columnIndex)
Returns the column with indexcolumnIndex
.java.util.List<ColumnDescriptor>
getColumns()
Returns all columns (visible and hidden) held by this model.java.lang.String
getColumnWidth(ColumnDescriptor colDescr)
Gets the column width.java.lang.String
getColumnWidth(ColumnDescriptor colDescr, java.lang.Boolean returnDefault)
Gets the column width.java.util.List<ColumnDescriptor>
getHiddenColumns()
Returns all the columns which are currently marked as invisible.java.util.List<ColumnDescriptor>
getHiddenLocalizedColumns(ColumnDescriptor colDescr)
Gets the hidden localized columns.ColumnDescriptor
getLocalizedColumn(ColumnDescriptor colDescr, LanguageModel lang)
Gets the localized column.ListViewMenuPopupBuilder
getMenuPopupBuilder()
Gets the menu popup builder which is responsible for building table header menu popups.CellRenderer
getNewInlineItemRenderer(int columnIndex)
Gets the new inline item renderer.PropertyDescriptor
getPropertyDescriptor(ColumnDescriptor colDescr)
Gets the property descriptor.ColumnGroup
getRootColumnGroup()
Returns the rootColumnGroup
i.e.int
getSelectedIndex()
Returns the index of the currently selected column.java.util.List<java.lang.Integer>
getSelectedIndexes()
Returns the indexes of the currently selected columns.int
getSortedByColumnIndex()
Returns the index of the column by which values are currently sorted.java.lang.Object
getValueAt(int columnIndex, TypedObject object)
Returns the value of the specified object's cell.ColumnDescriptor
getVisibleColumn(int columnIndex)
Returns the visible column at positioncolumnIndex
.java.util.List<ColumnDescriptor>
getVisibleColumns()
Returns all the columns which are currently marked as visible.java.util.List<ColumnDescriptor>
getVisibleLocalizedColumns(ColumnDescriptor colDescr)
Gets the visible localized columns.boolean
isColumnLocalized(ColumnDescriptor colDescr)
Checks if is column localized.boolean
isColumnSelected(int columnIndex)
Returns whether the column with indexcolumnIndex
is selected or not.boolean
isSortAscending()
Returns the sort order of the column by which values are currently sorted.void
removeColumnModelListener(ColumnModelListener listener)
Unregisterslistener
with this column model.
-
-
-
Method Detail
-
addColumnModelListener
void addColumnModelListener(ColumnModelListener listener)
Registerslistener
with this column model.- Parameters:
listener
- theColumnModelListener
to register
-
findColumn
int findColumn(ColumnDescriptor colDescr)
Returns the index of the column represented bycolDescr
or-1
- Parameters:
colDescr
- column which index should be retrieved- Returns:
- the zero based position index of the column with the specified name
-
getCellEditor
UIEditor getCellEditor(int columnIndex)
Gets the cell editor.- Parameters:
columnIndex
- the column index- Returns:
- the cell editor
-
getCellRenderer
CellRenderer getCellRenderer(int columnIndex)
Gets the cell renderer.- Parameters:
columnIndex
- the column index- Returns:
- the cell renderer
-
getColumn
ColumnDescriptor getColumn(int columnIndex) throws java.lang.IndexOutOfBoundsException
Returns the column with indexcolumnIndex
.- Parameters:
columnIndex
- the zero based position index of column to be returned- Returns:
- the column at position
columnIndex
- Throws:
java.lang.IndexOutOfBoundsException
- if there is no column with the specified index- See Also:
getVisibleColumn(int)
-
getColumns
java.util.List<ColumnDescriptor> getColumns()
Returns all columns (visible and hidden) held by this model.- Returns:
- all the columns held by this model
-
getColumnWidth
java.lang.String getColumnWidth(ColumnDescriptor colDescr)
Gets the column width.- Parameters:
colDescr
- the col descr- Returns:
- the column width
-
getColumnWidth
java.lang.String getColumnWidth(ColumnDescriptor colDescr, java.lang.Boolean returnDefault)
Gets the column width.- Parameters:
colDescr
- the col descrreturnDefault
- the return default- Returns:
- the column width
-
getHiddenColumns
java.util.List<ColumnDescriptor> getHiddenColumns()
Returns all the columns which are currently marked as invisible.- Returns:
- all the hidden columns
-
getHiddenLocalizedColumns
java.util.List<ColumnDescriptor> getHiddenLocalizedColumns(ColumnDescriptor colDescr)
Gets the hidden localized columns.- Parameters:
colDescr
- the col descr- Returns:
- the hidden localized columns
-
getLocalizedColumn
ColumnDescriptor getLocalizedColumn(ColumnDescriptor colDescr, LanguageModel lang)
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
CellRenderer getNewInlineItemRenderer(int columnIndex)
Gets the new inline item renderer.- Parameters:
columnIndex
- the column index- Returns:
- the new inline item render
-
getPropertyDescriptor
PropertyDescriptor getPropertyDescriptor(ColumnDescriptor colDescr)
Gets the property descriptor.- Parameters:
colDescr
- the col descr- Returns:
- the property descriptor
-
getRootColumnGroup
ColumnGroup getRootColumnGroup()
Returns the rootColumnGroup
i.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
java.util.List<java.lang.Integer> 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:
isSortAscending()
-
getValueAt
java.lang.Object getValueAt(int columnIndex, TypedObject object)
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
ColumnDescriptor getVisibleColumn(int columnIndex) throws java.lang.IndexOutOfBoundsException
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:
java.lang.IndexOutOfBoundsException
- if there is no column at the specified position- See Also:
getColumn(int)
-
getVisibleColumns
java.util.List<ColumnDescriptor> getVisibleColumns()
Returns all the columns which are currently marked as visible.- Returns:
- all the visible columns
-
getVisibleLocalizedColumns
java.util.List<ColumnDescriptor> getVisibleLocalizedColumns(ColumnDescriptor colDescr)
Gets the visible localized columns.- Parameters:
colDescr
- the col descr- Returns:
- the visible localized columns
-
isColumnLocalized
boolean isColumnLocalized(ColumnDescriptor colDescr)
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 indexcolumnIndex
is selected or not.- Parameters:
columnIndex
- zero based position index of the column which selection status is to be retrieved- Returns:
true
if a column at positioncolumnIndex
exists and is marked as selected,false
otherwise
-
isSortAscending
boolean isSortAscending()
Returns the sort order of the column by which values are currently sorted.- Returns:
true
if the sort order is ascending,false
otherwise- See Also:
getSortedByColumnIndex()
-
removeColumnModelListener
void removeColumnModelListener(ColumnModelListener listener)
Unregisterslistener
with this column model.- Parameters:
listener
- theColumnModelListener
to unregister
-
-