Class VNativeSelect

    • 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 inherited from class com.google.gwt.user.client.ui.UIObject

        DEBUG_ID_PREFIX
    • Constructor Summary

      Constructors 
      Constructor Description
      VNativeSelect()
      Creates a new VNativeSelect instance.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      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.
      com.google.gwt.user.client.ui.ListBox getListBox()
      Gets the underlying ListBox widget that this widget wraps.
      int getVisibleItemCount()
      Gets the number of items that are visible.
      boolean isEmptySelectionAllowed()
      Returns true if empty selection is allowed.
      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 setEmptySelectionAllowed​(boolean emptySelectionAllowed)
      Sets true if empty selection is allowed.
      void setHeight​(String height)  
      void setSelectedItem​(String value)
      Sets the selected item by its value.
      void setStylePrimaryName​(String style)  
      void setTabIndex​(int tabIndex)
      Sets the tab index.
      void setVisibleItemCount​(int visibleItemCount)
      Sets the number of items that are visible.
      void setWidth​(String width)  
      • Methods inherited from class com.google.gwt.user.client.ui.Composite

        claimElement, 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
      • Methods inherited from interface com.google.gwt.event.shared.HasHandlers

        fireEvent
    • Constructor Detail

      • VNativeSelect

        public VNativeSelect()
        Creates a new VNativeSelect instance.
    • Method Detail

      • setStylePrimaryName

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

        public void setSelectedItem​(String value)
        Sets the selected item by its value. If given null, removes selection.
        Parameters:
        value - the value of the item to select or null to select nothing
      • setTabIndex

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

        public com.google.gwt.user.client.ui.ListBox getListBox()
        Gets the underlying ListBox widget that this widget wraps.
        Returns:
        the ListBox this widget wraps
      • setWidth

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

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

        public void setVisibleItemCount​(int visibleItemCount)
        Sets the number of items that are visible. If only one item is visible, then the box will be displayed as a drop-down list (the default).
        Parameters:
        visibleItemCount - the visible item count
        Since:
        8.1
      • getVisibleItemCount

        public int getVisibleItemCount()
        Gets the number of items that are visible. If only one item is visible, then the box will be displayed as a drop-down list.
        Returns:
        the visible item count
        Since:
        8.1
      • isEmptySelectionAllowed

        public boolean isEmptySelectionAllowed()
        Returns true if empty selection is allowed.
        Returns:
        empty selection is allowed
        Since:
        8.7
      • setEmptySelectionAllowed

        public void setEmptySelectionAllowed​(boolean emptySelectionAllowed)
        Sets true if empty selection is allowed.
        Parameters:
        emptySelectionAllowed -
        Since:
        8.7
      • 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