Package org.opencms.widgets
Class CmsRemoveFormatterWidget
java.lang.Object
org.opencms.widgets.A_CmsWidget
org.opencms.widgets.A_CmsSelectWidget
org.opencms.widgets.CmsSelectWidget
org.opencms.widgets.A_CmsFormatterWidget
org.opencms.widgets.CmsRemoveFormatterWidget
- All Implemented Interfaces:
I_CmsADEWidget
,I_CmsWidget
Widget used to select a formatter to remove.
Please note that this widget assumes the resource being edited is a sitemap configuration, and will not work correctly in a different context.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.opencms.widgets.A_CmsFormatterWidget
A_CmsFormatterWidget.FormatterSelectComparator
Nested classes/interfaces inherited from class org.opencms.widgets.A_CmsWidget
A_CmsWidget.CmsDummyWidgetDialog
-
Field Summary
Fields inherited from class org.opencms.widgets.A_CmsFormatterWidget
LOG
Fields inherited from class org.opencms.widgets.A_CmsSelectWidget
CONFIGURATION_HEIGHT
Fields inherited from class org.opencms.widgets.A_CmsWidget
HELP_POSTFIX, LABEL_PREFIX
-
Constructor Summary
ConstructorDescriptionDefault constructor.CmsRemoveFormatterWidget
(String config) Constructor with a configuration parameter. -
Method Summary
Modifier and TypeMethodDescriptionReturns a list of CSS resources required by the widget.protected List<CmsSelectWidgetOption>
getFormatterOptions
(CmsObject cms, CmsADEConfigData config, String rootPath, boolean allRemoved) Gets the options corresponding to external (non-schema) formatters.Returns the java script initialization call.Returns a list of java script resources required by the widget.getSelectedInFile
(CmsConfigurationReader reader, CmsXmlContent content) Gets the values which have already been selected in the edited resource on the VFS.protected List<CmsSelectWidgetOption>
getTypeOptions
(CmsObject cms, CmsADEConfigData adeConfig, boolean allRemoved) Gets the options corresponding to the schemas which define formatters.boolean
Returns if this is an internal widget.Creates a duplicate of this widget instance.Methods inherited from class org.opencms.widgets.A_CmsFormatterWidget
getConfiguration, getWidgetName, getWidgetOptionForFormatter, getWidgetOptionForType, parseSelectOptions, parseSelectOptions
Methods inherited from class org.opencms.widgets.CmsSelectWidget
getDialogWidget, getWidgetStringValue
Methods inherited from class org.opencms.widgets.A_CmsSelectWidget
addSelectOption, getConfiguration, getDefaultDisplayType, getHeight, getResourcePath, getSelectedValue, getSelectedValues, getSelectOptions, setConfiguration, setSelectOptions
Methods inherited from class org.opencms.widgets.A_CmsWidget
equals, getDialogHtmlEnd, getDialogIncludes, getDialogInitCall, getDialogInitMethod, getHelpBubble, getHelpKey, getHelpText, getJsHelpMouseHandler, getJSIncludeFile, getLabelKey, hashCode, isCompactViewEnabled, setEditorValue
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.opencms.widgets.I_CmsWidget
getDialogHtmlEnd, getDialogIncludes, getDialogInitCall, getDialogInitMethod, getHelpBubble, getHelpText, isCompactViewEnabled, setEditorValue
-
Constructor Details
-
CmsRemoveFormatterWidget
public CmsRemoveFormatterWidget()Default constructor. -
CmsRemoveFormatterWidget
Constructor with a configuration parameter.- Parameters:
config
- the configuration string
-
-
Method Details
-
getCssResourceLinks
Description copied from class:A_CmsSelectWidget
Returns a list of CSS resources required by the widget.- Specified by:
getCssResourceLinks
in interfaceI_CmsADEWidget
- Overrides:
getCssResourceLinks
in classA_CmsSelectWidget
- Parameters:
cms
- the current OpenCms context- Returns:
- the required CSS resource links
- See Also:
-
getInitCall
Description copied from class:A_CmsSelectWidget
Returns the java script initialization call.- Specified by:
getInitCall
in interfaceI_CmsADEWidget
- Overrides:
getInitCall
in classA_CmsSelectWidget
- Returns:
- the java script initialization call
- See Also:
-
getJavaScriptResourceLinks
Description copied from class:A_CmsSelectWidget
Returns a list of java script resources required by the widget.- Specified by:
getJavaScriptResourceLinks
in interfaceI_CmsADEWidget
- Overrides:
getJavaScriptResourceLinks
in classA_CmsSelectWidget
- Parameters:
cms
- the current OpenCms context- Returns:
- the required java script resource links
- See Also:
-
isInternal
Description copied from class:A_CmsSelectWidget
Returns if this is an internal widget.Only widgets belonging to the OpenCms core should be marked as internal.
- Specified by:
isInternal
in interfaceI_CmsADEWidget
- Overrides:
isInternal
in classA_CmsSelectWidget
- Returns:
true
if this is an internal widget- See Also:
-
newInstance
Description copied from interface:I_CmsWidget
Creates a duplicate of this widget instance.- Specified by:
newInstance
in interfaceI_CmsWidget
- Overrides:
newInstance
in classCmsSelectWidget
- Returns:
- a duplicate of this widget instance
- See Also:
-
getFormatterOptions
protected List<CmsSelectWidgetOption> getFormatterOptions(CmsObject cms, CmsADEConfigData config, String rootPath, boolean allRemoved) Description copied from class:A_CmsFormatterWidget
Gets the options corresponding to external (non-schema) formatters.- Specified by:
getFormatterOptions
in classA_CmsFormatterWidget
- Parameters:
cms
- the CMS contextconfig
- the ADE configurationrootPath
- the root path of the edited fileallRemoved
- flag, indicating if all inheritedly available formatters should be disabled- Returns:
- the select widget options for the external formatters
- See Also:
-
getSelectedInFile
Description copied from class:A_CmsFormatterWidget
Gets the values which have already been selected in the edited resource on the VFS.- Specified by:
getSelectedInFile
in classA_CmsFormatterWidget
- Parameters:
reader
- a sitemap configuration readercontent
- the unmarshalled content- Returns:
- the set of values which have already been selected
- See Also:
-
getTypeOptions
protected List<CmsSelectWidgetOption> getTypeOptions(CmsObject cms, CmsADEConfigData adeConfig, boolean allRemoved) Description copied from class:A_CmsFormatterWidget
Gets the options corresponding to the schemas which define formatters.- Specified by:
getTypeOptions
in classA_CmsFormatterWidget
- Parameters:
cms
- the current CMS contextadeConfig
- the ADE configurationallRemoved
- flag, indicating if all inheritedly available formatters should be disabled- Returns:
- the select widget options for the content types with formatters in the schema
- See Also:
-