Package org.opencms.ui.editors
Class CmsSourceEditor
java.lang.Object
org.opencms.ui.editors.CmsSourceEditor
- All Implemented Interfaces:
com.vaadin.navigator.ViewChangeListener
,Serializable
,I_CmsHasShortcutActions
,I_CmsWindowCloseListener
,I_CmsEditor
public class CmsSourceEditor
extends Object
implements I_CmsEditor, I_CmsWindowCloseListener, com.vaadin.navigator.ViewChangeListener, I_CmsHasShortcutActions
The plain text editor.
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Stores the editor settings.Nested classes/interfaces inherited from interface com.vaadin.navigator.ViewChangeListener
com.vaadin.navigator.ViewChangeListener.ViewChangeEvent
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
afterViewChange
(com.vaadin.navigator.ViewChangeListener.ViewChangeEvent event) boolean
beforeViewChange
(com.vaadin.navigator.ViewChangeListener.ViewChangeEvent event) getHighlightMode
(CmsResource resource) Returns the syntax highlighting type for the currently edited resource.int
Gets the priority.Returns the shortcut actions.void
initUI
(I_CmsAppUIContext context, CmsResource resource, String backLink, Map<String, String> params) Within this method the editor UI should be initialized.boolean
matchesResource
(CmsObject cms, CmsResource resource, boolean plainText) Checks whether the editor is available for the given resource.boolean
matchesType
(I_CmsResourceType type, boolean plainText) Checks whether the editor is available for the given resource type.Returns a new editor instance.void
Executed on window close.
-
Constructor Details
-
CmsSourceEditor
public CmsSourceEditor()Constructor.
-
-
Method Details
-
getHighlightMode
Returns the syntax highlighting type for the currently edited resource.- Parameters:
resource
- the resource to edit- Returns:
- the syntax highlighting type
-
getPriority
Description copied from interface:I_CmsEditor
Gets the priority.If multiple editors for the same resource type are available, the one with the highest priority will be picked.
- Specified by:
getPriority
in interfaceI_CmsEditor
- Returns:
- the priority
- See Also:
-
getShortcutActions
Description copied from interface:I_CmsHasShortcutActions
Returns the shortcut actions.- Specified by:
getShortcutActions
in interfaceI_CmsHasShortcutActions
- Returns:
- the shortcut actions
- See Also:
-
initUI
public void initUI(I_CmsAppUIContext context, CmsResource resource, String backLink, Map<String, String> params) Description copied from interface:I_CmsEditor
Within this method the editor UI should be initialized.Use the context to add the app's components to the UI.
- Specified by:
initUI
in interfaceI_CmsEditor
- Parameters:
context
- the UI contextresource
- the resource to editbackLink
- the link to return to when closing the editorparams
- optional parameters- See Also:
-
matchesResource
Description copied from interface:I_CmsEditor
Checks whether the editor is available for the given resource.- Specified by:
matchesResource
in interfaceI_CmsEditor
- Parameters:
cms
- the CMS contextresource
- the resource to editplainText
- if plain text editing is required- Returns:
true
if the editor is available for the given resource- See Also:
-
matchesType
Description copied from interface:I_CmsEditor
Checks whether the editor is available for the given resource type.- Specified by:
matchesType
in interfaceI_CmsEditor
- Parameters:
type
- the resource type to editplainText
- if plain text editing is required- Returns:
true
if the editor is available for the given resource- See Also:
-
newInstance
Description copied from interface:I_CmsEditor
Returns a new editor instance.- Specified by:
newInstance
in interfaceI_CmsEditor
- Returns:
- the editor instance
- See Also:
-
onWindowClose
Description copied from interface:I_CmsWindowCloseListener
Executed on window close.- Specified by:
onWindowClose
in interfaceI_CmsWindowCloseListener
- See Also: