THIS
- Self-referential generic THISITEM
- the item object type in the listingpublic interface FluentComboBox<THIS extends FluentComboBox<THIS,ITEM>,ITEM> extends FluentAbstractSingleSelect<THIS,ITEM>, FluentHasValue<THIS,ITEM>, FluentFieldEvents.FluentBlurNotifier<THIS>, FluentFieldEvents.FluentFocusNotifier<THIS>, FluentHasFilterableDataProvider<THIS,ITEM,String>
ComboBox
ComboBox
FluentComponent.FluentFocusable<C extends FluentComponent.FluentFocusable<C>>
com.vaadin.ui.Component.ErrorEvent, com.vaadin.ui.Component.Event, com.vaadin.ui.Component.Focusable, com.vaadin.ui.Component.Listener
com.vaadin.server.ClientConnector.AttachEvent, com.vaadin.server.ClientConnector.AttachListener, com.vaadin.server.ClientConnector.ConnectorErrorEvent, com.vaadin.server.ClientConnector.DetachEvent, com.vaadin.server.ClientConnector.DetachListener
Modifier and Type | Method and Description |
---|---|
default THIS |
withDataProvider(com.vaadin.ui.ComboBox.CaptionFilter captionFilter,
com.vaadin.data.provider.ListDataProvider<ITEM> listDataProvider)
Sets a list data provider with an item caption filter as the data
provider of this combo box.
|
default THIS |
withDataProvider(com.vaadin.data.provider.ListDataProvider<ITEM> listDataProvider)
Sets a list data provider as the data provider of this combo box.
|
default THIS |
withEmptySelectionAllowed(boolean emptySelectionAllowed)
Sets whether the user is allowed to select nothing in the combo box.
|
default THIS |
withEmptySelectionCaption(String caption)
Sets the empty selection caption.
|
default THIS |
withItemCaptionGenerator(com.vaadin.ui.ItemCaptionGenerator<ITEM> itemCaptionGenerator)
Sets the item caption generator that is used to produce the strings shown
in the combo box for each item.
|
default THIS |
withItemIconGenerator(com.vaadin.ui.IconGenerator<ITEM> itemIconGenerator) |
default THIS |
withItems(com.vaadin.ui.ComboBox.CaptionFilter captionFilter,
Collection<ITEM> items)
Sets the data items of this listing and a simple string filter with which
the item string and the text the user has input are compared.
|
default THIS |
withItems(com.vaadin.ui.ComboBox.CaptionFilter captionFilter,
ITEM... items)
Sets the data items of this listing and a simple string filter with which
the item string and the text the user has input are compared.
|
default THIS |
withPageLength(int pageLength)
Sets the page length for the suggestion popup.
|
default THIS |
withPlaceholder(String placeholder)
Sets the placeholder string - a textual prompt that is displayed when the
select would otherwise be empty, to prompt the user for input.
|
default THIS |
withTextInputAllowed(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.
|
withSelectedItem, withSelectionListener, withValueChangeListener
withCaption, withCaptionAsHtml, withComponentError, withData, withDescription, withDescription, withLocale, withResponsive, withShortcutListener, withStyleName
withAttachListener, withDetachListener
withContextClickListener
addContextClickListener, removeContextClickListener
withItems, withItems, withItems
getDataProvider, setItems, setItems, setItems
withTabIndex
withCaption, withEnabled, withIcon, withId, withParent, withPrimaryStyleName, withStyleName, withStyleName, withVisible
addListener, addStyleName, addStyleNames, attach, getCaption, getDescription, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getUI, isEnabled, isVisible, readDesign, removeListener, removeStyleName, removeStyleNames, setCaption, setEnabled, setIcon, setId, setParent, setPrimaryStyleName, setStyleName, setVisible, writeDesign
addAttachListener, addDetachListener, beforeClientResponse, detach, encodeState, getErrorHandler, getExtensions, getRpcManager, getStateType, handleConnectorRequest, isAttached, isConnectorEnabled, markAsDirty, markAsDirtyRecursive, removeAttachListener, removeDetachListener, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler
withFullHeight, withFullSize, withFullWidth, withHeight, withHeight, withSize, withUndefinedHeight, withUndefinedSize, withUndefinedWidth, withWidth, withWidth
getHeight, getHeightUnits, getWidth, getWidthUnits, setHeight, setHeight, setHeightUndefined, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthUndefined
withReadOnly, withRequiredIndicatorVisible, withValue
addValueChangeListener, clear, getDefaultValidator, getEmptyValue, getOptionalValue, getValue, isEmpty, isReadOnly, isRequiredIndicatorVisible, setReadOnly, setRequiredIndicatorVisible, setValue
withBlurListener
withFocusListener
withDataProvider, withDataProvider
default THIS withItemCaptionGenerator(com.vaadin.ui.ItemCaptionGenerator<ITEM> itemCaptionGenerator)
String.valueOf(Object)
is used.itemCaptionGenerator
- the item caption provider to use, not nullComboBox.setItemCaptionGenerator(ItemCaptionGenerator)
default THIS withItemIconGenerator(com.vaadin.ui.IconGenerator<ITEM> itemIconGenerator)
itemIconGenerator
- the item icon generator to set, not nullIconGenerator
,
AbstractListing.setItemIconGenerator(IconGenerator)
default THIS withEmptySelectionAllowed(boolean emptySelectionAllowed)
emptySelectionAllowed
- true to allow not selecting anything, false to require
selectionComboBox.setEmptySelectionAllowed(boolean)
default THIS withEmptySelectionCaption(String caption)
The empty string ""
is the default empty selection caption.
If empty selection is allowed via the
ComboBox.setEmptySelectionAllowed(boolean)
method (it is by default) then
the empty item will be shown with the given caption.
caption
- the caption to set, not null
ComboBox.setEmptySelectionCaption(String)
,
AbstractSingleSelect.isSelected(Object)
default THIS withPageLength(int pageLength)
pageLength
- the pageLength to setComboBox.setPageLength(int)
default THIS withPlaceholder(String placeholder)
placeholder
- the desired placeholder, or null to disableComboBox.setPlaceholder(String)
default THIS withTextInputAllowed(boolean textInputAllowed)
NativeSelect
textInputAllowed
- true to allow entering text, false to just show the current
selectionComboBox.setTextInputAllowed(boolean)
default THIS withDataProvider(com.vaadin.data.provider.ListDataProvider<ITEM> listDataProvider)
Note that this is a shorthand that calls
HasFilterableDataProvider.setDataProvider(DataProvider)
with a wrapper of the provided
list data provider. This means that HasItems.getDataProvider()
will
return the wrapper instead of the original list data provider.
listDataProvider
- the list data provider to use, not null
ComboBox.setDataProvider(ListDataProvider)
default THIS withDataProvider(com.vaadin.ui.ComboBox.CaptionFilter captionFilter, com.vaadin.data.provider.ListDataProvider<ITEM> listDataProvider)
captionFilter
- filter to check if an item is shown when user typed some text
into the ComboBoxlistDataProvider
- the list data provider to use, not null
ComboBox.setDataProvider(CaptionFilter, ListDataProvider)
default THIS withItems(com.vaadin.ui.ComboBox.CaptionFilter captionFilter, ITEM... items)
Note that unlike HasItems.setItems(Collection)
, no automatic case
conversion is performed before the comparison.
captionFilter
- filter to check if an item is shown when user typed some text
into the ComboBoxitems
- the data items to displayComboBox.setItems(CaptionFilter, Object...)
default THIS withItems(com.vaadin.ui.ComboBox.CaptionFilter captionFilter, Collection<ITEM> items)
Note that unlike HasItems.setItems(Collection)
, no automatic case
conversion is performed before the comparison.
captionFilter
- filter to check if an item is shown when user typed some text
into the ComboBoxitems
- the data items to displayComboBox.setItems(CaptionFilter, Collection)
Copyright © 2017 Jean-Christophe Fortier. All rights reserved.