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

    Constructors
    Constructor
    Description
    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.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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

      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(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.