Class CmsMessageBundleEditorOptions


  • public class CmsMessageBundleEditorOptions
    extends java.lang.Object
    View of the message bundle editor options, i.e., language/mode switcher, file name display and "Add key" option.
    • Constructor Summary

      Constructors 
      Constructor Description
      CmsMessageBundleEditorOptions​(java.util.Collection<java.util.Locale> locales, java.util.Locale currentLocale, org.opencms.ui.editors.messagebundle.CmsMessageBundleEditorTypes.EditMode currentMode, org.opencms.ui.editors.messagebundle.CmsMessageBundleEditorTypes.I_OptionListener optionListener)
      Default constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean focusAddKey()
      Puts focus on the "Add key" input field, iff it is shown.
      com.vaadin.ui.Component getOptionsComponent()
      Returns the options component.
      void setEditedFilePath​(java.lang.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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CmsMessageBundleEditorOptions

        public CmsMessageBundleEditorOptions​(java.util.Collection<java.util.Locale> locales,
                                             java.util.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 Detail

      • focusAddKey

        public boolean focusAddKey()
        Puts focus on the "Add key" input field, iff it is shown.
        Returns:
        true if the focus has been set, false otherwise.
      • getOptionsComponent

        public com.vaadin.ui.Component getOptionsComponent()
        Returns the options component.
        Returns:
        the options component.
      • setEditedFilePath

        public void setEditedFilePath​(java.lang.String editedFilePath)
        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

        public void updateShownOptions​(boolean showModeSwitch,
                                       boolean showAddKeyOption)
        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.