com.vaadin.client.ui.

Class VNativeSelect

  • All Implemented Interfaces:

    com.google.gwt.event.dom.client.HasAllFocusHandlers, com.google.gwt.event.dom.client.HasBlurHandlers, com.google.gwt.event.dom.client.HasFocusHandlers, com.google.gwt.event.logical.shared.HasAttachHandlers, 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, Focusable

    public class VNativeSelect
    extends FocusableFlowPanelComposite

    The client-side widget for the NativeSelect component.

    Author:

    Vaadin Ltd.

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