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.FormatterSelectComparatorNested classes/interfaces inherited from class org.opencms.widgets.A_CmsWidget
A_CmsWidget.CmsDummyWidgetDialog -
Field Summary
Fields inherited from class org.opencms.widgets.A_CmsFormatterWidget
LOGFields inherited from class org.opencms.widgets.A_CmsSelectWidget
CONFIGURATION_HEIGHTFields inherited from class org.opencms.widgets.A_CmsWidget
HELP_POSTFIX, LABEL_PREFIX -
Constructor Summary
ConstructorsConstructorDescriptionDefault 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.booleanReturns 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, parseSelectOptionsMethods inherited from class org.opencms.widgets.CmsSelectWidget
getDialogWidget, getWidgetStringValueMethods inherited from class org.opencms.widgets.A_CmsSelectWidget
addSelectOption, getConfiguration, getDefaultDisplayType, getHeight, getResourcePath, getSelectedValue, getSelectedValues, getSelectOptions, setConfiguration, setSelectOptionsMethods inherited from class org.opencms.widgets.A_CmsWidget
equals, getDialogHtmlEnd, getDialogIncludes, getDialogInitCall, getDialogInitMethod, getHelpBubble, getHelpKey, getHelpText, getJsHelpMouseHandler, getJSIncludeFile, getLabelKey, hashCode, isCompactViewEnabled, setEditorValueMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods 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_CmsSelectWidgetReturns a list of CSS resources required by the widget.- Specified by:
getCssResourceLinksin interfaceI_CmsADEWidget- Overrides:
getCssResourceLinksin classA_CmsSelectWidget- Parameters:
cms- the current OpenCms context- Returns:
- the required CSS resource links
- See Also:
-
getInitCall
Description copied from class:A_CmsSelectWidgetReturns the java script initialization call.- Specified by:
getInitCallin interfaceI_CmsADEWidget- Overrides:
getInitCallin classA_CmsSelectWidget- Returns:
- the java script initialization call
- See Also:
-
getJavaScriptResourceLinks
Description copied from class:A_CmsSelectWidgetReturns a list of java script resources required by the widget.- Specified by:
getJavaScriptResourceLinksin interfaceI_CmsADEWidget- Overrides:
getJavaScriptResourceLinksin classA_CmsSelectWidget- Parameters:
cms- the current OpenCms context- Returns:
- the required java script resource links
- See Also:
-
isInternal
Description copied from class:A_CmsSelectWidgetReturns if this is an internal widget.Only widgets belonging to the OpenCms core should be marked as internal.
- Specified by:
isInternalin interfaceI_CmsADEWidget- Overrides:
isInternalin classA_CmsSelectWidget- Returns:
trueif this is an internal widget- See Also:
-
newInstance
Description copied from interface:I_CmsWidgetCreates a duplicate of this widget instance.- Specified by:
newInstancein interfaceI_CmsWidget- Overrides:
newInstancein 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_CmsFormatterWidgetGets the options corresponding to external (non-schema) formatters.- Specified by:
getFormatterOptionsin 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_CmsFormatterWidgetGets the values which have already been selected in the edited resource on the VFS.- Specified by:
getSelectedInFilein 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_CmsFormatterWidgetGets the options corresponding to the schemas which define formatters.- Specified by:
getTypeOptionsin 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:
-