Class Dropdown

java.lang.Object
com.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.Widget
com.google.gwt.user.client.ui.Panel
com.google.gwt.user.client.ui.ComplexPanel
com.google.gwt.user.client.ui.CellPanel
com.google.gwt.user.client.ui.HorizontalPanel
cn.mapway.ui.client.widget.Dropdown
All Implemented Interfaces:
IOptionProviderCallback, IErrorMessage, IData, com.google.gwt.event.dom.client.ClickHandler, com.google.gwt.event.logical.shared.HasAttachHandlers, com.google.gwt.event.logical.shared.HasValueChangeHandlers, com.google.gwt.event.shared.EventHandler, com.google.gwt.event.shared.HasHandlers, com.google.gwt.user.client.EventListener, com.google.gwt.user.client.TakesValue, com.google.gwt.user.client.ui.HasAlignment, com.google.gwt.user.client.ui.HasHorizontalAlignment, com.google.gwt.user.client.ui.HasValue, com.google.gwt.user.client.ui.HasVerticalAlignment, com.google.gwt.user.client.ui.HasVisibility, com.google.gwt.user.client.ui.HasWidgets, com.google.gwt.user.client.ui.HasWidgets.ForIsWidget, com.google.gwt.user.client.ui.IndexedPanel, com.google.gwt.user.client.ui.IndexedPanel.ForIsWidget, com.google.gwt.user.client.ui.InsertPanel, com.google.gwt.user.client.ui.InsertPanel.ForIsWidget, com.google.gwt.user.client.ui.IsWidget, Iterable<com.google.gwt.user.client.ui.Widget>
Direct Known Subclasses:
LanguageDropdown

public class Dropdown extends com.google.gwt.user.client.ui.HorizontalPanel implements IOptionProviderCallback, IErrorMessage, com.google.gwt.event.logical.shared.HasValueChangeHandlers, com.google.gwt.event.dom.client.ClickHandler, IData, com.google.gwt.user.client.ui.HasValue
Dropdown
Author:
zhangjianshe <zhangjianshe@gmail.com>
  • 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

    Nested classes/interfaces inherited from interface com.google.gwt.user.client.ui.HasHorizontalAlignment

    com.google.gwt.user.client.ui.HasHorizontalAlignment.AutoHorizontalAlignmentConstant, com.google.gwt.user.client.ui.HasHorizontalAlignment.HorizontalAlignmentConstant

    Nested classes/interfaces inherited from interface com.google.gwt.user.client.ui.HasVerticalAlignment

    com.google.gwt.user.client.ui.HasVerticalAlignment.VerticalAlignmentConstant

    Nested classes/interfaces inherited from interface com.google.gwt.user.client.ui.HasWidgets

    com.google.gwt.user.client.ui.HasWidgets.ForIsWidget

    Nested classes/interfaces inherited from interface com.google.gwt.user.client.ui.IndexedPanel

    com.google.gwt.user.client.ui.IndexedPanel.ForIsWidget

    Nested classes/interfaces inherited from interface com.google.gwt.user.client.ui.InsertPanel

    com.google.gwt.user.client.ui.InsertPanel.ForIsWidget
  • Field Summary

    Fields inherited from class com.google.gwt.user.client.ui.UIObject

    DEBUG_ID_PREFIX

    Fields inherited from interface com.google.gwt.user.client.ui.HasHorizontalAlignment

    ALIGN_CENTER, ALIGN_DEFAULT, ALIGN_JUSTIFY, ALIGN_LEFT, ALIGN_LOCALE_END, ALIGN_LOCALE_START, ALIGN_RIGHT

    Fields inherited from interface com.google.gwt.user.client.ui.HasVerticalAlignment

    ALIGN_BOTTOM, ALIGN_MIDDLE, ALIGN_TOP
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    addItem(com.google.gwt.resources.client.ImageResource icon, String name, Object value)
     
    addItem(String iconFontUnicode, String name, Object value)
     
    addItem(String iconFontUnicode, String name, Object value, boolean enabled)
     
    com.google.gwt.event.shared.HandlerRegistration
    addValueChangeHandler(com.google.gwt.event.logical.shared.ValueChangeHandler handler)
     
    void
     
    void
    displayItem(ImageTextItem item, boolean fireEvents)
     
     
     
    int
     
    com.google.gwt.user.client.ui.Widget
    getItemWidget(int index)
     
     
     
    getValue(int index)
     
    void
    onClick(com.google.gwt.event.dom.client.ClickEvent event)
     
    void
     
    void
    setEnabled(boolean b)
     
    void
     
    void
    setIcon(com.google.gwt.resources.client.ImageResource resource)
     
    void
    setIcon(String unicode)
     
    void
     
    void
    setLabelWidth(int width)
     
    void
     
    void
     
    void
    setPopupMaxHeight(int maxHeight)
     
    void
    setSelectedIndex(int index)
     
    void
    setSelectedIndex(int index, boolean fireEvent)
     
    void
     
    void
    setTip(String text)
     
    void
    设置值为选中状态
    void
    setValue(Object value, boolean fireEvents)
     
    void
    updateUI(boolean fireEvents)
     

    Methods inherited from class com.google.gwt.user.client.ui.HorizontalPanel

    add, getHorizontalAlignment, getVerticalAlignment, insert, insert, onEnsureDebugId, remove, setHorizontalAlignment, setVerticalAlignment

    Methods inherited from class com.google.gwt.user.client.ui.CellPanel

    getBody, getSpacing, getTable, setBorderWidth, setCellHeight, setCellHeight, setCellHorizontalAlignment, setCellHorizontalAlignment, setCellHorizontalAlignment, setCellHorizontalAlignment, setCellVerticalAlignment, setCellVerticalAlignment, setCellVerticalAlignment, setCellVerticalAlignment, setCellWidth, setCellWidth, setSpacing

    Methods inherited from class com.google.gwt.user.client.ui.ComplexPanel

    add, add, adjustIndex, checkIndexBoundsForAccess, checkIndexBoundsForInsertion, getChildren, getWidget, getWidgetCount, getWidgetIndex, getWidgetIndex, insert, insert, iterator, remove

    Methods inherited from class com.google.gwt.user.client.ui.Panel

    add, adopt, doAttachChildren, doDetachChildren, orphan, remove

    Methods inherited from class com.google.gwt.user.client.ui.Widget

    addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onBrowserEvent, onDetach, 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, removeStyleDependentName, removeStyleName, resolvePotentialElement, 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

    Methods inherited from interface com.google.gwt.user.client.ui.IndexedPanel

    getWidget, getWidgetCount, getWidgetIndex, remove

    Methods inherited from interface com.google.gwt.user.client.ui.IndexedPanel.ForIsWidget

    getWidgetIndex

    Methods inherited from interface com.google.gwt.user.client.ui.InsertPanel.ForIsWidget

    add

    Methods inherited from interface java.lang.Iterable

    forEach, spliterator
  • Constructor Details

    • Dropdown

      public Dropdown()
  • Method Details

    • setPopupMaxHeight

      public void setPopupMaxHeight(int maxHeight)
    • setLabel

      public void setLabel(String txt)
    • setLabelWidth

      public void setLabelWidth(int width)
    • displayItem

      public void displayItem(ImageTextItem item, boolean fireEvents)
    • setIcon

      public void setIcon(com.google.gwt.resources.client.ImageResource resource)
    • setIcon

      public void setIcon(String unicode)
    • addItem

      public ImageTextItem addItem(com.google.gwt.resources.client.ImageResource icon, String name, Object value)
    • addItem

      public ImageTextItem addItem(String iconFontUnicode, String name, Object value)
    • addItem

      public ImageTextItem addItem(String iconFontUnicode, String name, Object value, boolean enabled)
    • clear

      public void clear()
      Specified by:
      clear in interface com.google.gwt.user.client.ui.HasWidgets
      Overrides:
      clear in class com.google.gwt.user.client.ui.Panel
    • getItemCount

      public int getItemCount()
    • getItemWidget

      public com.google.gwt.user.client.ui.Widget getItemWidget(int index)
    • setErrorMessage

      public void setErrorMessage(String message)
      Specified by:
      setErrorMessage in interface IErrorMessage
    • setText

      public void setText(String text)
    • onClick

      public void onClick(com.google.gwt.event.dom.client.ClickEvent event)
      Specified by:
      onClick in interface com.google.gwt.event.dom.client.ClickHandler
    • setTip

      public void setTip(String text)
    • setSelectedIndex

      public void setSelectedIndex(int index)
    • setSelectedIndex

      public void setSelectedIndex(int index, boolean fireEvent)
    • getValue

      public Object getValue(int index)
    • getValue

      public Object getValue()
      Specified by:
      getValue in interface com.google.gwt.user.client.ui.HasValue
      Specified by:
      getValue in interface com.google.gwt.user.client.TakesValue
    • getSelectedText

      public String getSelectedText()
    • setValue

      public void setValue(Object value)
      设置值为选中状态
      Specified by:
      setValue in interface com.google.gwt.user.client.ui.HasValue
      Specified by:
      setValue in interface com.google.gwt.user.client.TakesValue
      Parameters:
      value -
    • setValue

      public void setValue(Object value, boolean fireEvents)
      Specified by:
      setValue in interface com.google.gwt.user.client.ui.HasValue
    • updateUI

      public void updateUI(boolean fireEvents)
    • getCurrentData

      public Object getCurrentData()
    • setEnabled

      public void setEnabled(boolean b)
    • getData

      public Object getData()
      Specified by:
      getData in interface IData
    • setData

      public void setData(Object obj)
      Specified by:
      setData in interface IData
    • addValueChangeHandler

      public com.google.gwt.event.shared.HandlerRegistration addValueChangeHandler(com.google.gwt.event.logical.shared.ValueChangeHandler handler)
      Specified by:
      addValueChangeHandler in interface com.google.gwt.event.logical.shared.HasValueChangeHandlers
    • setOptionProvider

      public void setOptionProvider(IOptionProvider optionProvider)
    • setOptions

      public void setOptions(List<Option> options)
      Specified by:
      setOptions in interface IOptionProviderCallback