Class CmsMessageBundleEditorOptions
java.lang.Object
org.opencms.ui.editors.messagebundle.CmsMessageBundleEditorOptions
View of the message bundle editor options, i.e., language/mode switcher, file name display and "Add key" option.
-
Constructor Summary
ConstructorDescriptionCmsMessageBundleEditorOptions
(Collection<Locale> locales, Locale currentLocale, org.opencms.ui.editors.messagebundle.CmsMessageBundleEditorTypes.EditMode currentMode, org.opencms.ui.editors.messagebundle.CmsMessageBundleEditorTypes.I_OptionListener optionListener) Default constructor. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Puts focus on the "Add key" input field, iff it is shown.com.vaadin.ui.Component
Returns the options component.void
setEditedFilePath
(String editedFilePath) Sets the path of the edited file in the corresponding display.void
setEditMode
(org.opencms.ui.editors.messagebundle.CmsMessageBundleEditorTypes.EditMode mode) Set the edit mode.void
updateShownOptions
(boolean showModeSwitch, boolean showAddKeyOption) Update which options are shown.
-
Constructor Details
-
CmsMessageBundleEditorOptions
public CmsMessageBundleEditorOptions(Collection<Locale> locales, Locale currentLocale, org.opencms.ui.editors.messagebundle.CmsMessageBundleEditorTypes.EditMode currentMode, org.opencms.ui.editors.messagebundle.CmsMessageBundleEditorTypes.I_OptionListener optionListener) Default constructor.- Parameters:
locales
- the locales shown in the language switch.currentLocale
- the currently edited locale.currentMode
- the current edit mode.optionListener
- the option listener.
-
-
Method Details
-
focusAddKey
Puts focus on the "Add key" input field, iff it is shown.- Returns:
true
if the focus has been set,false
otherwise.
-
getOptionsComponent
Returns the options component.- Returns:
- the options component.
-
setEditedFilePath
Sets the path of the edited file in the corresponding display.- Parameters:
editedFilePath
- path of the edited file to set.
-
setEditMode
public void setEditMode(org.opencms.ui.editors.messagebundle.CmsMessageBundleEditorTypes.EditMode mode) Set the edit mode.- Parameters:
mode
- the edit mode to set.
-
updateShownOptions
Update which options are shown.- Parameters:
showModeSwitch
- flag, indicating if the mode switch should be shown.showAddKeyOption
- flag, indicating if the "Add key" row should be shown.
-