V
- type of valuepublic interface SuggestionField<V> extends Field<V>, Component.Focusable, HasInputPrompt, HasOptionsStyleProvider<V>, HasOptionCaptionProvider<V>, HasCaptionMode
Modifier and Type | Interface and Description |
---|---|
static interface |
SuggestionField.ArrowDownActionHandler
ARROW_DOWN key pressed listener.
|
static interface |
SuggestionField.EnterActionHandler
ENTER key pressed listener.
|
static class |
SuggestionField.OptionWrapper<V>
Represents a value and its string representation.
|
static interface |
SuggestionField.ParametrizedSearchExecutor<E>
Extended version of
SuggestionField.SearchExecutor that allows to pass parameters. |
static interface |
SuggestionField.SearchExecutor<E>
Custom suggestions search action interface.
|
Field.Validator<T>
HasValue.ValueChangeEvent<V>
Component.Alignment, Component.BelongToFrame, Component.Disposable, Component.Editable, Component.Focusable, Component.HasCaption, Component.HasDescription, Component.HasIcon, Component.HasXmlDescriptor, Component.OptionsStyleProvider, Component.Wrapper
HasContextHelp.ContextHelpIconClickEvent
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
NAME |
static java.lang.String |
POPUP_AUTO_WIDTH |
static java.lang.String |
POPUP_PARENT_WIDTH |
AUTO_SIZE, AUTO_SIZE_PX, FULL_SIZE, UNITS_PERCENTAGE, UNITS_PIXELS
Modifier and Type | Method and Description |
---|---|
SuggestionField.ArrowDownActionHandler |
getArrowDownActionHandler() |
int |
getAsyncSearchDelayMs() |
SuggestionField.EnterActionHandler |
getEnterActionHandler() |
int |
getMinSearchStringLength() |
java.lang.String |
getPopupWidth() |
SuggestionField.SearchExecutor |
getSearchExecutor() |
int |
getSuggestionsLimit() |
static <T> com.google.common.reflect.TypeToken<SuggestionField<T>> |
of(java.lang.Class<T> valueClass) |
void |
setArrowDownActionHandler(SuggestionField.ArrowDownActionHandler arrowDownActionHandler)
Sets
SuggestionField.ArrowDownActionHandler which handles ARROW_DOWN key pressing. |
void |
setAsyncSearchDelayMs(int asyncSearchDelayMs)
Sets delay between the last key press action and async search.
|
void |
setEnterActionHandler(SuggestionField.EnterActionHandler enterActionHandler)
Sets
SuggestionField.EnterActionHandler which handles ENTER key pressing. |
void |
setMinSearchStringLength(int minSearchStringLength)
Sets min string length which is required to perform suggestions search.
|
void |
setPopupWidth(java.lang.String width)
Sets the given
width to the component popup. |
void |
setSearchExecutor(SuggestionField.SearchExecutor searchExecutor)
Sets
SuggestionField.SearchExecutor which performs search. |
void |
setSuggestionsLimit(int suggestionsLimit)
Sets limit of suggestions which will be shown.
|
void |
showSuggestions(java.util.List<V> suggestions)
Show passed suggestions in popup.
|
addValidator, addValidators, getRequiredMessage, getValidators, isRequired, removeValidator, setRequired, setRequiredMessage
getDatasource, getMetaProperty, getMetaPropertyPath, setDatasource
addValueChangeListener, clear, getEmptyValue, getValue, isEmpty, removeValueChangeListener, setValue
addStyleName, getAlignment, getHeight, getHeightSizeUnit, getHeightUnits, getId, getParent, getStyleName, getWidth, getWidthSizeUnit, getWidthUnits, isEnabled, isEnabledItself, isEnabledRecursive, isResponsive, isVisible, isVisibleItself, isVisibleRecursive, removeStyleName, requestFocus, setAlignment, setEnabled, setHeight, setHeightAuto, setHeightFull, setId, setParent, setResponsive, setSizeAuto, setSizeFull, setStyleName, setVisible, setWidth, setWidthAuto, setWidthFull, unwrap, unwrapComposition
getValueSource, setValueSource
isEditable, isEditableWithParent, setEditable
getFrame, setFrame
isValid, isValidateOnCommit, validate
getIcon, setIcon, setIconFromSet
getContextHelpIconClickHandler, getContextHelpText, isContextHelpTextHtmlEnabled, setContextHelpIconClickHandler, setContextHelpText, setContextHelpTextHtmlEnabled
isCaptionAsHtml, setCaptionAsHtml
getCaption, setCaption
getDescription, setDescription
isDescriptionAsHtml, setDescriptionAsHtml
focus, getTabIndex, isFocusable, setFocusable, setTabIndex
getInputPrompt, setInputPrompt
getOptionsStyleProvider, getOptionStyleProvider, setOptionsStyleProvider, setOptionStyleProvider
getOptionCaptionProvider, setOptionCaptionProvider
getCaptionMode, getCaptionProperty, setCaptionMode, setCaptionProperty
static final java.lang.String NAME
static final java.lang.String POPUP_AUTO_WIDTH
static final java.lang.String POPUP_PARENT_WIDTH
static <T> com.google.common.reflect.TypeToken<SuggestionField<T>> of(java.lang.Class<T> valueClass)
int getAsyncSearchDelayMs()
void setAsyncSearchDelayMs(int asyncSearchDelayMs)
asyncSearchDelayMs
- delay in msSuggestionField.SearchExecutor getSearchExecutor()
SuggestionField.SearchExecutor
which performs searchvoid setSearchExecutor(SuggestionField.SearchExecutor searchExecutor)
SuggestionField.SearchExecutor
which performs search.searchExecutor
- SearchExecutor instanceSuggestionField.EnterActionHandler getEnterActionHandler()
SuggestionField.EnterActionHandler
which handles ENTER key pressingvoid setEnterActionHandler(SuggestionField.EnterActionHandler enterActionHandler)
SuggestionField.EnterActionHandler
which handles ENTER key pressing.enterActionHandler
- EnterActionHandler instanceSuggestionField.ArrowDownActionHandler getArrowDownActionHandler()
SuggestionField.ArrowDownActionHandler
which handles ARROW_DOWN key pressingvoid setArrowDownActionHandler(SuggestionField.ArrowDownActionHandler arrowDownActionHandler)
SuggestionField.ArrowDownActionHandler
which handles ARROW_DOWN key pressing.arrowDownActionHandler
- ArrowDownActionHandler instanceint getMinSearchStringLength()
void setMinSearchStringLength(int minSearchStringLength)
minSearchStringLength
- required string length to perform searchint getSuggestionsLimit()
void setSuggestionsLimit(int suggestionsLimit)
suggestionsLimit
- integer limit valuevoid showSuggestions(java.util.List<V> suggestions)
suggestions
- suggestions to showvoid setPopupWidth(java.lang.String width)
width
to the component popup. There are two predefined settings available:
POPUP_AUTO_WIDTH
and POPUP_PARENT_WIDTH
.width
- width of the component popupjava.lang.String getPopupWidth()