Class VListSelect

    • 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
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected com.google.gwt.user.client.ui.FlowPanel container
      Container for select.
      protected com.google.gwt.user.client.ui.ListBox select
      The select component.
      • Fields inherited from class com.google.gwt.user.client.ui.UIObject

        DEBUG_ID_PREFIX
    • Constructor Summary

      Constructors 
      Constructor Description
      VListSelect()
      Constructs a simple ListSelect widget in multiselect mode.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Registration addSelectionChangeListener​(BiConsumer<Set<String>,​Set<String>> listener)
      Adds a selection change listener the select.
      void bindAriaCaption​(com.google.gwt.user.client.Element captionElement)
      Called to bind the provided caption (label in HTML speak) element to the main input element of the Widget.
      void focus()
      Sets focus to this widget.
      int getRows()
      Returns the number of visible items for the list select.
      protected FastStringSet getSelectedItems()
      Gets the currently selected item values.
      int getTabIndex()
      Gets the tab index.
      boolean isEnabled()  
      boolean isReadOnly()
      Returns true if this select is in read only mode, false if not.
      void setAriaInvalid​(boolean invalid)
      Called to set the element, typically an input element, as invalid.
      void setAriaRequired​(boolean required)
      Called to set the element, typically an input element, as required.
      void setEnabled​(boolean enabled)  
      void setHeight​(String height)  
      void setItems​(List<elemental.json.JsonObject> items)
      Sets the given items to the select.
      void setReadOnly​(boolean readOnly)
      Sets this select as read only, meaning selection cannot be changed.
      void setRows​(int rows)
      Sets the number of visible items for the list select.
      void setStylePrimaryName​(String style)  
      void setTabIndex​(int tabIndex)
      Sets the tab index.
      void setWidth​(String width)  
      • Methods inherited from class com.google.gwt.user.client.ui.Composite

        claimElement, getWidget, initializeClaimedElement, initWidget, isAttached, onAttach, onBrowserEvent, onDetach, 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, onLoad, onUnload, 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, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setTitle, setVisible, setVisible, sinkBitlessEvent, toString
    • Field Detail

      • container

        protected final com.google.gwt.user.client.ui.FlowPanel container
        Container for select. Kept for DOM backwards compatibility.
      • select

        protected final com.google.gwt.user.client.ui.ListBox select
        The select component.
    • Constructor Detail

      • VListSelect

        public VListSelect()
        Constructs a simple ListSelect widget in multiselect mode.
    • Method Detail

      • setStylePrimaryName

        public void setStylePrimaryName​(String style)
        Overrides:
        setStylePrimaryName in class com.google.gwt.user.client.ui.UIObject
      • setRows

        public void setRows​(int rows)
        Sets the number of visible items for the list select.
        Parameters:
        rows - the number of items to show
        See Also:
        ListBox.setVisibleItemCount(int)
      • getRows

        public int getRows()
        Returns the number of visible items for the list select.
        Returns:
        the number of items to show
        See Also:
        ListBox.setVisibleItemCount(int)
      • getSelectedItems

        protected FastStringSet getSelectedItems()
        Gets the currently selected item values.
        Returns:
        the currently selected item keys
      • setHeight

        public void setHeight​(String height)
        Overrides:
        setHeight in class com.google.gwt.user.client.ui.UIObject
      • setWidth

        public void setWidth​(String width)
        Overrides:
        setWidth in class com.google.gwt.user.client.ui.UIObject
      • setTabIndex

        public void setTabIndex​(int tabIndex)
        Sets the tab index.
        Parameters:
        tabIndex - the tab index to set
      • getTabIndex

        public int getTabIndex()
        Gets the tab index.
        Returns:
        the tab index
      • setReadOnly

        public void setReadOnly​(boolean readOnly)
        Sets this select as read only, meaning selection cannot be changed.
        Parameters:
        readOnly - true for read only, false for not read only
      • isReadOnly

        public boolean isReadOnly()
        Returns true if this select is in read only mode, false if not.
        Returns:
        true for read only, false for not read only
      • setEnabled

        public void setEnabled​(boolean enabled)
        Specified by:
        setEnabled in interface com.google.gwt.user.client.ui.HasEnabled
      • isEnabled

        public boolean isEnabled()
        Specified by:
        isEnabled in interface com.google.gwt.user.client.ui.HasEnabled
      • focus

        public void focus()
        Description copied from interface: Focusable
        Sets focus to this widget.
        Specified by:
        focus in interface Focusable
      • bindAriaCaption

        public void bindAriaCaption​(com.google.gwt.user.client.Element captionElement)
        Description copied from interface: HandlesAriaCaption
        Called to bind the provided caption (label in HTML speak) element to the main input element of the Widget. Binding should be removed from the main input field when captionElement is null.
        Specified by:
        bindAriaCaption in interface HandlesAriaCaption
        Parameters:
        captionElement - Element of the caption
      • setAriaRequired

        public void setAriaRequired​(boolean required)
        Description copied from interface: HandlesAriaRequired
        Called to set the element, typically an input element, as required.
        Specified by:
        setAriaRequired in interface HandlesAriaRequired
        Parameters:
        required - boolean true when the element needs to be set as required
      • setAriaInvalid

        public void setAriaInvalid​(boolean invalid)
        Description copied from interface: HandlesAriaInvalid
        Called to set the element, typically an input element, as invalid.
        Specified by:
        setAriaInvalid in interface HandlesAriaInvalid
        Parameters:
        invalid - boolean, true when the element should be marked invalid, false otherwise