|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.opencms.widgets.CmsHtmlWidgetOption
public class CmsHtmlWidgetOption
An option of a Html type widget.
If options are passed from XML content schema definitions as widget configuration options, the following syntax is used for defining the option values:
"height:400px,link,anchor,imagegallery,downloadgallery,formatselect,source"
Available options are:
height:${editorheight}: the editor height, where the height can be specified in px or %, e.g. 400pxlink: the link dialog buttonanchor: the anchor dialog buttonformatselect: the format selector for selecting text format like paragraph or headingssource: shows the source code toggle button(s)${gallerytype}: Shows a gallery dialog button, e.g. imagegallery
| Field Summary | |
|---|---|
static String |
EDITOR_DEFAULTHEIGHT
The editor widget default height to use. |
static String |
OPTION_ANCHOR
Option for the "anchor" dialog. |
static String |
OPTION_DELIMITER
The delimiter to use in the configuration String. |
static String |
OPTION_FORMATSELECT
Option for the "formatselect" selector. |
static String |
OPTION_HEIGHT
Option for the "height" configuration. |
static String |
OPTION_LINK
Option for the "link" dialog. |
static String |
OPTION_SOURCE
Option for the "source" code mode. |
| Constructor Summary | |
|---|---|
CmsHtmlWidgetOption()
Creates a new empty html widget object object. |
|
CmsHtmlWidgetOption(String configuration)
Creates a new html widget object object, configured by the given configuration String. |
|
| Method Summary | |
|---|---|
static String |
createConfigurationString(CmsHtmlWidgetOption option)
Returns a html widget configuration String created from the given html widget option. |
List |
getDisplayGalleries()
Returns the displayed gallery names. |
String |
getEditorHeight()
Returns the widget editor height. |
protected void |
parseOptions(String configuration)
Parses the given configuration String. |
void |
setDisplayGalleries(List displayGalleries)
Sets the displayed gallery names. |
void |
setEditorHeight(String editorHeight)
Sets the widget editor height. |
void |
setShowAnchorDialog(boolean showAnchorDialog)
Sets if the anchor dialog button should be available. |
void |
setShowFormatSelect(boolean showFormatSelect)
Sets if the format selector should be available. |
void |
setShowLinkDialog(boolean showLinkDialog)
Sets if the link dialog button should be available. |
void |
setShowSourceEditor(boolean showSourceEditor)
Sets if the source code button should be available. |
boolean |
showAnchorDialog()
Returns true if the anchor dialog button should be available. |
boolean |
showFormatSelect()
Returns true if the format selector should be available. |
boolean |
showGalleryDialog(String galleryType)
Returns true if the specified gallery type dialog button is shown. |
boolean |
showLinkDialog()
Returns true if the link dialog button should be available. |
boolean |
showSourceEditor()
Returns true if the source code button should be available. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String EDITOR_DEFAULTHEIGHT
public static final String OPTION_ANCHOR
public static final String OPTION_DELIMITER
public static final String OPTION_FORMATSELECT
public static final String OPTION_HEIGHT
public static final String OPTION_LINK
public static final String OPTION_SOURCE
| Constructor Detail |
|---|
public CmsHtmlWidgetOption()
public CmsHtmlWidgetOption(String configuration)
configuration - configuration String to parse| Method Detail |
|---|
public static String createConfigurationString(CmsHtmlWidgetOption option)
option - the html widget options to create the configuration String for
public List getDisplayGalleries()
public String getEditorHeight()
public void setDisplayGalleries(List displayGalleries)
displayGalleries - the displayed gallery namespublic void setEditorHeight(String editorHeight)
editorHeight - the widget editor heightpublic void setShowAnchorDialog(boolean showAnchorDialog)
showAnchorDialog - true if the anchor dialog button should be available, otherwise falsepublic void setShowFormatSelect(boolean showFormatSelect)
showFormatSelect - true if the format selector should be available, otherwise falsepublic void setShowLinkDialog(boolean showLinkDialog)
showLinkDialog - true if the link dialog button should be available, otherwise falsepublic void setShowSourceEditor(boolean showSourceEditor)
showSourceEditor - true if the source code button should be available, otherwise falsepublic boolean showAnchorDialog()
public boolean showFormatSelect()
public boolean showGalleryDialog(String galleryType)
galleryType - the gallery type to check
public boolean showLinkDialog()
public boolean showSourceEditor()
protected void parseOptions(String configuration)
configuration - the configuration String to parse
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||