Package org.opencms.widgets.dataview
Class CmsDataViewColumn
java.lang.Object
org.opencms.widgets.dataview.CmsDataViewColumn
This class represents the definition of a column for the table widget used to select data items provided by an I_CmsDataView implementation.
-
Nested Class Summary
-
Constructor Summary
ConstructorDescriptionCmsDataViewColumn
(String id, CmsDataViewColumn.Type type, String niceName, boolean sortable, int preferredWidth) Creates a new column definition. -
Method Summary
-
Constructor Details
-
CmsDataViewColumn
public CmsDataViewColumn(String id, CmsDataViewColumn.Type type, String niceName, boolean sortable, int preferredWidth) Creates a new column definition.- Parameters:
id
- the column id (should be unique among the list of columns for an I_CmsDataView implementation)type
- the column typeniceName
- the user-readable name of the columnsortable
- true if the column should be sortablepreferredWidth
- the preferred width of the column
-
-
Method Details
-
getId
Gets the column id.The column id is not directly shown to the user; it is used as an internal identifier for the column and should be unique.
- Returns:
- the column id
-
getNiceName
Gets the 'nice name' to display for this column in the table header.- Returns:
- the nice name
-
getPreferredWidth
Gets the preferred width of the column in pixels.- Returns:
- the preferred width
-
getType
Gets the column type.- Returns:
- the column type
-
isSortable
Returns true if this column should be sortable.- Returns:
- true if the column should be sortable
-