|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opencms.widgets.CmsHtmlWidgetOption
An option of a Html type widget.
Options can be defined for each element of the type OpenCmsHtml
using the widget HtmlWidget
.
They have to be placed in the annotation section of a XSD describing an xml content. The configuration
attribute
in the layout
node for the element must contain the activated options as a comma separated String value:
Available options are:
anchor
: the anchor dialog buttoncss:/vfs/path/to/cssfile.css
: the absolute path in the OpenCms VFS to the CSS style sheet
to use to render the contents in the editor (availability depends on the integrated editor)formatselect
: the format selector for selecting text format like paragraph or headings${gallerytype}
: Shows a gallery dialog button, e.g. imagegallery
displays
the image gallery button or downloadgallery
displays the download gallery buttonheight:${editorheight}
: the editor height, where the height can be specified in px or %, e.g. 400px
image
: the image dialog button (availability depends on the integrated editor)link
: the link dialog buttonsource
: shows the source code toggle button(s)stylesxml:/vfs/path/to/stylefile.xml
: the absolute path in the OpenCms VFS to the user defined
styles that should be displayed in the style selector (availability depends on the integrated editor)table
: the table dialog button (availability depends on the integrated editor)
Field Summary | |
static java.lang.String |
EDITOR_DEFAULTHEIGHT
The editor widget default height to use. |
static java.lang.String |
OPTION_ANCHOR
Option for the "anchor" dialog. |
static java.lang.String |
OPTION_CSS
Option for the css style sheet VFS path to use in the widget area. |
static java.lang.String |
OPTION_DELIMITER
The delimiter to use in the configuration String. |
static java.lang.String |
OPTION_FORMATSELECT
Option for the "formatselect" selector. |
static java.lang.String |
OPTION_HEIGHT
Option for the "height" configuration. |
static java.lang.String |
OPTION_IMAGE
Option for the "image" dialog. |
static java.lang.String |
OPTION_LINK
Option for the "link" dialog. |
static java.lang.String |
OPTION_SOURCE
Option for the "source" code mode. |
static java.lang.String |
OPTION_STYLES
Option for the styles XML VFS path to use in the widget area. |
static java.lang.String |
OPTION_TABLE
Option for the "table" dialog. |
Constructor Summary | |
CmsHtmlWidgetOption()
Creates a new empty html widget object object. |
|
CmsHtmlWidgetOption(java.lang.String configuration)
Creates a new html widget object object, configured by the given configuration String. |
Method Summary | |
static java.lang.String |
createConfigurationString(CmsHtmlWidgetOption option)
Returns a html widget configuration String created from the given html widget option. |
java.lang.String |
getCssPath()
Returns the css style sheet VFS path to use in the widget area. |
java.util.List |
getDisplayGalleries()
Returns the displayed gallery names. |
java.lang.String |
getEditorHeight()
Returns the widget editor height. |
java.lang.String |
getStylesXmlPath()
Returns the styles XML VFS path to use in the widget area. |
protected void |
parseOptions(java.lang.String configuration)
Parses the given configuration String. |
void |
setCssPath(java.lang.String cssPath)
Sets the css style sheet VFS path to use in the widget area. |
void |
setDisplayGalleries(java.util.List displayGalleries)
Sets the displayed gallery names. |
void |
setEditorHeight(java.lang.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 |
setShowImageDialog(boolean showImageDialog)
Sets if the image dialog button 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. |
void |
setShowTableDialog(boolean showTableDialog)
Sets if the table dialog button should be available. |
void |
setStylesXmlPath(java.lang.String stylesXmlPath)
Sets the styles XML VFS path to use in the widget area. |
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(java.lang.String galleryType)
Returns true if the specified gallery type dialog button is shown. |
boolean |
showImageDialog()
Returns true if the image dialog button should be available. |
boolean |
showLinkDialog()
Returns true if the link dialog button should be available. |
boolean |
showSourceEditor()
Returns true if the source code button should be available. |
boolean |
showStylesXml()
Returns true if the styles selector should be available. |
boolean |
showTableDialog()
Returns true if the table dialog button should be available. |
boolean |
useCss()
Returns true if the widget editor should use a defined CSS style sheet. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String EDITOR_DEFAULTHEIGHT
public static final java.lang.String OPTION_ANCHOR
public static final java.lang.String OPTION_CSS
public static final java.lang.String OPTION_DELIMITER
public static final java.lang.String OPTION_FORMATSELECT
public static final java.lang.String OPTION_HEIGHT
public static final java.lang.String OPTION_IMAGE
public static final java.lang.String OPTION_LINK
public static final java.lang.String OPTION_SOURCE
public static final java.lang.String OPTION_STYLES
public static final java.lang.String OPTION_TABLE
Constructor Detail |
public CmsHtmlWidgetOption()
public CmsHtmlWidgetOption(java.lang.String configuration)
configuration
- configuration String to parseMethod Detail |
public static java.lang.String createConfigurationString(CmsHtmlWidgetOption option)
option
- the html widget options to create the configuration String for
public java.lang.String getCssPath()
public java.util.List getDisplayGalleries()
public java.lang.String getEditorHeight()
public java.lang.String getStylesXmlPath()
public void setCssPath(java.lang.String cssPath)
cssPath
- the css style sheet VFS path to use in the widget areapublic void setDisplayGalleries(java.util.List displayGalleries)
displayGalleries
- the displayed gallery namespublic void setEditorHeight(java.lang.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 setShowImageDialog(boolean showImageDialog)
showImageDialog
- true if the image dialog button 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 void setShowTableDialog(boolean showTableDialog)
showTableDialog
- true if the table dialog button should be available, otherwise falsepublic void setStylesXmlPath(java.lang.String stylesXmlPath)
stylesXmlPath
- the styles XML VFS path to use in the widget areapublic boolean showAnchorDialog()
public boolean showFormatSelect()
public boolean showGalleryDialog(java.lang.String galleryType)
galleryType
- the gallery type to check
public boolean showImageDialog()
public boolean showLinkDialog()
public boolean showSourceEditor()
public boolean showStylesXml()
public boolean showTableDialog()
public boolean useCss()
protected void parseOptions(java.lang.String configuration)
configuration
- the configuration String to parse
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |