Class JmixSuggestionFieldWidget

java.lang.Object
com.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.Widget
com.google.gwt.user.client.ui.Composite
io.jmix.ui.widget.client.suggestionfield.JmixSuggestionFieldWidget
All Implemented Interfaces:
com.google.gwt.event.dom.client.HasAllKeyHandlers, com.google.gwt.event.dom.client.HasKeyDownHandlers, com.google.gwt.event.dom.client.HasKeyPressHandlers, com.google.gwt.event.dom.client.HasKeyUpHandlers, com.google.gwt.event.logical.shared.HasAttachHandlers, com.google.gwt.event.logical.shared.HasSelectionHandlers<JmixSuggestionFieldWidget.Suggestion>, com.google.gwt.event.logical.shared.HasValueChangeHandlers<String>, com.google.gwt.event.shared.HasHandlers, com.google.gwt.user.client.EventListener, com.google.gwt.user.client.TakesValue<String>, com.google.gwt.user.client.ui.Focusable, com.google.gwt.user.client.ui.HasEnabled, com.google.gwt.user.client.ui.HasValue<String>, com.google.gwt.user.client.ui.HasVisibility, com.google.gwt.user.client.ui.IsRenderable, com.google.gwt.user.client.ui.IsWidget
Direct Known Subclasses:
JmixTagFieldWidget

public class JmixSuggestionFieldWidget extends com.google.gwt.user.client.ui.Composite implements com.google.gwt.user.client.ui.HasEnabled, com.google.gwt.user.client.ui.Focusable, com.google.gwt.event.dom.client.HasAllKeyHandlers, com.google.gwt.user.client.ui.HasValue<String>, com.google.gwt.event.logical.shared.HasSelectionHandlers<JmixSuggestionFieldWidget.Suggestion>
  • Field Details

  • Constructor Details

    • JmixSuggestionFieldWidget

      public JmixSuggestionFieldWidget()
  • Method Details

    • setupComposition

      protected void setupComposition()
    • initTextField

      protected void initTextField()
    • createSuggestionPopup

      protected JmixSuggestionFieldWidget.SuggestionPopup createSuggestionPopup(SuggestionsContainer suggestionsContainer)
    • disableAutocompletion

      protected void disableAutocompletion()
    • setAsyncSearchDelayMs

      protected void setAsyncSearchDelayMs(int asyncSearchDelayMs)
    • setMinSearchStringLength

      protected void setMinSearchStringLength(int minSearchStringLength)
    • showSuggestions

      protected void showSuggestions(elemental.json.JsonArray suggestions, boolean userOriginated)
    • showSuggestions

      protected void showSuggestions(boolean userOriginated)
    • isSelectFirstSuggestionOnShow

      public boolean isSelectFirstSuggestionOnShow()
    • setSelectFirstSuggestionOnShow

      public void setSelectFirstSuggestionOnShow(boolean selectFirstSuggestionOnShow)
    • scheduleQuery

      protected void scheduleQuery(String query)
    • selectSuggestion

      protected void selectSuggestion()
    • selectSuggestion

      protected void selectSuggestion(JmixSuggestionFieldWidget.Suggestion newSuggestion)
    • searchSuggestions

      protected void searchSuggestions(String query)
    • isFocused

      public boolean isFocused()
    • getTabIndex

      public int getTabIndex()
      Specified by:
      getTabIndex in interface com.google.gwt.user.client.ui.Focusable
    • setTabIndex

      public void setTabIndex(int index)
      Specified by:
      setTabIndex in interface com.google.gwt.user.client.ui.Focusable
    • isEnabled

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

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

      public boolean isReadonly()
    • setReadonly

      public void setReadonly(boolean readonly)
    • cancelSearch

      protected void cancelSearch()
    • resetComponentState

      protected void resetComponentState()
    • setAccessKey

      public void setAccessKey(char key)
      Specified by:
      setAccessKey in interface com.google.gwt.user.client.ui.Focusable
    • setFocus

      public void setFocus(boolean focused)
      Specified by:
      setFocus in interface com.google.gwt.user.client.ui.Focusable
    • setValue

      public void setValue(String newValue)
      Specified by:
      setValue in interface com.google.gwt.user.client.ui.HasValue<String>
      Specified by:
      setValue in interface com.google.gwt.user.client.TakesValue<String>
    • setValue

      public void setValue(String value, boolean fireEvents)
      Specified by:
      setValue in interface com.google.gwt.user.client.ui.HasValue<String>
    • getValue

      public String getValue()
      Specified by:
      getValue in interface com.google.gwt.user.client.ui.HasValue<String>
      Specified by:
      getValue in interface com.google.gwt.user.client.TakesValue<String>
    • handleEnterKeyPressed

      protected void handleEnterKeyPressed(com.google.gwt.event.dom.client.KeyCodeEvent event)
    • handleArrowUpKeyPressed

      protected void handleArrowUpKeyPressed(com.google.gwt.event.dom.client.KeyCodeEvent event)
    • handleArrowDownKeyPressed

      protected void handleArrowDownKeyPressed(com.google.gwt.event.dom.client.KeyCodeEvent event)
    • isActive

      protected boolean isActive()
    • handleOnBlur

      protected void handleOnBlur(com.google.gwt.event.dom.client.BlurEvent event)
    • handleOnFocus

      protected void handleOnFocus(com.google.gwt.event.dom.client.FocusEvent event)
    • handleEscKeyPressed

      protected void handleEscKeyPressed(com.google.gwt.event.dom.client.KeyCodeEvent event)
    • preventEvent

      protected void preventEvent(com.google.gwt.event.dom.client.KeyCodeEvent event)
    • addKeyDownHandler

      public com.google.gwt.event.shared.HandlerRegistration addKeyDownHandler(com.google.gwt.event.dom.client.KeyDownHandler handler)
      Specified by:
      addKeyDownHandler in interface com.google.gwt.event.dom.client.HasKeyDownHandlers
    • addKeyPressHandler

      public com.google.gwt.event.shared.HandlerRegistration addKeyPressHandler(com.google.gwt.event.dom.client.KeyPressHandler handler)
      Specified by:
      addKeyPressHandler in interface com.google.gwt.event.dom.client.HasKeyPressHandlers
    • addKeyUpHandler

      public com.google.gwt.event.shared.HandlerRegistration addKeyUpHandler(com.google.gwt.event.dom.client.KeyUpHandler handler)
      Specified by:
      addKeyUpHandler in interface com.google.gwt.event.dom.client.HasKeyUpHandlers
    • addValueChangeHandler

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

      public com.google.gwt.event.shared.HandlerRegistration addSelectionHandler(com.google.gwt.event.logical.shared.SelectionHandler<JmixSuggestionFieldWidget.Suggestion> handler)
      Specified by:
      addSelectionHandler in interface com.google.gwt.event.logical.shared.HasSelectionHandlers<JmixSuggestionFieldWidget.Suggestion>
    • setInputPrompt

      public void setInputPrompt(String inputPrompt)
    • setPopupStyleName

      public void setPopupStyleName(List<String> styleName)
    • setPopupWidth

      public void setPopupWidth(String popupWidth)
    • getMarginBorderPaddingWidth

      protected static double getMarginBorderPaddingWidth(com.google.gwt.dom.client.Element element)