org.opencms.workplace.list
Class A_CmsListToggleAction

java.lang.Object
  extended byorg.opencms.workplace.tools.A_CmsHtmlIconButton
      extended byorg.opencms.workplace.list.A_CmsListAction
          extended byorg.opencms.workplace.list.CmsListDirectAction
              extended byorg.opencms.workplace.list.A_CmsListToggleAction
All Implemented Interfaces:
I_CmsHtmlIconButton, I_CmsListAction, I_CmsListDirectAction
Direct Known Subclasses:
A_CmsListTwoStatesAction

public abstract class A_CmsListToggleAction
extends CmsListDirectAction

Abstract implementation of a toggle action for a html list.

You have to extend this class and implement the selectAction() method.

Since:
6.0.0
Version:
$Revision: 1.9 $
Author:
Michael Moossen

Field Summary
 
Fields inherited from class org.opencms.workplace.tools.A_CmsHtmlIconButton
EMPTY_MESSAGE, m_id
 
Constructor Summary
protected A_CmsListToggleAction(String id)
          Default Constructor.
 
Method Summary
 String getColumn()
          Returns the id of the column to use as parameter for the helptext and confirmation message.
 CmsMessageContainer getConfirmationMessage()
          Returns an optional confirmation message for the action.
 CmsMessageContainer getHelpText()
          Returns the help text.
 String getIconPath()
          Returns the path to the icon.
 String getId()
          Returns the id of the html component.
 CmsMessageContainer getName()
          Returns the display name.
 boolean isEnabled()
          Returns if enabled or disabled.
abstract  I_CmsListDirectAction selectAction()
          Selects and sets the current action.
 
Methods inherited from class org.opencms.workplace.list.CmsListDirectAction
buttonHtml, confirmationTextHtml, getItem, helpTextHtml, setColumn, setItem
 
Methods inherited from class org.opencms.workplace.list.A_CmsListAction
defaultConfirmationHtml, getListId, setConfirmationMessage, setListId
 
Methods inherited from class org.opencms.workplace.tools.A_CmsHtmlIconButton
defaultButtonHtml, defaultButtonHtml, defaultHelpHtml, setEnabled, setHelpText, setIconPath, setName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.opencms.workplace.list.I_CmsListAction
getListId, setConfirmationMessage, setListId
 
Methods inherited from interface org.opencms.workplace.tools.I_CmsHtmlIconButton
setEnabled, setHelpText, setIconPath, setName
 

Constructor Detail

A_CmsListToggleAction

protected A_CmsListToggleAction(String id)
Default Constructor.

Parameters:
id - unique id
Method Detail

getColumn

public String getColumn()
Description copied from interface: I_CmsListDirectAction
Returns the id of the column to use as parameter for the helptext and confirmation message.

Specified by:
getColumn in interface I_CmsListDirectAction
Overrides:
getColumn in class CmsListDirectAction
See Also:
CmsListDirectAction.getColumn()

getConfirmationMessage

public CmsMessageContainer getConfirmationMessage()
Description copied from interface: I_CmsListAction
Returns an optional confirmation message for the action.

It will be escaped for usage in java script code.

Specified by:
getConfirmationMessage in interface I_CmsListAction
Overrides:
getConfirmationMessage in class A_CmsListAction
See Also:
A_CmsListAction.getConfirmationMessage()

getHelpText

public CmsMessageContainer getHelpText()
Description copied from interface: I_CmsHtmlIconButton
Returns the help text.

Specified by:
getHelpText in interface I_CmsHtmlIconButton
Overrides:
getHelpText in class A_CmsHtmlIconButton
See Also:
I_CmsHtmlIconButton.getHelpText()

getIconPath

public String getIconPath()
Description copied from interface: I_CmsHtmlIconButton
Returns the path to the icon.

Specified by:
getIconPath in interface I_CmsHtmlIconButton
Overrides:
getIconPath in class A_CmsHtmlIconButton
See Also:
I_CmsHtmlIconButton.getIconPath()

getId

public String getId()
Description copied from interface: I_CmsHtmlIconButton
Returns the id of the html component.

Specified by:
getId in interface I_CmsHtmlIconButton
Overrides:
getId in class A_CmsHtmlIconButton
See Also:
A_CmsHtmlIconButton.getId()

getName

public CmsMessageContainer getName()
Description copied from interface: I_CmsHtmlIconButton
Returns the display name.

Specified by:
getName in interface I_CmsHtmlIconButton
Overrides:
getName in class A_CmsHtmlIconButton
See Also:
I_CmsHtmlIconButton.getName()

isEnabled

public boolean isEnabled()
Description copied from interface: I_CmsHtmlIconButton
Returns if enabled or disabled.

Specified by:
isEnabled in interface I_CmsHtmlIconButton
Overrides:
isEnabled in class A_CmsHtmlIconButton
See Also:
A_CmsHtmlIconButton.isEnabled()

selectAction

public abstract I_CmsListDirectAction selectAction()
Selects and sets the current action.

Returns:
the selected action