com.vaadin.ui
Class NativeSelect
java.lang.Object
com.vaadin.server.AbstractClientConnector
com.vaadin.ui.AbstractComponent
com.vaadin.ui.AbstractField<java.lang.Object>
com.vaadin.ui.AbstractSelect
com.vaadin.ui.NativeSelect
- All Implemented Interfaces:
- Buffered, BufferedValidatable, Container, Container.ItemSetChangeListener, Container.ItemSetChangeNotifier, Container.PropertySetChangeListener, Container.PropertySetChangeNotifier, Container.Viewer, Property<java.lang.Object>, Property.Editor, Property.ReadOnlyStatusChangeListener, Property.ReadOnlyStatusChangeNotifier, Property.ValueChangeListener, Property.ValueChangeNotifier, Property.Viewer, Validatable, Action.ShortcutNotifier, ConnectorEventListener, MethodEventSource, ClientConnector, Sizeable, VariableOwner, com.vaadin.shared.Connector, Component, Component.Focusable, Field<java.lang.Object>, LegacyComponent, java.io.Serializable, java.util.EventListener
public class NativeSelect
- extends AbstractSelect
This is a simple drop-down select without, for instance, support for
multiselect, new items, lazyloading, and other advanced features. Sometimes
"native" select without all the bells-and-whistles of the ComboBox is a
better choice.
- See Also:
- Serialized Form
Nested classes/interfaces inherited from interface com.vaadin.data.Container |
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 |
Method Summary |
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 |
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. |
Methods inherited from class com.vaadin.ui.AbstractSelect |
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, getType, getType, getValue, getVisibleItemIds, isEmpty, isMultiSelect, isNewItemsAllowed, isNullSelectionAllowed, isSelected, paintItem, removeAllItems, removeContainerProperty, removeItem, removeItemSetChangeListener, removeListener, removeListener, removePropertySetChangeListener, sanitizeSelection, select, setContainerDataSource, setItemCaption, setItemCaptionMode, setItemCaptionPropertyId, setItemIcon, setItemIconPropertyId, setNewItemHandler, setNullSelectionAllowed, setNullSelectionItemId, setValue, setValue, size, unselect |
Methods inherited from class com.vaadin.ui.AbstractField |
addListener, addListener, addReadOnlyStatusChangeListener, addValidator, addValueChangeListener, beforeClientResponse, commit, discard, fireReadOnlyStatusChange, fireValueChange, focus, getConversionError, getConversionError, getConvertedValue, getConverter, getCurrentBufferedSourceException, getErrorMessage, getInternalValue, getModelType, getPropertyDataSource, getRequiredError, getState, getState, getTabIndex, getValidators, isBuffered, 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, shouldHideErrors, toString, validate, validate, valueChange |
Methods inherited from class com.vaadin.ui.AbstractComponent |
addListener, addShortcutListener, addStyleName, findAncestor, fireComponentErrorEvent, fireComponentEvent, getActionManager, getCaption, getComponentError, getData, getDebugId, getDescription, getHeight, getHeightUnits, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getWidth, getWidthUnits, isConnectorEnabled, isEnabled, isImmediate, isOrHasAncestor, isVisible, removeListener, removeShortcutListener, removeStyleName, setCaption, setComponentError, setData, setDebugId, setDescription, setEnabled, setHeight, setHeight, setHeightUndefined, setIcon, setId, setImmediate, setParent, setPrimaryStyleName, setSizeFull, setSizeUndefined, setStyleName, setVisible, setWidth, setWidth, setWidthUndefined |
Methods inherited from class com.vaadin.server.AbstractClientConnector |
addAttachListener, addDetachListener, addExtension, addListener, addListener, addListener, addMethodInvocationToQueue, createState, encodeState, fireEvent, getAllChildrenIterable, getConnectorId, getErrorHandler, getExtensions, getResource, getRpcManager, getRpcProxy, getSession, getStateType, getUI, handleConnectorRequest, hasListeners, isAttached, markAsDirty, markAsDirtyRecursive, registerRpc, registerRpc, removeAttachListener, removeDetachListener, removeExtension, removeListener, removeListener, removeListener, removeListener, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler, setResource |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.vaadin.ui.Component |
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 |
Methods inherited from interface com.vaadin.server.ClientConnector |
addAttachListener, addDetachListener, beforeClientResponse, encodeState, getErrorHandler, getExtensions, getRpcManager, getStateType, handleConnectorRequest, isAttached, isConnectorEnabled, markAsDirtyRecursive, removeAttachListener, removeDetachListener, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler |
Methods inherited from interface com.vaadin.shared.Connector |
getConnectorId |
Methods inherited from interface com.vaadin.server.Sizeable |
getHeight, getHeightUnits, getWidth, getWidthUnits, setHeight, setHeight, setHeightUndefined, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthUndefined |
NativeSelect
public NativeSelect()
NativeSelect
public NativeSelect(java.lang.String caption,
java.util.Collection<?> options)
NativeSelect
public NativeSelect(java.lang.String caption,
Container dataSource)
NativeSelect
public NativeSelect(java.lang.String caption)
setColumns
@Deprecated
public 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.
- Sets the width of the component so that it can display approximately the
given number of letters.
Calling setColumns(10);
is equivalent to calling
setWidth("10em");
- Parameters:
columns
- the number of columns to set.
getColumns
@Deprecated
public 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.
- Gets the number of columns for the component.
- See Also:
setColumns(int)
paintContent
public void paintContent(PaintTarget target)
throws PaintException
- Description copied from class:
AbstractSelect
- Paints the content of this component.
- Specified by:
paintContent
in interface LegacyComponent
- Overrides:
paintContent
in class AbstractSelect
- Parameters:
target
- the Paint Event.
- Throws:
PaintException
- if the paint operation failed.
setMultiSelect
public void setMultiSelect(boolean multiSelect)
throws java.lang.UnsupportedOperationException
- Description copied from class:
AbstractSelect
- Sets the multiselect mode. Setting multiselect mode false may lose
selection information: if selected items set contains one or more
selected items, only one of the selected items is kept as selected.
Subclasses of AbstractSelect can choose not to support changing the
multiselect mode, and may throw
UnsupportedOperationException
.
- Overrides:
setMultiSelect
in class AbstractSelect
- Parameters:
multiSelect
- the New value of property multiSelect.
- Throws:
java.lang.UnsupportedOperationException
setNewItemsAllowed
public void setNewItemsAllowed(boolean allowNewOptions)
throws java.lang.UnsupportedOperationException
- Description copied from class:
AbstractSelect
- Enables or disables possibility to add new options by the user.
- Overrides:
setNewItemsAllowed
in class AbstractSelect
- Parameters:
allowNewOptions
- the New value of property allowNewOptions.
- Throws:
java.lang.UnsupportedOperationException
Copyright © 2000-2014 Vaadin Ltd. All Rights Reserved.