Class StaticRichTextConfiguration.StaticRichTextConfigurationStyle
- java.lang.Object
-
- org.ametys.core.ui.widgets.richtext.StaticRichTextConfiguration.StaticRichTextConfigurationStyle
-
- All Implemented Interfaces:
RichTextConfigurationStyle
- Enclosing class:
- StaticRichTextConfiguration
public static class StaticRichTextConfiguration.StaticRichTextConfigurationStyle extends Object implements RichTextConfigurationStyle
A configured implementation ofRichTextConfigurationStyle
-
-
Field Summary
Fields Modifier and Type Field Description protected String
_buttonCSSClass
The backoffice css classprotected String
_buttonLargeIcon
The icon for the button in smallprotected String
_buttonMediumIcon
The icon for the button in smallprotected String
_buttonSmallIcon
The icon for the button in smallprotected String
_className
The editor css class nameprotected I18nizableText
_description
The descriptionprotected I18nizableText
_label
The labelprotected String
_tagName
The tag name
-
Constructor Summary
Constructors Modifier Constructor Description StaticRichTextConfigurationStyle(String tagNameAndClassName, I18nizableText label, I18nizableText description, String buttonCSSClass, String buttonSmallIcon, String buttonMediumIcon, String buttonLargeIcon, boolean isRenderingOnlyAClass)
Creates by valuesprotected
StaticRichTextConfigurationStyle(Configuration configuration, boolean isRenderingOnlyAClass, String pluginName, org.slf4j.Logger logger)
Create by configuration
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getButtonCSSClass()
Get the optional css to apply to the button.
The CSS file declaring this class has to be loaded separately.I18nizableText
getButtonDescription()
Get the style description.I18nizableText
getButtonLabel()
Get the style label.String
getButtonLargeIcon()
Get the optional image to set on the button.String
getButtonMediumIcon()
Get the optional image to set on the button.String
getButtonSmallIcon()
Get the optional image to set on the button.String
getClassName()
Optionally a style can specify a CSS class name to use.
The 'class' attribute has to be separately authorized and this particular value also.String
getTagName()
Optionally a style can specify a tag name to use.
-
-
-
Field Detail
-
_className
protected String _className
The editor css class name
-
_label
protected I18nizableText _label
The label
-
_description
protected I18nizableText _description
The description
-
_buttonCSSClass
protected String _buttonCSSClass
The backoffice css class
-
_buttonSmallIcon
protected String _buttonSmallIcon
The icon for the button in small
-
_buttonMediumIcon
protected String _buttonMediumIcon
The icon for the button in small
-
_buttonLargeIcon
protected String _buttonLargeIcon
The icon for the button in small
-
-
Constructor Detail
-
StaticRichTextConfigurationStyle
protected StaticRichTextConfigurationStyle(Configuration configuration, boolean isRenderingOnlyAClass, String pluginName, org.slf4j.Logger logger) throws ConfigurationException
Create by configuration- Parameters:
configuration
- The tag configurationisRenderingOnlyAClass
- In configuration rendering attribute can be only a class or a tag with an option ".class"pluginName
- The name of the plugin where it was declaredlogger
- The logger- Throws:
ConfigurationException
- If an error occurred
-
StaticRichTextConfigurationStyle
public StaticRichTextConfigurationStyle(String tagNameAndClassName, I18nizableText label, I18nizableText description, String buttonCSSClass, String buttonSmallIcon, String buttonMediumIcon, String buttonLargeIcon, boolean isRenderingOnlyAClass)
Creates by values- Parameters:
tagNameAndClassName
- The rendering for inline editor such as h1.biglabel
- The label for the buttondescription
- The description for the buttonbuttonCSSClass
- The css for the buttonbuttonSmallIcon
- The small icon for the buttonbuttonMediumIcon
- The medium icon for the buttonbuttonLargeIcon
- The large icon for the buttonisRenderingOnlyAClass
- In configuration rendering attribute can be only a class or a tag with an option ".class"
-
-
Method Detail
-
getTagName
public String getTagName()
Description copied from interface:RichTextConfigurationStyle
Optionally a style can specify a tag name to use. For example, some 'paragraph' styles may use 'p' while another can use 'h1'.
Tag has to be authorized separately- Specified by:
getTagName
in interfaceRichTextConfigurationStyle
- Returns:
- The tag name. Can be null.
-
getClassName
public String getClassName()
Description copied from interface:RichTextConfigurationStyle
Optionally a style can specify a CSS class name to use.
The 'class' attribute has to be separately authorized and this particular value also.- Specified by:
getClassName
in interfaceRichTextConfigurationStyle
- Returns:
- The class name. Can be null.
-
getButtonLabel
public I18nizableText getButtonLabel()
Description copied from interface:RichTextConfigurationStyle
Get the style label. A short name for button text.- Specified by:
getButtonLabel
in interfaceRichTextConfigurationStyle
- Returns:
- A non-null value
-
getButtonDescription
public I18nizableText getButtonDescription()
Description copied from interface:RichTextConfigurationStyle
Get the style description. A long description for tips.- Specified by:
getButtonDescription
in interfaceRichTextConfigurationStyle
- Returns:
- A non-null value
-
getButtonCSSClass
public String getButtonCSSClass()
Description copied from interface:RichTextConfigurationStyle
Get the optional css to apply to the button.
The CSS file declaring this class has to be loaded separately.- Specified by:
getButtonCSSClass
in interfaceRichTextConfigurationStyle
- Returns:
- A class name. Can be null.
-
getButtonSmallIcon
public String getButtonSmallIcon()
Description copied from interface:RichTextConfigurationStyle
Get the optional image to set on the button. Small is 16x16.- Specified by:
getButtonSmallIcon
in interfaceRichTextConfigurationStyle
- Returns:
- An image url. Can be null.
-
getButtonMediumIcon
public String getButtonMediumIcon()
Description copied from interface:RichTextConfigurationStyle
Get the optional image to set on the button. Medium is 32x32.- Specified by:
getButtonMediumIcon
in interfaceRichTextConfigurationStyle
- Returns:
- An image url. Can be null.
-
getButtonLargeIcon
public String getButtonLargeIcon()
Description copied from interface:RichTextConfigurationStyle
Get the optional image to set on the button. Large is 48x48.- Specified by:
getButtonLargeIcon
in interfaceRichTextConfigurationStyle
- Returns:
- An image url. Can be null.
-
-