Package com.storedobject.vaadin.util
Class BasicComboBox<T>
java.lang.Object
com.vaadin.flow.component.Component
com.vaadin.flow.component.AbstractField<com.vaadin.flow.component.combobox.ComboBox<T>,T>
com.vaadin.flow.component.AbstractSinglePropertyField<com.vaadin.flow.component.combobox.ComboBox<T>,T>
com.vaadin.flow.component.combobox.ComboBoxBase<com.vaadin.flow.component.combobox.ComboBox<T>,T,T>
com.vaadin.flow.component.combobox.ComboBox<T>
com.storedobject.vaadin.ComboField<T>
com.storedobject.vaadin.util.BasicComboBox<T>
- Type Parameters:
T- The type of items contained in the combo box.
- All Implemented Interfaces:
SpellCheck,com.vaadin.flow.component.AttachNotifier,com.vaadin.flow.component.BlurNotifier<com.vaadin.flow.component.combobox.ComboBox<T>>,com.vaadin.flow.component.DetachNotifier,com.vaadin.flow.component.Focusable<com.vaadin.flow.component.combobox.ComboBox<T>>,com.vaadin.flow.component.FocusNotifier<com.vaadin.flow.component.combobox.ComboBox<T>>,com.vaadin.flow.component.HasAriaLabel,com.vaadin.flow.component.HasElement,com.vaadin.flow.component.HasEnabled,com.vaadin.flow.component.HasHelper,com.vaadin.flow.component.HasLabel,com.vaadin.flow.component.HasPlaceholder,com.vaadin.flow.component.HasSize,com.vaadin.flow.component.HasStyle,com.vaadin.flow.component.HasTheme,com.vaadin.flow.component.HasValidation,com.vaadin.flow.component.HasValue<com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<com.vaadin.flow.component.combobox.ComboBox<T>,,T>, T> com.vaadin.flow.component.HasValueAndElement<com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<com.vaadin.flow.component.combobox.ComboBox<T>,,T>, T> com.vaadin.flow.component.shared.HasAllowedCharPattern,com.vaadin.flow.component.shared.HasAutoOpen,com.vaadin.flow.component.shared.HasClearButton,com.vaadin.flow.component.shared.HasClientValidation,com.vaadin.flow.component.shared.HasOverlayClassName,com.vaadin.flow.component.shared.HasPrefix,com.vaadin.flow.component.shared.HasThemeVariant<com.vaadin.flow.component.combobox.ComboBoxVariant>,com.vaadin.flow.component.shared.HasTooltip,com.vaadin.flow.component.shared.HasValidationProperties,com.vaadin.flow.component.shared.InputField<com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<com.vaadin.flow.component.combobox.ComboBox<T>,,T>, T> com.vaadin.flow.data.binder.HasValidator<T>,com.vaadin.flow.data.provider.HasDataView<T,,String, com.vaadin.flow.component.combobox.dataview.ComboBoxDataView<T>> com.vaadin.flow.data.provider.HasLazyDataView<T,,String, com.vaadin.flow.component.combobox.dataview.ComboBoxLazyDataView<T>> com.vaadin.flow.data.provider.HasListDataView<T,,com.vaadin.flow.component.combobox.dataview.ComboBoxListDataView<T>> Serializable
BasicComboBox is a specific implementation of a ComboField allowing for the creation of combo boxes
with various constructors for initialization. This class provides initialization logic
tailored to set certain default behaviors such as disallowing custom values and requiring a value to be set.
- Author:
- Syam
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.vaadin.flow.component.combobox.ComboBox
com.vaadin.flow.component.combobox.ComboBox.ComboBoxI18n, com.vaadin.flow.component.combobox.ComboBox.FetchItemsCallback<T>, com.vaadin.flow.component.combobox.ComboBox.ItemFilter<T>Nested classes/interfaces inherited from class com.vaadin.flow.component.combobox.ComboBoxBase
com.vaadin.flow.component.combobox.ComboBoxBase.CustomValueSetEvent<TComponent extends com.vaadin.flow.component.combobox.ComboBoxBase<TComponent,?, ?>>, com.vaadin.flow.component.combobox.ComboBoxBase.SpringData Nested classes/interfaces inherited from class com.vaadin.flow.component.AbstractField
com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<C extends com.vaadin.flow.component.Component,V> Nested classes/interfaces inherited from interface com.vaadin.flow.component.BlurNotifier
com.vaadin.flow.component.BlurNotifier.BlurEvent<C extends com.vaadin.flow.component.Component>Nested classes/interfaces inherited from interface com.vaadin.flow.component.FocusNotifier
com.vaadin.flow.component.FocusNotifier.FocusEvent<C extends com.vaadin.flow.component.Component>Nested classes/interfaces inherited from interface com.vaadin.flow.component.shared.HasClientValidation
com.vaadin.flow.component.shared.HasClientValidation.ClientValidatedEventNested classes/interfaces inherited from interface com.vaadin.flow.component.HasValue
com.vaadin.flow.component.HasValue.ValueChangeEvent<V>, com.vaadin.flow.component.HasValue.ValueChangeListener<E extends com.vaadin.flow.component.HasValue.ValueChangeEvent<?>> -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a new instance of BasicComboBox with default configurations.BasicComboBox(String label) Constructs a BasicComboBox with a specified label.BasicComboBox(String label, Collection<T> items) Constructs a BasicComboBox with a specified label and collection of items.BasicComboBox(String label, T... items) Constructs a BasicComboBox with a label and a variable number of items.BasicComboBox(Collection<T> items) Constructs a BasicComboBox with the specified collection of items. -
Method Summary
Methods inherited from class com.storedobject.vaadin.ComboField
addItems, addItems, addItems, getEmptyValue, getIndex, getIndex, getValue, items, removeItems, removeItems, removeItems, setIndex, setItems, sizeMethods inherited from class com.vaadin.flow.component.combobox.ComboBox
getI18n, getPattern, isSelected, refreshValue, setI18n, setOverlayWidth, setOverlayWidth, setPattern, setRequiredIndicatorVisibleMethods inherited from class com.vaadin.flow.component.combobox.ComboBoxBase
addCustomValueSetListener, generateClassName, generateLabel, getAriaLabel, getAriaLabelledBy, getDataCommunicator, getDataController, getDataGenerator, getDataProvider, getDefaultValidator, getFilter, getGenericDataView, getItemClassNameGenerator, getItemLabelGenerator, getKeyMapper, getLazyDataView, getListDataView, getPageSize, getRenderManager, isAllowCustomValue, isAutofocus, isOpened, isRequired, isRequiredIndicatorVisible, onAttach, onDetach, runBeforeClientResponse, setAllowCustomValue, setAriaLabel, setAriaLabelledBy, setAutofocus, setClassNameGenerator, setDataProvider, setDataProvider, setFilter, setI18n, setItemLabelGenerator, setItems, setItems, setItems, setItems, setItems, setItems, setItems, setItems, setItems, setItems, setItems, setItemsPageable, setItemsPageable, setItemsWithFilterConverter, setItemsWithFilterConverter, setManualValidation, setOpened, setPageSize, setRenderer, setRequired, setValue, validateMethods inherited from class com.vaadin.flow.component.AbstractSinglePropertyField
getSynchronizationRegistration, hasValidValue, setPresentationValue, setSynchronizedEventMethods inherited from class com.vaadin.flow.component.AbstractField
addValueChangeListener, getValue, isEmpty, setModelValue, valueEqualsMethods inherited from class com.vaadin.flow.component.Component
addListener, findAncestor, fireEvent, from, get, getChildren, getElement, getEventBus, getId, getListeners, getLocale, getParent, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, onEnabledStateChanged, removeFromParent, scrollIntoView, scrollIntoView, set, setElement, setId, setVisibleMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.vaadin.flow.component.AttachNotifier
addAttachListenerMethods inherited from interface com.vaadin.flow.component.BlurNotifier
addBlurListenerMethods inherited from interface com.vaadin.flow.component.DetachNotifier
addDetachListenerMethods inherited from interface com.vaadin.flow.component.Focusable
addFocusShortcut, blur, focus, getTabIndex, setTabIndexMethods inherited from interface com.vaadin.flow.component.FocusNotifier
addFocusListenerMethods inherited from interface com.vaadin.flow.component.shared.HasAllowedCharPattern
getAllowedCharPattern, setAllowedCharPatternMethods inherited from interface com.vaadin.flow.component.shared.HasAutoOpen
isAutoOpen, setAutoOpenMethods inherited from interface com.vaadin.flow.component.shared.HasClearButton
isClearButtonVisible, setClearButtonVisibleMethods inherited from interface com.vaadin.flow.component.shared.HasClientValidation
addClientValidatedEventListenerMethods inherited from interface com.vaadin.flow.component.HasElement
getElementMethods inherited from interface com.vaadin.flow.component.HasEnabled
isEnabled, setEnabledMethods inherited from interface com.vaadin.flow.component.HasHelper
getHelperComponent, getHelperText, setHelperComponent, setHelperTextMethods inherited from interface com.vaadin.flow.component.HasLabel
getLabel, setLabelMethods inherited from interface com.vaadin.flow.component.shared.HasOverlayClassName
getOverlayClassName, setOverlayClassNameMethods inherited from interface com.vaadin.flow.component.HasPlaceholder
getPlaceholder, setPlaceholderMethods inherited from interface com.vaadin.flow.component.shared.HasPrefix
getPrefixComponent, setPrefixComponentMethods inherited from interface com.vaadin.flow.component.HasSize
getHeight, getHeightUnit, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getWidth, getWidthUnit, setHeight, setHeight, setHeightFull, setMaxHeight, setMaxHeight, setMaxWidth, setMaxWidth, setMinHeight, setMinHeight, setMinWidth, setMinWidth, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthFullMethods inherited from interface com.vaadin.flow.component.HasStyle
addClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassNameMethods inherited from interface com.vaadin.flow.component.HasTheme
addThemeName, addThemeNames, getThemeName, getThemeNames, hasThemeName, removeThemeName, removeThemeNames, setThemeName, setThemeNameMethods inherited from interface com.vaadin.flow.component.shared.HasThemeVariant
addThemeVariants, removeThemeVariantsMethods inherited from interface com.vaadin.flow.component.shared.HasTooltip
getTooltip, setTooltipTextMethods inherited from interface com.vaadin.flow.component.shared.HasValidationProperties
getErrorMessage, isInvalid, setErrorMessage, setInvalidMethods inherited from interface com.vaadin.flow.data.binder.HasValidator
addValidationStatusChangeListenerMethods inherited from interface com.vaadin.flow.component.HasValue
addValueChangeListener, clear, getOptionalValue, getValue, isEmptyMethods inherited from interface com.vaadin.flow.component.HasValueAndElement
isReadOnly, setReadOnlyMethods inherited from interface com.storedobject.vaadin.SpellCheck
setSpellCheck
-
Constructor Details
-
BasicComboBox
public BasicComboBox()Constructs a new instance of BasicComboBox with default configurations. This constructor initializes the combo box by calling the superclass's no-argument constructor and then sets up default behavior by invoking the init method. -
BasicComboBox
Constructs a BasicComboBox with a specified label. The label represents the text associated with the combo box. This constructor initializes the combo box with default behaviors such as disallowing custom values to be input and requiring a value to be set.- Parameters:
label- the label text associated with the combo box
-
BasicComboBox
Constructs a BasicComboBox with the specified collection of items.- Parameters:
items- The collection of items to be included in the combo box.
-
BasicComboBox
Constructs a BasicComboBox with a specified label and collection of items.- Parameters:
label- the label of the combo boxitems- the collection of items to populate the combo box
-
BasicComboBox
Constructs a BasicComboBox with a label and a variable number of items. This constructor initializes the combo box with the provided label and items, while also applying default settings through the init method.- Parameters:
label- The label for the combo box.items- A variable number of items to be included in the combo box.
-