Package org.opencms.workplace.list
Class CmsListColumnDefinition
- java.lang.Object
-
- org.opencms.workplace.list.CmsListColumnDefinition
-
- Direct Known Subclasses:
CmsListExplorerColumn
,CmsListItemDetails
,CmsListResourceLinkRelationExplorerColumn
public class CmsListColumnDefinition extends java.lang.Object
Html list column definition.- Since:
- 6.0.0
-
-
Constructor Summary
Constructors Constructor Description CmsListColumnDefinition(java.lang.String id)
Default Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addDefaultAction(CmsListDefaultAction defaultAction)
Adds a default Action.void
addDirectAction(I_CmsListDirectAction listAction)
Adds a new action to the column.java.lang.String
csvCell(CmsListItem item)
returns the csv output for a cell.java.lang.String
csvHeader()
Returns the csv output for a column header.CmsListColumnAlignEnum
getAlign()
Returns the align.CmsListDefaultAction
getDefaultAction(java.lang.String actionId)
Returns a default action by id.java.util.List<java.lang.String>
getDefaultActionIds()
Returns the default Action Ids list.java.util.List<CmsListDefaultAction>
getDefaultActions()
Returns the default Actions list.I_CmsListDirectAction
getDirectAction(java.lang.String actionId)
Returns a direct action by id.java.util.List<java.lang.String>
getDirectActionIds()
Returns the direct Action Ids list.java.util.List<I_CmsListDirectAction>
getDirectActions()
Returns all direct actions.I_CmsListFormatter
getFormatter()
Returns the data formatter.org.opencms.i18n.CmsMessageContainer
getHelpText()
Returns the customized help Text.java.lang.String
getId()
Returns the id.I_CmsListItemComparator
getListItemComparator()
Returns the comparator, used for sorting.org.opencms.i18n.CmsMessageContainer
getName()
Returns the name.java.lang.String
getWidth()
Returns the width.A_CmsListDialog
getWp()
Returns the workplace dialog object.java.lang.String
htmlCell(CmsListItem item, boolean isPrintable)
returns the html for a cell.java.lang.String
htmlHeader(CmsHtmlList list)
Returns the html code for a column header.boolean
isPrintable()
Returns the printable .boolean
isSorteable()
Returns the sorteable.boolean
isTextWrapping()
Returns the text Wrapping flag.boolean
isVisible()
Returns the visible.CmsListDefaultAction
removeDefaultAction(java.lang.String actionId)
Removes the default action from this column by id.I_CmsListDirectAction
removeDirectAction(java.lang.String actionId)
Removes a direct action from this column by id.void
setAlign(CmsListColumnAlignEnum align)
Sets the align.void
setFormatter(I_CmsListFormatter formatter)
Sets the data formatter.void
setHelpText(org.opencms.i18n.CmsMessageContainer helpText)
Sets the customized help Text.void
setListItemComparator(I_CmsListItemComparator comparator)
Sets the comparator, used for sorting.void
setName(org.opencms.i18n.CmsMessageContainer name)
Sets the name.void
setPrintable(boolean printable)
Sets the printable flag.void
setSorteable(boolean sorteable)
Indicates if the current column is sorteable or not.void
setTextWrapping(boolean textWrapping)
Sets the text Wrapping flag.void
setVisible(boolean visible)
Sets the visible.void
setWidth(java.lang.String width)
Sets the width.void
setWp(A_CmsListDialog wp)
Sets the workplace dialog object.
-
-
-
Field Detail
-
ICON_DOWN
public static final java.lang.String ICON_DOWN
Standard list button location.- See Also:
- Constant Field Values
-
ICON_UP
public static final java.lang.String ICON_UP
Standard list button location.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CmsListColumnDefinition
public CmsListColumnDefinition(java.lang.String id)
Default Constructor.- Parameters:
id
- the unique id
-
-
Method Detail
-
addDefaultAction
public void addDefaultAction(CmsListDefaultAction defaultAction)
Adds a default Action.A column could have more than one default action if the visibilities are complementary.
- Parameters:
defaultAction
- the default Action to add
-
addDirectAction
public void addDirectAction(I_CmsListDirectAction listAction)
Adds a new action to the column.- Parameters:
listAction
- the action to add
-
csvCell
public java.lang.String csvCell(CmsListItem item)
returns the csv output for a cell.- Parameters:
item
- the item to render the cell for- Returns:
- csv output
-
csvHeader
public java.lang.String csvHeader()
Returns the csv output for a column header.- Returns:
- csv header
-
getAlign
public CmsListColumnAlignEnum getAlign()
Returns the align.- Returns:
- the align
-
getDefaultAction
public CmsListDefaultAction getDefaultAction(java.lang.String actionId)
Returns a default action by id.- Parameters:
actionId
- the id of the action- Returns:
- the action if found or null
-
getDefaultActionIds
public java.util.List<java.lang.String> getDefaultActionIds()
Returns the default Action Ids list.- Returns:
- the default Action Ids list
-
getDefaultActions
public java.util.List<CmsListDefaultAction> getDefaultActions()
Returns the default Actions list.- Returns:
- a list of
CmsListDefaultAction
objects
-
getDirectAction
public I_CmsListDirectAction getDirectAction(java.lang.String actionId)
Returns a direct action by id.- Parameters:
actionId
- the id of the action- Returns:
- the action if found or null
-
getDirectActionIds
public java.util.List<java.lang.String> getDirectActionIds()
Returns the direct Action Ids list.- Returns:
- the direct Action Ids list
-
getDirectActions
public java.util.List<I_CmsListDirectAction> getDirectActions()
Returns all direct actions.- Returns:
- a list of
s.I_CmsListDirectAction
-
getFormatter
public I_CmsListFormatter getFormatter()
Returns the data formatter.- Returns:
- the data formatter
-
getHelpText
public org.opencms.i18n.CmsMessageContainer getHelpText()
Returns the customized help Text.if
null
a default help text indicating the sort actions is used.- Returns:
- the customized help Text
-
getId
public java.lang.String getId()
Returns the id.- Returns:
- the id
-
getListItemComparator
public I_CmsListItemComparator getListItemComparator()
Returns the comparator, used for sorting.if no comparator was set, the default list item comparator is used.
- Returns:
- the comparator
- See Also:
CmsListItemDefaultComparator
-
getName
public org.opencms.i18n.CmsMessageContainer getName()
Returns the name.- Returns:
- the name
-
getWidth
public java.lang.String getWidth()
Returns the width.- Returns:
- the width
-
getWp
public A_CmsListDialog getWp()
Returns the workplace dialog object.- Returns:
- the workplace dialog object
-
htmlCell
public java.lang.String htmlCell(CmsListItem item, boolean isPrintable)
returns the html for a cell.- Parameters:
item
- the item to render the cell forisPrintable
- if the list is to be printed- Returns:
- html code
-
htmlHeader
public java.lang.String htmlHeader(CmsHtmlList list)
Returns the html code for a column header.- Parameters:
list
- the list to generate the header code for- Returns:
- html code
-
isPrintable
public boolean isPrintable()
Returns the printable .- Returns:
- the printable flag
-
isSorteable
public boolean isSorteable()
Returns the sorteable.- Returns:
- the sorteable
-
isTextWrapping
public boolean isTextWrapping()
Returns the text Wrapping flag.- Returns:
- the text Wrapping flag
-
isVisible
public boolean isVisible()
Returns the visible.- Returns:
- the visible
-
removeDefaultAction
public CmsListDefaultAction removeDefaultAction(java.lang.String actionId)
Removes the default action from this column by id.- Parameters:
actionId
- the id of the action to remove- Returns:
- the action if found or
null
-
removeDirectAction
public I_CmsListDirectAction removeDirectAction(java.lang.String actionId)
Removes a direct action from this column by id.- Parameters:
actionId
- the id of the action to remove- Returns:
- the action if found or
null
-
setAlign
public void setAlign(CmsListColumnAlignEnum align)
Sets the align.- Parameters:
align
- the align to set
-
setFormatter
public void setFormatter(I_CmsListFormatter formatter)
Sets the data formatter.- Parameters:
formatter
- the data formatter to set
-
setHelpText
public void setHelpText(org.opencms.i18n.CmsMessageContainer helpText)
Sets the customized help Text.if
null
a default help text indicating the sort actions is used.- Parameters:
helpText
- the customized help Text to set
-
setListItemComparator
public void setListItemComparator(I_CmsListItemComparator comparator)
Sets the comparator, used for sorting.- Parameters:
comparator
- the comparator to set
-
setName
public void setName(org.opencms.i18n.CmsMessageContainer name)
Sets the name.- Parameters:
name
- the name to set
-
setPrintable
public void setPrintable(boolean printable)
Sets the printable flag.- Parameters:
printable
- the printable flag to set
-
setSorteable
public void setSorteable(boolean sorteable)
Indicates if the current column is sorteable or not.if
true
a default list item comparator is used.if
false
any previously set list item comparator is removed.- Parameters:
sorteable
- the sorteable flag
-
setTextWrapping
public void setTextWrapping(boolean textWrapping)
Sets the text Wrapping flag.- Parameters:
textWrapping
- the text Wrapping flag to set
-
setVisible
public void setVisible(boolean visible)
Sets the visible.This will set also the printable flag to
false
.- Parameters:
visible
- the visible to set
-
setWidth
public void setWidth(java.lang.String width)
Sets the width.- Parameters:
width
- the width to set
-
setWp
public void setWp(A_CmsListDialog wp)
Sets the workplace dialog object.- Parameters:
wp
- the workplace dialog object to set
-
-