Package org.opencms.widgets.dataview
Class CmsDataViewColumn
- java.lang.Object
-
- org.opencms.widgets.dataview.CmsDataViewColumn
-
public class CmsDataViewColumn extends java.lang.Object
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
Nested Classes Modifier and Type Class Description static class
CmsDataViewColumn.Type
The column type.
-
Constructor Summary
Constructors Constructor Description CmsDataViewColumn(java.lang.String id, CmsDataViewColumn.Type type, java.lang.String niceName, boolean sortable, int preferredWidth)
Creates a new column definition.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getId()
Gets the column id.java.lang.String
getNiceName()
Gets the 'nice name' to display for this column in the table header.int
getPreferredWidth()
Gets the preferred width of the column in pixels.CmsDataViewColumn.Type
getType()
Gets the column type.boolean
isSortable()
Returns true if this column should be sortable.
-
-
-
Constructor Detail
-
CmsDataViewColumn
public CmsDataViewColumn(java.lang.String id, CmsDataViewColumn.Type type, java.lang.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 Detail
-
getId
public java.lang.String 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
public java.lang.String getNiceName()
Gets the 'nice name' to display for this column in the table header.- Returns:
- the nice name
-
getPreferredWidth
public int getPreferredWidth()
Gets the preferred width of the column in pixels.- Returns:
- the preferred width
-
getType
public CmsDataViewColumn.Type getType()
Gets the column type.- Returns:
- the column type
-
isSortable
public boolean isSortable()
Returns true if this column should be sortable.- Returns:
- true if the column should be sortable
-
-