Class CmsMultiSelectBox

  • All Implemented Interfaces:
    com.google.gwt.event.dom.client.HasFocusHandlers, com.google.gwt.event.logical.shared.HasAttachHandlers, com.google.gwt.event.logical.shared.HasValueChangeHandlers<java.lang.String>, com.google.gwt.event.shared.HasHandlers, com.google.gwt.user.client.EventListener, com.google.gwt.user.client.ui.HasVisibility, com.google.gwt.user.client.ui.IsRenderable, com.google.gwt.user.client.ui.IsWidget, I_CmsHasInit, I_CmsTruncable, I_CmsFormWidget, I_CmsHasGhostValue

    public class CmsMultiSelectBox
    extends A_CmsSelectBox<CmsMultiSelectCell>
    implements I_CmsHasInit, I_CmsHasGhostValue
    Widget for selecting one of multiple items from a drop-down list which opens after the user clicks on the widget.

    Since:
    8.5.0
    • Nested Class Summary

      • Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject

        com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled
    • Constructor Summary

      Constructors 
      Constructor Description
      CmsMultiSelectBox()
      Default constructor.
      CmsMultiSelectBox​(java.util.Map<java.lang.String,​java.lang.String> items, boolean addNullOption)
      Creates a new select box, with the option of adding a "not selected" choice.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addOption​(CmsMultiSelectCell cell)
      Adds a new selection cell.
      protected CmsMultiSelectCell createUnknownOption​(java.lang.String value)
      Internal method to create a select option for an unknown value.
      java.lang.String getApparentValue()
      Returns the "apparent value", i.e.
      java.util.List<CmsCheckBox> getCheckboxes()
      Returns all CmsCheckBoxes used.
      java.lang.String getFormValueAsString()
      Gets the current value of the widget as a string.
      protected java.lang.String getTitle​(java.lang.String option, java.lang.String defaultValue)
      Helper method to get the title for a given select option.
      static void initClass()
      Initializes this class.
      protected void initOpener()
      The implementation of this method should initialize the opener of the select box.
      protected void onLoad()  
      void selectValue​(java.lang.String value)
      Helper method to set the current selected option.
      void setAutoHideParent​(I_CmsAutoHider autoHideParent)
      Call this when auto hiding parents are shown.
      void setFormValueAsString​(java.lang.String value)
      Sets the current value of the widget as a string.
      void setGhostMode​(boolean ghostMode)
      Enables or disables ghost mode, if possible.
      void setGhostValue​(java.lang.String value, boolean ghostMode)
      Sets the "ghost value" of the widget and optionally sets it to "ghost mode".
      void setTextForNullSelection​(java.lang.String text)
      Sets the text that is used for the "not selected" option.
      void setTitle​(java.lang.String option, java.lang.String title)
      Sets the title for a select option.
      void truncateOpener​(java.lang.String prefix, int width)
      Abstract method whose implementation should truncate the opener widget(s).
      void updateCell​(CmsMultiSelectCell cell)
      Updates a single select cell.
      void updateCells()
      Updates the select cells.
      protected void updateOpener​(java.lang.String newValue)
      The implementation of this method should update the opener when a new value is selected by the user.
      protected void updateStyle()
      This method should be used to make changes to the CSS style of the select box when the value changes.
      • Methods inherited from class com.google.gwt.user.client.ui.Composite

        claimElement, getWidget, initializeClaimedElement, initWidget, isAttached, onAttach, render, render, resolvePotentialElement, setWidget
      • Methods inherited from class com.google.gwt.user.client.ui.Widget

        addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isOrWasAttached, removeFromParent, setLayoutData, sinkEvents, unsinkEvents
      • Methods inherited from class com.google.gwt.user.client.ui.UIObject

        addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface com.google.gwt.event.shared.HasHandlers

        fireEvent