public class CmsAddFormatterWidget extends A_CmsFormatterWidget
Please note that this widget assumes the resource being edited is a sitemap configuration, and will not work correctly in a different context.
A_CmsFormatterWidget.FormatterSelectComparator
A_CmsWidget.CmsDummyWidgetDialog
CONFIGURATION_HEIGHT
HELP_POSTFIX, LABEL_PREFIX
Constructor and Description |
---|
CmsAddFormatterWidget()
Default constructor.
|
CmsAddFormatterWidget(java.lang.String config)
Constructor with a configuration parameter.
|
Modifier and Type | Method and Description |
---|---|
java.util.List<java.lang.String> |
getCssResourceLinks(CmsObject cms)
Returns a list of CSS resources required by the widget.
|
protected java.util.List<CmsSelectWidgetOption> |
getFormatterOptions(CmsObject cms,
CmsADEConfigData config,
java.lang.String rootPath)
Gets the options corresponding to external (non-schema) formatters.
|
java.lang.String |
getInitCall()
Returns the java script initialization call.
|
java.util.List<java.lang.String> |
getJavaScriptResourceLinks(CmsObject cms)
Returns a list of java script resources required by the widget.
|
protected java.util.Set<java.lang.String> |
getSelectedInFile(CmsConfigurationReader reader,
CmsXmlContent content)
Gets the values which have already been selected in the edited resource on the VFS.
|
protected java.util.List<CmsSelectWidgetOption> |
getTypeOptions(CmsObject cms,
CmsADEConfigData adeConfig)
Gets the options corresponding to the schemas which define formatters.
|
boolean |
isInternal()
Returns if this is an internal widget.
|
I_CmsWidget |
newInstance()
Creates a duplicate of this widget instance.
|
getWidgetOptionForFormatter, getWidgetOptionForType, parseSelectOptions
getDialogWidget, getWidgetName, getWidgetStringValue
addSelectOption, getConfiguration, getConfiguration, getDefaultDisplayType, getHeight, getResourcePath, getSelectedValue, getSelectedValues, getSelectOptions, setConfiguration, setSelectOptions
equals, getDialogHtmlEnd, getDialogIncludes, getDialogInitCall, getDialogInitMethod, getHelpBubble, getHelpKey, getHelpText, getJsHelpMouseHandler, getJSIncludeFile, getLabelKey, hashCode, isCompactViewEnabled, setEditorValue
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
getDialogHtmlEnd, getDialogIncludes, getDialogInitCall, getDialogInitMethod, getHelpBubble, getHelpText, isCompactViewEnabled, setEditorValue
public CmsAddFormatterWidget()
public CmsAddFormatterWidget(java.lang.String config)
config
- the configuration stringpublic java.util.List<java.lang.String> getCssResourceLinks(CmsObject cms)
A_CmsSelectWidget
getCssResourceLinks
in interface I_CmsADEWidget
getCssResourceLinks
in class A_CmsSelectWidget
cms
- the current OpenCms contextI_CmsADEWidget.getCssResourceLinks(org.opencms.file.CmsObject)
public java.lang.String getInitCall()
A_CmsSelectWidget
getInitCall
in interface I_CmsADEWidget
getInitCall
in class A_CmsSelectWidget
I_CmsADEWidget.getInitCall()
public java.util.List<java.lang.String> getJavaScriptResourceLinks(CmsObject cms)
A_CmsSelectWidget
getJavaScriptResourceLinks
in interface I_CmsADEWidget
getJavaScriptResourceLinks
in class A_CmsSelectWidget
cms
- the current OpenCms contextI_CmsADEWidget.getJavaScriptResourceLinks(org.opencms.file.CmsObject)
public boolean isInternal()
A_CmsSelectWidget
Only widgets belonging to the OpenCms core should be marked as internal.
isInternal
in interface I_CmsADEWidget
isInternal
in class A_CmsSelectWidget
true
if this is an internal widgetI_CmsADEWidget.isInternal()
public I_CmsWidget newInstance()
I_CmsWidget
newInstance
in interface I_CmsWidget
newInstance
in class CmsSelectWidget
CmsSelectWidget.newInstance()
protected java.util.List<CmsSelectWidgetOption> getFormatterOptions(CmsObject cms, CmsADEConfigData config, java.lang.String rootPath)
A_CmsFormatterWidget
getFormatterOptions
in class A_CmsFormatterWidget
cms
- the CMS contextconfig
- the ADE configurationrootPath
- the root path of the edited fileA_CmsFormatterWidget.getFormatterOptions(org.opencms.file.CmsObject, org.opencms.ade.configuration.CmsADEConfigData, java.lang.String)
protected java.util.Set<java.lang.String> getSelectedInFile(CmsConfigurationReader reader, CmsXmlContent content)
A_CmsFormatterWidget
getSelectedInFile
in class A_CmsFormatterWidget
reader
- a sitemap configuration readercontent
- the unmarshalled contentA_CmsFormatterWidget.getSelectedInFile(org.opencms.ade.configuration.CmsConfigurationReader, org.opencms.xml.content.CmsXmlContent)
protected java.util.List<CmsSelectWidgetOption> getTypeOptions(CmsObject cms, CmsADEConfigData adeConfig)
A_CmsFormatterWidget
getTypeOptions
in class A_CmsFormatterWidget
cms
- the current CMS contextadeConfig
- the ADE configurationA_CmsFormatterWidget.getTypeOptions(org.opencms.file.CmsObject, org.opencms.ade.configuration.CmsADEConfigData)