Class CmsDataViewColumn

java.lang.Object
org.opencms.widgets.dataview.CmsDataViewColumn

public class CmsDataViewColumn extends Object
This class represents the definition of a column for the table widget used to select data items provided by an I_CmsDataView implementation.

  • 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 type
      niceName - the user-readable name of the column
      sortable - true if the column should be sortable
      preferredWidth - the preferred width of the column
  • Method Details

    • getId

      public 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 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

      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