public interface LookupField<V> extends OptionsField<V,V>, HasInputPrompt, Buffered, LookupComponent, Component.Focusable, HasOptionsStyleProvider<V>
Modifier and Type | Interface and Description |
---|---|
static class |
LookupField.FilterMode |
static interface |
LookupField.FilterPredicate
A predicate that tests whether an item with the given caption matches to the given search string.
|
static interface |
LookupField.NewOptionHandler
Deprecated.
|
static interface |
LookupField.OptionIconProvider<T>
Deprecated.
|
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
LookupComponent.LookupSelectionChangeEvent<T extends Entity>, LookupComponent.LookupSelectionChangeNotifier<T extends Entity>
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
NAME |
static com.google.common.reflect.TypeToken<LookupField<java.lang.String>> |
TYPE_STRING |
AUTO_SIZE, AUTO_SIZE_PX, FULL_SIZE, UNITS_PERCENTAGE, UNITS_PIXELS
Modifier and Type | Method and Description |
---|---|
LookupField.FilterMode |
getFilterMode() |
LookupField.FilterPredicate |
getFilterPredicate() |
java.util.function.Consumer<java.lang.String> |
getNewOptionHandler() |
V |
getNullOption()
Deprecated.
Use
getNullSelectionCaption() instead |
java.lang.String |
getNullSelectionCaption() |
java.util.function.Function<? super V,java.lang.String> |
getOptionIconProvider() |
int |
getPageLength() |
boolean |
isNewOptionAllowed()
Deprecated.
|
boolean |
isNullOptionVisible() |
boolean |
isTextInputAllowed() |
static <T> com.google.common.reflect.TypeToken<LookupField<T>> |
of(java.lang.Class<T> valueClass) |
void |
setFilterMode(LookupField.FilterMode mode) |
void |
setFilterPredicate(LookupField.FilterPredicate filterPredicate)
Enables to setup how items should be filtered.
|
void |
setNewOptionAllowed(boolean newOptionAllowed)
Deprecated.
setting the new option handler enables new options
|
void |
setNewOptionHandler(java.util.function.Consumer<java.lang.String> newOptionHandler)
Sets the handler that is called when user types a new item.
|
void |
setNullOption(V nullOption)
Deprecated.
Use
setNullSelectionCaption(String) instead |
void |
setNullOptionVisible(boolean nullOptionVisible)
Sets visibility for first null element in suggestion popup.
|
void |
setNullSelectionCaption(java.lang.String nullOption)
Sets the null selection caption.
|
void |
setOptionIconProvider(java.lang.Class<V> optionClass,
java.util.function.Function<? super V,java.lang.String> optionIconProvider)
Deprecated.
|
void |
setOptionIconProvider(java.util.function.Function<? super V,java.lang.String> optionIconProvider)
Set the icon provider for the LookupField.
|
void |
setPageLength(int pageLength)
Sets the page length for the suggestion popup.
|
void |
setTextInputAllowed(boolean textInputAllowed)
Sets whether it is possible to input text into the field or whether the field area of the component is just used
to show what is selected.
|
getOptions, getOptionsDatasource, getOptionsEnum, getOptionsList, getOptionsMap, setOptions, setOptionsDatasource, setOptionsEnum, setOptionsList, setOptionsMap
addValidator, 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
getOptionCaptionProvider, setOptionCaptionProvider
getCaptionMode, getCaptionProperty, setCaptionMode, setCaptionProperty
getInputPrompt, setInputPrompt
commit, discard, isBuffered, isModified, setBuffered
getLookupSelectedItems, setLookupSelectHandler
focus, getTabIndex, isFocusable, setFocusable, setTabIndex
getOptionsStyleProvider, getOptionStyleProvider, setOptionsStyleProvider, setOptionStyleProvider
static final java.lang.String NAME
static final com.google.common.reflect.TypeToken<LookupField<java.lang.String>> TYPE_STRING
static <T> com.google.common.reflect.TypeToken<LookupField<T>> of(java.lang.Class<T> valueClass)
@Deprecated V getNullOption()
getNullSelectionCaption()
instead@Deprecated void setNullOption(V nullOption)
setNullSelectionCaption(String)
insteadjava.lang.String getNullSelectionCaption()
null
void setNullSelectionCaption(java.lang.String nullOption)
The empty string ""
is the default null selection caption.
If null selection is allowed then the null item will be shown with the given caption.
nullOption
- the caption to set, not null
LookupField.FilterMode getFilterMode()
void setFilterMode(LookupField.FilterMode mode)
@Deprecated boolean isNewOptionAllowed()
setNewOptionHandler(Consumer)
@Deprecated void setNewOptionAllowed(boolean newOptionAllowed)
setNewOptionHandler(Consumer)
boolean isTextInputAllowed()
void setTextInputAllowed(boolean textInputAllowed)
java.util.function.Consumer<java.lang.String> getNewOptionHandler()
void setNewOptionHandler(java.util.function.Consumer<java.lang.String> newOptionHandler)
newOptionHandler
- handler instanceint getPageLength()
void setPageLength(int pageLength)
pageLength
- the pageLength to setvoid setNullOptionVisible(boolean nullOptionVisible)
boolean isNullOptionVisible()
void setOptionIconProvider(java.util.function.Function<? super V,java.lang.String> optionIconProvider)
optionIconProvider
- provider which provides icons for options@Deprecated void setOptionIconProvider(java.lang.Class<V> optionClass, java.util.function.Function<? super V,java.lang.String> optionIconProvider)
setOptionIconProvider(Function)
optionClass
- class of the optionoptionIconProvider
- provider which provides icons for optionsjava.util.function.Function<? super V,java.lang.String> getOptionIconProvider()
void setFilterPredicate(LookupField.FilterPredicate filterPredicate)
filterPredicate
- items filter predicateLookupField.FilterPredicate getFilterPredicate()