public class NativeSelect extends AbstractSelect implements FieldEvents.BlurNotifier, FieldEvents.FocusNotifier
AbstractSelect.AbstractSelectTargetDetails, AbstractSelect.AcceptItem, AbstractSelect.CaptionChangeListener, AbstractSelect.DefaultNewItemHandler, AbstractSelect.Filtering, AbstractSelect.ItemCaptionMode, AbstractSelect.ItemDescriptionGenerator, AbstractSelect.NewItemHandler, AbstractSelect.TargetItemIs, AbstractSelect.VerticalLocationIs
AbstractField.FocusShortcut, AbstractField.ReadOnlyStatusChangeEvent
Container.Editor, Container.Filter, Container.Filterable, Container.Hierarchical, Container.Indexed, Container.ItemSetChangeListener, Container.ItemSetChangeNotifier, Container.Ordered, Container.PropertySetChangeListener, Container.PropertySetChangeNotifier, Container.SimpleFilterable, Container.Sortable, Container.Viewer
Component.ErrorEvent, Component.Event, Component.Focusable, Component.Listener
ClientConnector.AttachEvent, ClientConnector.AttachListener, ClientConnector.ConnectorErrorEvent, ClientConnector.DetachEvent, ClientConnector.DetachListener
Sizeable.Unit
Field.ValueChangeEvent
Buffered.SourceException
Property.Editor, Property.ReadOnlyException, Property.ReadOnlyStatusChangeListener, Property.ReadOnlyStatusChangeNotifier, Property.Transactional<T>, Property.ValueChangeListener, Property.ValueChangeNotifier, Property.Viewer
ITEM_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, items
DESIGN_ATTR_PLAIN_TEXT
SIZE_UNDEFINED, UNITS_CM, UNITS_EM, UNITS_EX, UNITS_INCH, UNITS_MM, UNITS_PERCENTAGE, UNITS_PICAS, UNITS_PIXELS, UNITS_POINTS
Constructor and Description |
---|
NativeSelect() |
NativeSelect(String caption) |
NativeSelect(String caption,
Collection<?> options) |
NativeSelect(String caption,
Container dataSource) |
Modifier and Type | Method and Description |
---|---|
void |
addBlurListener(FieldEvents.BlurListener listener)
Adds a
BlurListener to the Component which gets fired
when a Field loses keyboard focus. |
void |
addFocusListener(FieldEvents.FocusListener listener)
Adds a
FocusListener to the Component which gets fired
when a Field receives keyboard focus. |
void |
addListener(FieldEvents.BlurListener listener)
Deprecated.
As of 7.0, replaced by
#addBlurListener(BlurListener) |
void |
addListener(FieldEvents.FocusListener listener)
Deprecated.
As of 7.0, replaced by
#addFocusListener(FocusListener) |
int |
getColumns()
Deprecated.
As of 7.0. "Columns" does not reflect the exact number of
characters that will be displayed. It is better to use
setWidth together with "em" to control the width of the
field.
|
void |
paintContent(PaintTarget target)
Paints the content of this component.
|
void |
removeBlurListener(FieldEvents.BlurListener listener)
Removes a
BlurListener from the Component. |
void |
removeFocusListener(FieldEvents.FocusListener listener)
Removes a
FocusListener from the Component. |
void |
removeListener(FieldEvents.BlurListener listener)
Deprecated.
As of 7.0, replaced by
#removeBlurListener(BlurListener) |
void |
removeListener(FieldEvents.FocusListener listener)
Deprecated.
As of 7.0, replaced by
#removeFocusListener(FocusListener) |
void |
setColumns(int columns)
Deprecated.
As of 7.0. "Columns" does not reflect the exact number of
characters that will be displayed. It is better to use
setWidth together with "em" to control the width of the
field.
|
void |
setMultiSelect(boolean multiSelect)
Sets the multiselect mode.
|
void |
setNewItemsAllowed(boolean allowNewOptions)
Enables or disables possibility to add new options by the user.
|
addContainerProperty, addItem, addItem, addItems, addItems, addItemSetChangeListener, addListener, addListener, addPropertySetChangeListener, attach, changeVariables, containerItemSetChange, containerPropertySetChange, containsId, detach, fireItemSetChange, firePropertySetChange, getCaptionChangeListener, getContainerDataSource, getContainerProperty, getContainerPropertyIds, getItem, getItemCaption, getItemCaptionMode, getItemCaptionPropertyId, getItemIcon, getItemIconPropertyId, getItemIds, getListeners, getNewItemHandler, getNullSelectionItemId, getState, getType, getType, getValue, getVisibleItemIds, isEmpty, isMultiSelect, isNewItemsAllowed, isNullSelectionAllowed, isSelected, paintItem, readDesign, readItem, readItems, removeAllItems, removeContainerProperty, removeItem, removeItemSetChangeListener, removeListener, removeListener, removePropertySetChangeListener, sanitizeSelection, select, setContainerDataSource, setItemCaption, setItemCaptionMode, setItemCaptionPropertyId, setItemIcon, setItemIconPropertyId, setNewItemHandler, setNullSelectionAllowed, setNullSelectionItemId, setValue, setValue, size, unselect, writeDesign, writeItem, writeItems
addListener, 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, valueChange
addContextClickListener, 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, setWidthUndefined
addAttachListener, 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, setResource
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
markAsDirty
isEnabled, isImmediate
addListener, addStyleName, getCaption, getDescription, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getUI, isEnabled, isReadOnly, isVisible, removeListener, removeStyleName, setCaption, setEnabled, setIcon, setId, setParent, setPrimaryStyleName, setReadOnly, setStyleName, setVisible
addAttachListener, addDetachListener, beforeClientResponse, encodeState, getErrorHandler, getExtensions, getRpcManager, getStateType, handleConnectorRequest, isAttached, isConnectorEnabled, markAsDirtyRecursive, removeAttachListener, removeDetachListener, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler
getConnectorId
getHeight, getHeightUnits, getWidth, getWidthUnits, setHeight, setHeight, setHeightUndefined, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthUndefined
addShortcutListener, removeShortcutListener
public NativeSelect()
public NativeSelect(String caption, Collection<?> options)
public NativeSelect(String caption)
@Deprecated public void setColumns(int columns)
Calling setColumns(10);
is equivalent to calling
setWidth("10em");
columns
- the number of columns to set.@Deprecated public int getColumns()
setColumns(int)
public void paintContent(PaintTarget target) throws PaintException
AbstractSelect
paintContent
in interface LegacyComponent
paintContent
in class AbstractSelect
target
- the Paint Event.PaintException
- if the paint operation failed.public void setMultiSelect(boolean multiSelect) throws UnsupportedOperationException
AbstractSelect
UnsupportedOperationException
.setMultiSelect
in class AbstractSelect
multiSelect
- the New value of property multiSelect.UnsupportedOperationException
public void setNewItemsAllowed(boolean allowNewOptions) throws UnsupportedOperationException
AbstractSelect
setNewItemsAllowed
in class AbstractSelect
allowNewOptions
- the New value of property allowNewOptions.UnsupportedOperationException
public void addFocusListener(FieldEvents.FocusListener listener)
FieldEvents.FocusNotifier
FocusListener
to the Component which gets fired
when a Field
receives keyboard focus.addFocusListener
in interface FieldEvents.FocusNotifier
FieldEvents.FocusListener
@Deprecated public void addListener(FieldEvents.FocusListener listener)
#addFocusListener(FocusListener)
addListener
in interface FieldEvents.FocusNotifier
public void removeFocusListener(FieldEvents.FocusListener listener)
FieldEvents.FocusNotifier
FocusListener
from the Component.removeFocusListener
in interface FieldEvents.FocusNotifier
FieldEvents.FocusListener
@Deprecated public void removeListener(FieldEvents.FocusListener listener)
#removeFocusListener(FocusListener)
removeListener
in interface FieldEvents.FocusNotifier
public void addBlurListener(FieldEvents.BlurListener listener)
FieldEvents.BlurNotifier
BlurListener
to the Component which gets fired
when a Field
loses keyboard focus.addBlurListener
in interface FieldEvents.BlurNotifier
FieldEvents.BlurListener
@Deprecated public void addListener(FieldEvents.BlurListener listener)
#addBlurListener(BlurListener)
addListener
in interface FieldEvents.BlurNotifier
public void removeBlurListener(FieldEvents.BlurListener listener)
FieldEvents.BlurNotifier
BlurListener
from the Component.removeBlurListener
in interface FieldEvents.BlurNotifier
FieldEvents.BlurListener
@Deprecated public void removeListener(FieldEvents.BlurListener listener)
#removeBlurListener(BlurListener)
removeListener
in interface FieldEvents.BlurNotifier
Copyright © 2019 Vaadin Ltd. All rights reserved.