public class EnumComboBox extends ComboBox
EnumContainer,
Serialized FormComboBox.ItemStyleGeneratorAbstractSelect.AbstractSelectTargetDetails, AbstractSelect.AcceptItem, AbstractSelect.CaptionChangeListener, AbstractSelect.DefaultNewItemHandler, AbstractSelect.Filtering, AbstractSelect.ItemCaptionMode, AbstractSelect.ItemDescriptionGenerator, AbstractSelect.NewItemHandler, AbstractSelect.TargetItemIs, AbstractSelect.VerticalLocationIsAbstractField.FocusShortcut, AbstractField.ReadOnlyStatusChangeEventContainer.Editor, Container.Filter, Container.Filterable, Container.Hierarchical, Container.Indexed, Container.ItemSetChangeListener, Container.ItemSetChangeNotifier, Container.Ordered, Container.PropertySetChangeListener, Container.PropertySetChangeNotifier, Container.SimpleFilterable, Container.Sortable, Container.ViewerComponent.ErrorEvent, Component.Event, Component.Focusable, Component.ListenerClientConnector.AttachEvent, ClientConnector.AttachListener, ClientConnector.ConnectorErrorEvent, ClientConnector.DetachEvent, ClientConnector.DetachListenerSizeable.UnitField.ValueChangeEventBuffered.SourceExceptionProperty.Editor, Property.ReadOnlyException, Property.ReadOnlyStatusChangeListener, Property.ReadOnlyStatusChangeNotifier, Property.Transactional<T>, Property.ValueChangeListener, Property.ValueChangeNotifier, Property.ViewerpageLengthITEM_CAPTION_MODE_EXPLICIT, ITEM_CAPTION_MODE_EXPLICIT_DEFAULTS_ID, ITEM_CAPTION_MODE_ICON_ONLY, ITEM_CAPTION_MODE_ID, ITEM_CAPTION_MODE_INDEX, ITEM_CAPTION_MODE_ITEM, ITEM_CAPTION_MODE_PROPERTY, itemIdMapper, itemsDESIGN_ATTR_PLAIN_TEXTFILTERINGMODE_CONTAINS, FILTERINGMODE_OFF, FILTERINGMODE_STARTSWITHSIZE_UNDEFINED, UNITS_CM, UNITS_EM, UNITS_EX, UNITS_INCH, UNITS_MM, UNITS_PERCENTAGE, UNITS_PICAS, UNITS_PIXELS, UNITS_POINTS| Constructor and Description |
|---|
EnumComboBox()
Default constructor.
|
EnumComboBox(Class<T> enumClass)
Convenience constructor.
|
EnumComboBox(Class<T> enumClass,
boolean allowNull)
Convenience constructor.
|
EnumComboBox(Class<T> enumClass,
String displayPropertyName)
Convenience constructor.
|
EnumComboBox(Class<T> enumClass,
String displayPropertyName,
boolean allowNull)
Convenience constructor.
|
EnumComboBox(EnumContainer<?> container,
String displayPropertyName,
boolean allowNull)
Primary constructor.
|
| Modifier and Type | Method and Description |
|---|---|
<T extends Enum<T>> |
setEnumDataSource(Class<T> enumClass)
Set the
Enum type whose instances serve as this instance's data source. |
addBlurListener, addFocusListener, addListener, addListener, buildFilter, changeVariables, containerItemSetChange, getFilteredOptions, getFilteringMode, getInputPrompt, getItemStyleGenerator, getOptionsWithFilter, getPageLength, getPopupWidth, getState, isMultiSelect, isScrollToSelectedItem, isTextInputAllowed, paintContent, removeBlurListener, removeFocusListener, removeListener, removeListener, setFilteringMode, setInputPrompt, setItemStyleGenerator, setMultiSelect, setPageLength, setPopupWidth, setScrollToSelectedItem, setTextInputAllowedaddContainerProperty, addItem, addItem, addItems, addItems, addItemSetChangeListener, addListener, addListener, addPropertySetChangeListener, attach, containerPropertySetChange, containsId, detach, fireItemSetChange, firePropertySetChange, getCaptionChangeListener, getContainerDataSource, getContainerProperty, getContainerPropertyIds, getItem, getItemCaption, getItemCaptionMode, getItemCaptionPropertyId, getItemIcon, getItemIconPropertyId, getItemIds, getListeners, getNewItemHandler, getNullSelectionItemId, getType, getType, getValue, getVisibleItemIds, isEmpty, isNewItemsAllowed, isNullSelectionAllowed, isSelected, paintItem, readDesign, readItem, readItems, removeAllItems, removeContainerProperty, removeItem, removeItemSetChangeListener, removeListener, removeListener, removePropertySetChangeListener, sanitizeSelection, select, setContainerDataSource, setItemCaption, setItemCaptionMode, setItemCaptionPropertyId, setItemIcon, setItemIconPropertyId, setNewItemHandler, setNewItemsAllowed, setNullSelectionAllowed, setNullSelectionItemId, setValue, setValue, size, unselect, writeDesign, writeItem, writeItemsaddListener, addListener, addReadOnlyStatusChangeListener, addValidator, addValueChangeListener, beforeClientResponse, clear, commit, discard, fireReadOnlyStatusChange, fireValueChange, focus, getConversionError, getConversionError, getConvertedValue, getConverter, getCurrentBufferedSourceException, getCustomAttributes, getErrorMessage, getInternalValue, getModelType, getPropertyDataSource, getRequiredError, getState, getTabIndex, getValidators, isBuffered, isImmediate, isInvalidAllowed, isInvalidCommitted, isModified, isReadOnly, isRequired, isValid, isValidationVisible, readOnlyStatusChange, removeAllValidators, removeListener, removeListener, removeReadOnlyStatusChangeListener, removeValidator, removeValueChangeListener, setBuffered, setConversionError, setConvertedValue, setConverter, setConverter, setCurrentBufferedSourceException, setInternalValue, setInvalidAllowed, setInvalidCommitted, setLocale, setPropertyDataSource, setReadOnly, setRequired, setRequiredError, setTabIndex, setValidationVisible, setValue, shouldHideErrors, toString, validate, validate, valueChangeaddContextClickListener, addListener, addShortcutListener, addStyleName, findAncestor, fireComponentErrorEvent, fireComponentEvent, getActionManager, getCaption, getComponentError, getData, getDebugId, getDescription, getExplicitImmediateValue, getHeight, getHeightUnits, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getWidth, getWidthUnits, isCaptionAsHtml, isConnectorEnabled, isEnabled, isOrHasAncestor, isResponsive, isVisible, removeContextClickListener, removeListener, removeShortcutListener, removeStyleName, setCaption, setCaptionAsHtml, setComponentError, setData, setDebugId, setDescription, setEnabled, setHeight, setHeight, setHeightUndefined, setIcon, setId, setImmediate, setParent, setPrimaryStyleName, setResponsive, setSizeFull, setSizeUndefined, setStyleName, setStyleName, setVisible, setWidth, setWidth, setWidthUndefinedaddAttachListener, addDetachListener, addExtension, addListener, addListener, addListener, addMethodInvocationToQueue, createState, encodeState, equals, fireEvent, getAllChildrenIterable, getConnectorId, getErrorHandler, getExtensions, getResource, getRpcManager, getRpcProxy, getSession, getStateType, getUI, handleConnectorRequest, hashCode, hasListeners, isAttached, isThis, markAsDirty, markAsDirtyRecursive, registerRpc, registerRpc, removeAttachListener, removeDetachListener, removeExtension, removeListener, removeListener, removeListener, removeListener, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler, setResourceclone, finalize, getClass, notify, notifyAll, wait, wait, waitmarkAsDirtyisEnabled, isImmediateaddListener, addStyleName, getCaption, getDescription, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getUI, isEnabled, isReadOnly, isVisible, removeListener, removeStyleName, setCaption, setEnabled, setIcon, setId, setParent, setPrimaryStyleName, setReadOnly, setStyleName, setVisibleaddAttachListener, addDetachListener, beforeClientResponse, encodeState, getErrorHandler, getExtensions, getRpcManager, getStateType, handleConnectorRequest, isAttached, isConnectorEnabled, markAsDirtyRecursive, removeAttachListener, removeDetachListener, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandlergetConnectorIdgetHeight, getHeightUnits, getWidth, getWidthUnits, setHeight, setHeight, setHeightUndefined, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthUndefinedaddShortcutListener, removeShortcutListenerpublic EnumComboBox()
Caller must separately invoke setEnumDataSource(java.lang.Class<T>).
public EnumComboBox(Class<T> enumClass)
Equivalent to:
EnumComboBox(enumClass, EnumContainer.TO_STRING_PROPERTY.getName(), false);
T - enum typeenumClass - enum type, or null to leave data source unsetpublic EnumComboBox(Class<T> enumClass, boolean allowNull)
Equivalent to:
EnumComboBox(enumClass, EnumContainer.TO_STRING_PROPERTY, allowNull);
T - enum typeenumClass - enum type, or null to leave data source unsetallowNull - true to allow a null selection, false otherwisepublic EnumComboBox(Class<T> enumClass, String displayPropertyName)
Equivalent to:
EnumComboBox(enumClass, displayPropertyName, false);
T - enum typeenumClass - enum typedisplayPropertyName - container property to display in the combo boxpublic EnumComboBox(Class<T> enumClass, String displayPropertyName, boolean allowNull)
Equivalent to:
EnumComboBox(enumClass != null ? new EnumContainer<T>(enumClass) : null, displayPropertyName, allowNull);
T - enum typeenumClass - enum type, or null to leave data source unsetdisplayPropertyName - container property to display in the combo boxallowNull - true to allow a null selection, false otherwisepublic EnumComboBox(EnumContainer<?> container, String displayPropertyName, boolean allowNull)
This instance is configured for item caption AbstractSelect.ItemCaptionMode.PROPERTY mode, with
displayPropertyName as the item caption property.
container - container data source, or null to leave data source unsetdisplayPropertyName - container property to display in the combo boxallowNull - true to allow a null selection, false otherwisepublic <T extends Enum<T>> void setEnumDataSource(Class<T> enumClass)
Enum type whose instances serve as this instance's data source.T - enum typeenumClass - enum class instanceIllegalArgumentException - if enumClass is nullCopyright © 2017. All rights reserved.