Interface SuggestionFieldComponent<V,I>

Type Parameters:
V - value type - collection or not
I - item type
All Superinterfaces:
Component, Component.BelongToFrame, Component.Editable, Component.Focusable, Component.HasCaption, Component.HasDescription, Component.HasIcon, Field<V>, HasContextHelp, HasEnterPressHandler, HasFormatter<I>, HasHtmlCaption, HasHtmlDescription, HasHtmlSanitizer, HasInputPrompt, HasOptionStyleProvider<I>, HasValidator<V>, HasValue<V>, HasValueSource<V>, Requirable, Validatable
All Known Subinterfaces:
EntitySuggestionField<V>, SuggestionField<V>, TagField<V>
All Known Implementing Classes:
AbstractSuggestionField, EntitySuggestionFieldImpl, SuggestionFieldImpl, TagFieldImpl

public interface SuggestionFieldComponent<V,I> extends Field<V>, Component.Focusable, HasInputPrompt, HasOptionStyleProvider<I>, HasFormatter<I>, HasEnterPressHandler
Base interface for SuggestionField components.
  • Field Details

  • Method Details

    • getAsyncSearchDelayMs

      int getAsyncSearchDelayMs()
      Returns:
      delay between the last key press action and async search
    • setAsyncSearchDelayMs

      @StudioProperty(defaultValue="300") void setAsyncSearchDelayMs(int asyncSearchDelayMs)
      Sets delay between the last key press action and async search.
      Parameters:
      asyncSearchDelayMs - delay in ms
    • getSearchExecutor

      @Nullable SuggestionFieldComponent.SearchExecutor<I> getSearchExecutor()
      Returns:
      SuggestionFieldComponent.SearchExecutor which performs search
    • setSearchExecutor

      void setSearchExecutor(@Nullable SuggestionFieldComponent.SearchExecutor<I> searchExecutor)
      Sets SuggestionFieldComponent.SearchExecutor which performs search.
      Parameters:
      searchExecutor - SearchExecutor instance
    • getArrowDownHandler

      @Nullable Consumer<SuggestionFieldComponent.ArrowDownEvent> getArrowDownHandler()
      Returns:
      an ARROW_DOWN press handler
    • setArrowDownHandler

      void setArrowDownHandler(@Nullable Consumer<SuggestionFieldComponent.ArrowDownEvent> handler)
      Sets an ARROW_DOWN press handler.
      Parameters:
      handler - an ARROW_DOWN press handler to set
    • getMinSearchStringLength

      int getMinSearchStringLength()
      Returns:
      min string length to perform suggestions search
    • setMinSearchStringLength

      @StudioProperty(defaultValue="0") void setMinSearchStringLength(int minSearchStringLength)
      Sets min string length which is required to perform suggestions search.
      Parameters:
      minSearchStringLength - required string length to perform search
    • getSuggestionsLimit

      int getSuggestionsLimit()
      Returns:
      limit of suggestions which will be shown
    • setSuggestionsLimit

      @StudioProperty(defaultValue="10") void setSuggestionsLimit(int suggestionsLimit)
      Sets limit of suggestions which will be shown.
      Parameters:
      suggestionsLimit - integer limit value
    • showSuggestions

      void showSuggestions(List<I> suggestions)
      Show passed suggestions in popup.
      Parameters:
      suggestions - suggestions to show
    • setPopupWidth

      @StudioProperty(name="popupWidth", defaultValue="auto", type=STRING, options={"auto","parent"}) void setPopupWidth(String width)
      Sets the given width to the component popup. There are two predefined settings available: POPUP_AUTO_WIDTH and POPUP_PARENT_WIDTH.
      Parameters:
      width - width of the component popup
    • getPopupWidth

      String getPopupWidth()
      Returns:
      component popup width