org.opencms.workplace.list
Class CmsListResourceIconAction

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.CmsListResourceIconAction
All Implemented Interfaces:
I_CmsHtmlIconButton, I_CmsListAction, I_CmsListDirectAction

public class CmsListResourceIconAction
extends CmsListDirectAction

Displays an icon action for dependency lists.

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

Field Summary
 
Fields inherited from class org.opencms.workplace.tools.A_CmsHtmlIconButton
EMPTY_MESSAGE, m_id
 
Constructor Summary
CmsListResourceIconAction(java.lang.String id, java.lang.String resColumnTypeId, CmsObject cms)
          Default Constructor.
 
Method Summary
 java.lang.String buttonHtml(CmsWorkplace wp)
          Returns the necessary html code.
protected  java.lang.String defButtonHtml(CmsJspActionElement jsp, java.lang.String id, java.lang.String helpId, java.lang.String name, java.lang.String helpText, boolean enabled, java.lang.String iconPath, java.lang.String confirmationMessage, java.lang.String onClick, boolean singleHelp)
          Generates a default html code where several buttons can have the same help text.
 CmsObject getCms()
          Returns the cms context.
 java.lang.String getIconPath()
          Returns the path to the icon.
 
Methods inherited from class org.opencms.workplace.list.CmsListDirectAction
confirmationTextHtml, getColumnForTexts, getItem, helpTextHtml, resolveButtonStyle, resolveHelpText, resolveName, resolveOnClic, setColumnForTexts, setItem
 
Methods inherited from class org.opencms.workplace.list.A_CmsListAction
defaultConfirmationHtml, getConfirmationMessage, getListId, setConfirmationMessage, setListId
 
Methods inherited from class org.opencms.workplace.tools.A_CmsHtmlIconButton
defaultButtonHtml, defaultButtonHtml, defaultHelpHtml, getHelpText, getId, getName, isEnabled, isVisible, setEnabled, setHelpText, setIconPath, setName, setVisible
 
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
getConfirmationMessage, getListId, setConfirmationMessage, setListId
 
Methods inherited from interface org.opencms.workplace.tools.I_CmsHtmlIconButton
getHelpText, getId, getName, isEnabled, isVisible, setEnabled, setHelpText, setIconPath, setName, setVisible
 

Constructor Detail

CmsListResourceIconAction

public CmsListResourceIconAction(java.lang.String id,
                                 java.lang.String resColumnTypeId,
                                 CmsObject cms)
Default Constructor.

Parameters:
id - the unique id
resColumnTypeId - the id of the column with the resource type
cms - the cms context
Method Detail

buttonHtml

public java.lang.String buttonHtml(CmsWorkplace wp)
Description copied from interface: I_CmsHtmlIconButton
Returns the necessary html code.

Specified by:
buttonHtml in interface I_CmsHtmlIconButton
Overrides:
buttonHtml in class CmsListDirectAction
See Also:
CmsListDirectAction.buttonHtml(org.opencms.workplace.CmsWorkplace)

getCms

public CmsObject getCms()
Returns the cms context.

Returns:
the cms context

getIconPath

public java.lang.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:
A_CmsHtmlIconButton.getIconPath()

defButtonHtml

protected java.lang.String defButtonHtml(CmsJspActionElement jsp,
                                         java.lang.String id,
                                         java.lang.String helpId,
                                         java.lang.String name,
                                         java.lang.String helpText,
                                         boolean enabled,
                                         java.lang.String iconPath,
                                         java.lang.String confirmationMessage,
                                         java.lang.String onClick,
                                         boolean singleHelp)
Generates a default html code where several buttons can have the same help text.

the only diff to A_CmsHtmlIconButton.defaultButtonHtml(CmsJspActionElement, org.opencms.workplace.tools.CmsHtmlIconButtonStyleEnum, String, String, String, boolean, String, String, String) is that the icons are 16x16.

Parameters:
jsp - the cms context, can be null
id - the id
helpId - the id of the helptext div tag
name - the name, if empty only the icon is displayed
helpText - the help text, if empty no mouse events are generated
enabled - if enabled or not, if not set be sure to take an according helptext
iconPath - the path to the icon, if empty only the name is displayed
onClick - the js code to execute, if empty no link is generated
confirmationMessage - the confirmation message
singleHelp - if set, no helptext is written, you have to use the defaultHelpHtml() method later
Returns:
html code
See Also:
A_CmsHtmlIconButton.defaultButtonHtml(CmsJspActionElement, org.opencms.workplace.tools.CmsHtmlIconButtonStyleEnum, String, String, String, boolean, String, String, String)