public class CmsMessageBundleEditor extends java.lang.Object implements I_CmsEditor, I_CmsWindowCloseListener, com.vaadin.navigator.ViewChangeListener, I_CmsHasShortcutActions
| Constructor and Description |
|---|
CmsMessageBundleEditor()
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
afterViewChange(com.vaadin.navigator.ViewChangeListener.ViewChangeEvent event) |
boolean |
beforeViewChange(com.vaadin.navigator.ViewChangeListener.ViewChangeEvent event) |
int |
getPriority()
Gets the priority.
|
java.util.Map<com.vaadin.event.Action,java.lang.Runnable> |
getShortcutActions()
Returns the shortcut actions.
|
boolean |
handleAddKey(java.lang.String newKey)
Handles adding a key.
|
void |
handleEntryChange(org.opencms.ui.editors.messagebundle.CmsMessageBundleEditorTypes.EntryChangeEvent event)
Called when a entry change event is fired.
|
boolean |
handleItemDeletion(org.opencms.ui.editors.messagebundle.CmsMessageBundleEditorTypes.ItemDeletionEvent e)
Called when an item deletion event is fired.
|
void |
handleLanguageChange(java.util.Locale locale)
Handles a language change.
|
void |
handleModeChange(org.opencms.ui.editors.messagebundle.CmsMessageBundleEditorTypes.EditMode mode)
Handles the change of the edit mode.
|
void |
initUI(I_CmsAppUIContext context,
CmsResource resource,
java.lang.String backLink,
java.util.Map<java.lang.String,java.lang.String> params)
Within this method the editor UI should be initialized.
|
boolean |
matchesResource(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.
|
I_CmsEditor |
newInstance()
Returns a new editor instance.
|
void |
onWindowClose()
Executed on window close.
|
public CmsMessageBundleEditor()
public void afterViewChange(com.vaadin.navigator.ViewChangeListener.ViewChangeEvent event)
afterViewChange in interface com.vaadin.navigator.ViewChangeListenerViewChangeListener.afterViewChange(com.vaadin.navigator.ViewChangeListener.ViewChangeEvent)public boolean beforeViewChange(com.vaadin.navigator.ViewChangeListener.ViewChangeEvent event)
beforeViewChange in interface com.vaadin.navigator.ViewChangeListenerViewChangeListener.beforeViewChange(com.vaadin.navigator.ViewChangeListener.ViewChangeEvent)public int getPriority()
I_CmsEditorIf multiple editors for the same resource type are available, the one with the highest priority will be picked.
getPriority in interface I_CmsEditorI_CmsEditor.getPriority()public java.util.Map<com.vaadin.event.Action,java.lang.Runnable> getShortcutActions()
I_CmsHasShortcutActionsgetShortcutActions in interface I_CmsHasShortcutActionsI_CmsHasShortcutActions.getShortcutActions()public boolean handleAddKey(java.lang.String newKey)
newKey - the key to add.CmsMessageBundleEditorTypes.I_OptionListener.handleAddKey(java.lang.String)public void handleEntryChange(org.opencms.ui.editors.messagebundle.CmsMessageBundleEditorTypes.EntryChangeEvent event)
event - the entry change event.CmsMessageBundleEditorTypes.I_EntryChangeListener.handleEntryChange(org.opencms.ui.editors.messagebundle.CmsMessageBundleEditorTypes.EntryChangeEvent)public boolean handleItemDeletion(org.opencms.ui.editors.messagebundle.CmsMessageBundleEditorTypes.ItemDeletionEvent e)
e - the eventtrue if deletion handling was successful, false otherwise.CmsMessageBundleEditorTypes.I_ItemDeletionListener.handleItemDeletion(org.opencms.ui.editors.messagebundle.CmsMessageBundleEditorTypes.ItemDeletionEvent)public void handleLanguageChange(java.util.Locale locale)
locale - the newly selected language.CmsMessageBundleEditorTypes.I_OptionListener.handleLanguageChange(java.util.Locale)public void handleModeChange(org.opencms.ui.editors.messagebundle.CmsMessageBundleEditorTypes.EditMode mode)
mode - the newly selected edit mode.CmsMessageBundleEditorTypes.I_OptionListener.handleModeChange(org.opencms.ui.editors.messagebundle.CmsMessageBundleEditorTypes.EditMode)public void initUI(I_CmsAppUIContext context, CmsResource resource, java.lang.String backLink, java.util.Map<java.lang.String,java.lang.String> params)
I_CmsEditorUse the context to add the app's components to the UI.
initUI in interface I_CmsEditorcontext - the UI contextresource - the resource to editbackLink - the link to return to when closing the editorparams - optional parametersI_CmsEditor.initUI(org.opencms.ui.apps.I_CmsAppUIContext, org.opencms.file.CmsResource, java.lang.String, java.util.Map)public boolean matchesResource(CmsResource resource, boolean plainText)
I_CmsEditormatchesResource in interface I_CmsEditorresource - the resource to editplainText - if plain text editing is requiredtrue if the editor is available for the given resourceI_CmsEditor.matchesResource(org.opencms.file.CmsResource, boolean)public boolean matchesType(I_CmsResourceType type, boolean plainText)
I_CmsEditormatchesType in interface I_CmsEditortype - the resource type to editplainText - if plain text editing is requiredtrue if the editor is available for the given resourceI_CmsEditor.matchesResource(org.opencms.file.CmsResource, boolean)public I_CmsEditor newInstance()
I_CmsEditornewInstance in interface I_CmsEditorI_CmsEditor.newInstance()public void onWindowClose()
I_CmsWindowCloseListeneronWindowClose in interface I_CmsWindowCloseListenerI_CmsWindowCloseListener.onWindowClose()