Package org.ametys.plugins.core.ui.glyph
Class CssFontHelper
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.plugins.core.ui.glyph.CssFontHelper
- All Implemented Interfaces:
LogEnabled
,Component
,Serviceable
Helper for parsing of CSS file and extract glyphs
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetFontClassNames
(CSSStyleSheet styleSheet) Get CSS class name to use for all icons.getGlyphClassNames
(String cssURI, String prefix) Get the CSS class names for glyphesboolean
hasFontFaceRule
(String cssURI) Determines if the CSS file has a 'font-face' rulevoid
service
(ServiceManager manager) Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Field Details
-
ROLE
The Avalon role
-
-
Constructor Details
-
CssFontHelper
public CssFontHelper()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
getGlyphClassNames
Get the CSS class names for glyphes- Parameters:
cssURI
- The URI of CSS fileprefix
- The glyph prefix. Can be null.- Returns:
- The CSS class names for glyphes
-
hasFontFaceRule
Determines if the CSS file has a 'font-face' rule- Parameters:
cssURI
- The URI of CSS file- Returns:
- cssURI The URI of CSS file
-
getFontClassNames
Get CSS class name to use for all icons. Can be empty if the icons contains the font-family to use.- Parameters:
styleSheet
- The CSS stylesheet to parse- Returns:
- The name of the common CSS class name for icons (ex: 'fa' for FontAwesome). Can be empty if the icons contains the font-family to use.
-