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
Nested ClassesModifier and TypeClassDescriptionstatic classStores the editor settings.Nested classes/interfaces inherited from interface com.vaadin.navigator.ViewChangeListener
com.vaadin.navigator.ViewChangeListener.ViewChangeEvent -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidafterViewChange(com.vaadin.navigator.ViewChangeListener.ViewChangeEvent event) booleanbeforeViewChange(com.vaadin.navigator.ViewChangeListener.ViewChangeEvent event) getHighlightMode(CmsResource resource) Returns the syntax highlighting type for the currently edited resource.intGets the priority.Returns the shortcut actions.voidinitUI(I_CmsAppUIContext context, CmsResource resource, String backLink, Map<String, String> params) Within this method the editor UI should be initialized.booleanmatchesResource(CmsObject cms, CmsResource resource, boolean plainText) Checks whether the editor is available for the given resource.booleanmatchesType(I_CmsResourceType type, boolean plainText) Checks whether the editor is available for the given resource type.Returns a new editor instance.voidExecuted 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_CmsEditorGets the priority.If multiple editors for the same resource type are available, the one with the highest priority will be picked.
- Specified by:
getPriorityin interfaceI_CmsEditor- Returns:
- the priority
- See Also:
-
getShortcutActions
Description copied from interface:I_CmsHasShortcutActionsReturns the shortcut actions.- Specified by:
getShortcutActionsin 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_CmsEditorWithin this method the editor UI should be initialized.Use the context to add the app's components to the UI.
- Specified by:
initUIin 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_CmsEditorChecks whether the editor is available for the given resource.- Specified by:
matchesResourcein interfaceI_CmsEditor- Parameters:
cms- the CMS contextresource- the resource to editplainText- if plain text editing is required- Returns:
trueif the editor is available for the given resource- See Also:
-
matchesType
Description copied from interface:I_CmsEditorChecks whether the editor is available for the given resource type.- Specified by:
matchesTypein interfaceI_CmsEditor- Parameters:
type- the resource type to editplainText- if plain text editing is required- Returns:
trueif the editor is available for the given resource- See Also:
-
newInstance
Description copied from interface:I_CmsEditorReturns a new editor instance.- Specified by:
newInstancein interfaceI_CmsEditor- Returns:
- the editor instance
- See Also:
-
onWindowClose
Description copied from interface:I_CmsWindowCloseListenerExecuted on window close.- Specified by:
onWindowClosein interfaceI_CmsWindowCloseListener- See Also: