Package org.opencms.ui
Class CmsCssIcon
java.lang.Object
org.opencms.ui.CmsCssIcon
- All Implemented Interfaces:
com.vaadin.server.FontIcon
,com.vaadin.server.Resource
,Serializable
An icon resource. Will be rendered as <span class="v-icon styleName">&bnsp;</span>.
- See Also:
-
Constructor Summary
ConstructorDescriptionCmsCssIcon
(com.vaadin.server.FontIcon icon) Cloning constructor.CmsCssIcon
(String styleName) Constructor.CmsCssIcon
(String styleName, String additionalStyle) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionReturns the additional style name to use with OpenCms app buttons.int
getHtml()
Returns the icon HTML with the title attribute set.Gets the html for the icon.Returns the style name of this icon.boolean
Returns whether this icon has the additional button style set.void
setAdditionalButtonStyle
(String additionalStyle) Sets the additional style to apply to buttons generated with this icon.void
setOverlay
(String overlayStyle) Adds an overlay to icon.
-
Constructor Details
-
CmsCssIcon
Cloning constructor.- Parameters:
icon
- the icon to clone
-
CmsCssIcon
Constructor.- Parameters:
styleName
- the style name to assign to the icon.
-
CmsCssIcon
Constructor.- Parameters:
styleName
- the style name to assign to the icon.additionalStyle
- the additional style to apply to buttons generated with this icon
-
-
Method Details
-
getAdditionalButtonStyle
Returns the additional style name to use with OpenCms app buttons.- Returns:
- the additional style name
-
getCodepoint
- Specified by:
getCodepoint
in interfacecom.vaadin.server.FontIcon
- See Also:
-
FontIcon.getCodepoint()
-
getFontFamily
- Specified by:
getFontFamily
in interfacecom.vaadin.server.FontIcon
- See Also:
-
FontIcon.getFontFamily()
-
getHtml
- Specified by:
getHtml
in interfacecom.vaadin.server.FontIcon
- See Also:
-
FontIcon.getHtml()
-
getHtml
Returns the icon HTML with the title attribute set.- Parameters:
title
- the title to set- Returns:
- the icon HTML
-
getHtmlWithOverlay
Gets the html for the icon.If overlay is set, it will be shown.
- Returns:
- html
-
getMIMEType
- Specified by:
getMIMEType
in interfacecom.vaadin.server.Resource
- See Also:
-
Resource.getMIMEType()
-
getStyleName
Returns the style name of this icon.- Returns:
- the style name
-
hasAdditionalButtonStyle
Returns whether this icon has the additional button style set.- Returns:
true
in case the additional style is set
-
setAdditionalButtonStyle
Sets the additional style to apply to buttons generated with this icon.- Parameters:
additionalStyle
- the additional style to apply to buttons generated with this icon
-
setOverlay
Adds an overlay to icon. Overlay is only returned by getHtmlWithOverlay().- Parameters:
overlayStyle
- style to be added
-