com.vaadin.ui
Class NativeSelect

java.lang.Object
  extended by com.vaadin.ui.AbstractComponent
      extended by com.vaadin.ui.AbstractField
          extended by com.vaadin.ui.AbstractSelect
              extended by com.vaadin.ui.NativeSelect
All Implemented Interfaces:
Buffered, BufferedValidatable, Container, Container.ItemSetChangeListener, Container.ItemSetChangeNotifier, Container.PropertySetChangeListener, Container.PropertySetChangeNotifier, Container.Viewer, Property, Property.Editor, Property.ReadOnlyStatusChangeListener, Property.ReadOnlyStatusChangeNotifier, Property.ValueChangeListener, Property.ValueChangeNotifier, Property.Viewer, Validatable, Action.ShortcutNotifier, MethodEventSource, Paintable, Sizeable, VariableOwner, Component, Component.Focusable, Field, Serializable, 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 Class Summary
 
Nested classes/interfaces inherited from class com.vaadin.ui.AbstractSelect
AbstractSelect.AbstractSelectTargetDetails, AbstractSelect.AcceptItem, AbstractSelect.CaptionChangeListener, AbstractSelect.DefaultNewItemHandler, AbstractSelect.Filtering, AbstractSelect.ItemDescriptionGenerator, AbstractSelect.MultiSelectMode, AbstractSelect.NewItemHandler, AbstractSelect.TargetItemIs, AbstractSelect.VerticalLocationIs
 
Nested classes/interfaces inherited from class com.vaadin.ui.AbstractField
AbstractField.FocusShortcut, AbstractField.ReadOnlyStatusChangeEvent
 
Nested classes/interfaces inherited from class com.vaadin.ui.AbstractComponent
AbstractComponent.ComponentErrorEvent, AbstractComponent.ComponentErrorHandler
 
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
 
Nested classes/interfaces inherited from interface com.vaadin.ui.Field
Field.ValueChangeEvent
 
Nested classes/interfaces inherited from interface com.vaadin.data.Buffered
Buffered.SourceException
 
Nested classes/interfaces inherited from interface com.vaadin.data.Property
Property.ConversionException, Property.Editor, Property.ReadOnlyException, Property.ReadOnlyStatusChangeListener, Property.ReadOnlyStatusChangeNotifier, Property.ValueChangeListener, Property.ValueChangeNotifier, Property.Viewer
 
Field Summary
 
Fields inherited from class com.vaadin.ui.AbstractSelect
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
 
Constructor Summary
NativeSelect()
           
NativeSelect(String caption)
           
NativeSelect(String caption, Collection<?> options)
           
NativeSelect(String caption, Container dataSource)
           
 
Method Summary
 int getColumns()
           
 void paintContent(PaintTarget target)
          Paints the content of this component.
 void setColumns(int columns)
          Sets the number of columns in the editor.
 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, addListener, addListener, 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, removeListener, removeListener, 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, addShortcutListener, addValidator, commit, constructField, discard, fireReadOnlyStatusChange, fireValueChange, focus, getActionManager, getErrorMessage, getPropertyDataSource, getRequiredError, getTabIndex, getValidators, isInvalidAllowed, isInvalidCommitted, isModified, isReadOnly, isReadThrough, isRequired, isValid, isValidationVisible, isWriteThrough, readOnlyStatusChange, removeAllValidators, removeListener, removeListener, removeShortcutListener, removeValidator, setCurrentBufferedSourceException, setInternalValue, setInvalidAllowed, setInvalidCommitted, setPropertyDataSource, setReadOnly, setReadThrough, setRequired, setRequiredError, setTabIndex, setValidationVisible, setWriteThrough, shouldHideErrors, toString, validate, valueChange
 
Methods inherited from class com.vaadin.ui.AbstractComponent
addListener, addListener, addListener, addListener, addListener, addStyleName, childRequestedRepaint, fireComponentErrorEvent, fireComponentEvent, fireEvent, getApplication, getCaption, getComponentError, getData, getDebugId, getDescription, getErrorHandler, getHeight, getHeightUnits, getIcon, getLocale, getParent, getStyle, getStyleName, getWidth, getWidthUnits, getWindow, handleError, hasListeners, isEnabled, isImmediate, isVisible, paint, removeListener, removeListener, removeListener, removeListener, removeListener, removeListener, removeStyleName, requestRepaint, requestRepaintRequests, setCaption, setComponentError, setData, setDebugId, setDescription, setEnabled, setErrorHandler, setHeight, setHeight, setHeight, setHeightUnits, setIcon, setImmediate, setLocale, setParent, setSizeFull, setSizeUndefined, setStyle, setStyleName, setVisible, setWidth, setWidth, setWidth, setWidthUnits
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.vaadin.ui.Field
getDescription, setCaption, setDescription
 

Constructor Detail

NativeSelect

public NativeSelect()

NativeSelect

public NativeSelect(String caption,
                    Collection<?> options)

NativeSelect

public NativeSelect(String caption,
                    Container dataSource)

NativeSelect

public NativeSelect(String caption)
Method Detail

setColumns

public void setColumns(int columns)
Sets the number of columns in the editor. If the number of columns is set 0, the actual number of displayed columns is determined implicitly by the adapter.

Parameters:
columns - the number of columns to set.

getColumns

public int getColumns()

paintContent

public void paintContent(PaintTarget target)
                  throws PaintException
Description copied from class: AbstractSelect
Paints the content of this component.

Overrides:
paintContent in class AbstractSelect
Parameters:
target - the Paint Event.
Throws:
PaintException - if the paint operation failed.

setMultiSelect

public void setMultiSelect(boolean multiSelect)
                    throws UnsupportedOperationException
Description copied from class: AbstractSelect
Sets the multiselect mode. Setting multiselect mode false may loose selection information: if selected items set contains one or more selected items, only one of the selected items is kept as selected.

Overrides:
setMultiSelect in class AbstractSelect
Parameters:
multiSelect - the New value of property multiSelect.
Throws:
UnsupportedOperationException

setNewItemsAllowed

public void setNewItemsAllowed(boolean allowNewOptions)
                        throws 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:
UnsupportedOperationException


Copyright © 2000-2011 Vaadin Ltd. All Rights Reserved.