public abstract class A_CmsHtmlIconButton extends java.lang.Object implements I_CmsHtmlIconButton
| Modifier and Type | Field and Description |
|---|---|
static CmsMessageContainer |
EMPTY_MESSAGE
Constant for an empty message.
|
protected java.lang.String |
m_id
unique id.
|
| Constructor and Description |
|---|
A_CmsHtmlIconButton(java.lang.String id)
Default Constructor.
|
A_CmsHtmlIconButton(java.lang.String id,
CmsMessageContainer name,
CmsMessageContainer helpText,
java.lang.String iconPath,
boolean enabled)
Full Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
defaultButtonHtml(CmsHtmlIconButtonStyleEnum style,
java.lang.String id,
java.lang.String name,
java.lang.String helpText,
boolean enabled,
java.lang.String iconPath,
java.lang.String confirmationMessage,
java.lang.String onClick)
Generates a default html code for icon buttons.
|
static java.lang.String |
defaultButtonHtml(CmsHtmlIconButtonStyleEnum style,
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,
java.lang.String rightHtml)
Generates a default html code where several buttons can have the same help text.
|
static java.lang.String |
defaultHelpHtml(java.lang.String helpId,
java.lang.String helpText)
Generates html for the helptext when having one helptext for several buttons.
|
CmsMessageContainer |
getHelpText()
Returns the help text.
|
java.lang.String |
getIconPath()
Returns the path to the icon.
|
java.lang.String |
getId()
Returns the id of the html component.
|
CmsMessageContainer |
getName()
Returns the display name.
|
boolean |
isEnabled()
Returns if enabled or disabled.
|
boolean |
isVisible()
Returns if visible or not.
|
void |
setEnabled(boolean enabled)
Sets if enabled or disabled.
|
void |
setHelpText(CmsMessageContainer helpText)
Sets the help Text.
|
void |
setIconPath(java.lang.String iconPath)
Sets the icon Path.
|
void |
setName(CmsMessageContainer name)
Sets the name.
|
void |
setVisible(boolean visible)
Sets if visible or not.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitbuttonHtmlpublic static final CmsMessageContainer EMPTY_MESSAGE
protected java.lang.String m_id
public A_CmsHtmlIconButton(java.lang.String id)
id - the idpublic A_CmsHtmlIconButton(java.lang.String id, CmsMessageContainer name, CmsMessageContainer helpText, java.lang.String iconPath, boolean enabled)
id - the idname - the namehelpText - the help texticonPath - the path to the iconenabled - if enabled or notpublic static java.lang.String defaultButtonHtml(CmsHtmlIconButtonStyleEnum style, java.lang.String id, java.lang.String name, java.lang.String helpText, boolean enabled, java.lang.String iconPath, java.lang.String confirmationMessage, java.lang.String onClick)
style - the style of the buttonid - the idname - the namehelpText - the help textenabled - if enabled or noticonPath - the path to the iconconfirmationMessage - the optional confirmation messageonClick - the js code to executepublic static java.lang.String defaultButtonHtml(CmsHtmlIconButtonStyleEnum style, 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, java.lang.String rightHtml)
style - the style of the buttonid - the idhelpId - the id of the helptext div tagname - the name, if empty only the icon is displayedhelpText - the help text, if empty no mouse events are generatedenabled - if enabled or not, if not set be sure to take an according helptexticonPath - the path to the icon, if empty only the name is displayedconfirmationMessage - the confirmation messageonClick - the js code to execute, if empty no link is generatedsingleHelp - if set, no helptext is written, you have to use the defaultHelpHtml() method laterrightHtml - optional html code that should come direct after the buttonpublic static java.lang.String defaultHelpHtml(java.lang.String helpId, java.lang.String helpText)
helpId - the id of the help texthelpText - the help textpublic CmsMessageContainer getHelpText()
I_CmsHtmlIconButtongetHelpText in interface I_CmsHtmlIconButtonI_CmsHtmlIconButton.getHelpText()public java.lang.String getIconPath()
I_CmsHtmlIconButtongetIconPath in interface I_CmsHtmlIconButtonI_CmsHtmlIconButton.getIconPath()public java.lang.String getId()
I_CmsHtmlIconButtongetId in interface I_CmsHtmlIconButtonI_CmsHtmlIconButton.getId()public CmsMessageContainer getName()
I_CmsHtmlIconButtongetName in interface I_CmsHtmlIconButtonI_CmsHtmlIconButton.getName()public boolean isEnabled()
I_CmsHtmlIconButtonisEnabled in interface I_CmsHtmlIconButtonI_CmsHtmlIconButton.isEnabled()public boolean isVisible()
I_CmsHtmlIconButtonisVisible in interface I_CmsHtmlIconButtonI_CmsHtmlIconButton.isVisible()public void setEnabled(boolean enabled)
I_CmsHtmlIconButtonsetEnabled in interface I_CmsHtmlIconButtonenabled - if enabled or disabledI_CmsHtmlIconButton.setEnabled(boolean)public void setHelpText(CmsMessageContainer helpText)
I_CmsHtmlIconButtonsetHelpText in interface I_CmsHtmlIconButtonhelpText - the help Text to setI_CmsHtmlIconButton.setHelpText(org.opencms.i18n.CmsMessageContainer)public void setIconPath(java.lang.String iconPath)
I_CmsHtmlIconButtonsetIconPath in interface I_CmsHtmlIconButtoniconPath - the icon Path to setI_CmsHtmlIconButton.setIconPath(java.lang.String)public void setName(CmsMessageContainer name)
I_CmsHtmlIconButtonsetName in interface I_CmsHtmlIconButtonname - the name to setI_CmsHtmlIconButton.setName(org.opencms.i18n.CmsMessageContainer)public void setVisible(boolean visible)
I_CmsHtmlIconButtonsetVisible in interface I_CmsHtmlIconButtonvisible - if visible or notI_CmsHtmlIconButton.setVisible(boolean)