com.itmill.toolkit.ui
Class Select

java.lang.Object
  extended by com.itmill.toolkit.ui.AbstractComponent
      extended by com.itmill.toolkit.ui.AbstractField
          extended by com.itmill.toolkit.ui.AbstractSelect
              extended by com.itmill.toolkit.ui.Select
All Implemented Interfaces:
Buffered, BufferedValidatable, Container, Container.ItemSetChangeListener, Container.ItemSetChangeNotifier, Container.PropertySetChangeListener, Container.PropertySetChangeNotifier, Container.Viewer, Property, Property.Editor, Property.ReadOnlyStatusChangeNotifier, Property.ValueChangeListener, Property.ValueChangeNotifier, Property.Viewer, Validatable, MethodEventSource, Paintable, Sizeable, VariableOwner, AbstractSelect.Filtering, Component, Component.Focusable, Field, EventListener
Direct Known Subclasses:
ComboBox

public class Select
extends AbstractSelect
implements AbstractSelect.Filtering

A class representing a selection of items the user has selected in a UI. The set of choices is presented as a set of Items in a Container.

A Select component may be in single- or multiselect mode. Multiselect mode means that more than one item can be selected simultaneously.

Since:
3.0
Version:
5.3.0
Author:
IT Mill Ltd.

Nested Class Summary
 
Nested classes/interfaces inherited from class com.itmill.toolkit.ui.AbstractSelect
AbstractSelect.CaptionChangeListener, AbstractSelect.DefaultNewItemHandler, AbstractSelect.Filtering, AbstractSelect.NewItemHandler
 
Nested classes/interfaces inherited from class com.itmill.toolkit.ui.AbstractField
AbstractField.ReadOnlyStatusChangeEvent
 
Nested classes/interfaces inherited from class com.itmill.toolkit.ui.AbstractComponent
AbstractComponent.ComponentErrorEvent, AbstractComponent.ComponentErrorHandler
 
Nested classes/interfaces inherited from interface com.itmill.toolkit.data.Container
Container.Editor, Container.Filterable, Container.Hierarchical, Container.Indexed, Container.ItemSetChangeListener, Container.ItemSetChangeNotifier, Container.Ordered, Container.PropertySetChangeListener, Container.PropertySetChangeNotifier, Container.Sortable, Container.Viewer
 
Nested classes/interfaces inherited from interface com.itmill.toolkit.ui.Field
Field.ValueChangeEvent
 
Nested classes/interfaces inherited from interface com.itmill.toolkit.data.Buffered
Buffered.SourceException
 
Nested classes/interfaces inherited from interface com.itmill.toolkit.data.Property
Property.ConversionException, Property.Editor, Property.ReadOnlyException, Property.ReadOnlyStatusChangeListener, Property.ReadOnlyStatusChangeNotifier, Property.ValueChangeListener, Property.ValueChangeNotifier, Property.Viewer
 
Field Summary
protected  int pageLength
          Holds value of property pageLength. 0 disables paging.
 
Fields inherited from class com.itmill.toolkit.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
 
Fields inherited from interface com.itmill.toolkit.ui.AbstractSelect.Filtering
FILTERINGMODE_CONTAINS, FILTERINGMODE_OFF, FILTERINGMODE_STARTSWITH
 
Constructor Summary
Select()
           
Select(String caption)
           
Select(String caption, Collection options)
           
Select(String caption, Container dataSource)
           
 
Method Summary
 void changeVariables(Object source, Map variables)
          Invoked when the value of a variable has changed.
 int getColumns()
          Deprecated. see setter function
protected  List getFilteredOptions()
           
 int getFilteringMode()
          Gets the current filtering mode.
 String getTag()
          Gets the component UIDL tag.
 void paintContent(PaintTarget target)
          Paints the content of this component.
 void requestRepaint()
          Requests that the paintable should be repainted as soon as possible.
 void setColumns(int columns)
          Deprecated.  
 void setFilteringMode(int filteringMode)
          Sets the option filtering mode.
 
Methods inherited from class com.itmill.toolkit.ui.AbstractSelect
addContainerProperty, addItem, addItem, addListener, addListener, attach, containerItemSetChange, containerPropertySetChange, containsId, detach, fireItemSetChange, firePropertySetChange, getCaptionChangeListener, getContainerDataSource, getContainerProperty, getContainerPropertyIds, getItem, getItemCaption, getItemCaptionMode, getItemCaptionPropertyId, getItemIcon, getItemIconPropertyId, getItemIds, getNewItemHandler, getNullSelectionItemId, getType, getType, getValue, getVisibleItemIds, isMultiSelect, isNewItemsAllowed, isNullSelectionAllowed, isSelected, removeAllItems, removeContainerProperty, removeItem, removeListener, removeListener, select, setContainerDataSource, setItemCaption, setItemCaptionMode, setItemCaptionPropertyId, setItemIcon, setItemIconPropertyId, setMultiSelect, setNewItemHandler, setNewItemsAllowed, setNullSelectionAllowed, setNullSelectionItemId, setValue, setValue, size, unselect
 
Methods inherited from class com.itmill.toolkit.ui.AbstractField
addListener, addListener, addValidator, commit, constructField, discard, fireReadOnlyStatusChange, fireValueChange, focus, getErrorMessage, getPropertyDataSource, getRequiredError, getTabIndex, getValidators, isEmpty, isInvalidAllowed, isInvalidCommitted, isModified, isReadOnly, isReadThrough, isRequired, isValid, isValidationVisible, isWriteThrough, removeListener, removeListener, removeValidator, setCurrentBufferedSourceException, setInternalValue, setInvalidAllowed, setInvalidCommitted, setPropertyDataSource, setReadOnly, setReadThrough, setRequired, setRequiredError, setTabIndex, setValidationVisible, setWriteThrough, toString, validate, valueChange
 
Methods inherited from class com.itmill.toolkit.ui.AbstractComponent
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, isEnabled, isImmediate, isVisible, paint, removeListener, removeListener, removeListener, removeListener, removeListener, removeStyleName, requestRepaintRequests, setCaption, setComponentError, setData, setDebugId, setDescription, setEnabled, setErrorHandler, setHeight, setHeight, setHeight, setHeightUnits, setIcon, setImmediate, setLocale, setParent, setSizeFull, setSizeUndefined, setStyle, setStyleName, setWidth, setWidth, setWidth, setWidthUnits, setVisible
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.itmill.toolkit.ui.Field
getDescription, setCaption, setDescription
 

Field Detail

pageLength

protected int pageLength
Holds value of property pageLength. 0 disables paging.

Constructor Detail

Select

public Select()

Select

public Select(String caption,
              Collection options)

Select

public Select(String caption,
              Container dataSource)

Select

public Select(String caption)
Method Detail

paintContent

public void paintContent(PaintTarget target)
                  throws PaintException
Paints the content of this component.

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

getFilteredOptions

protected List getFilteredOptions()

changeVariables

public void changeVariables(Object source,
                            Map variables)
Invoked when the value of a variable has changed.

Specified by:
changeVariables in interface VariableOwner
Overrides:
changeVariables in class AbstractSelect
Parameters:
source - the Source of the variable change. This is the origin of the event. For example in Web Adapter this is the request.
variables - the Mapping from variable names to new variable values.
See Also:
AbstractComponent.changeVariables(java.lang.Object, java.util.Map)

requestRepaint

public void requestRepaint()
Description copied from interface: Paintable
Requests that the paintable should be repainted as soon as possible.

Specified by:
requestRepaint in interface Paintable
Overrides:
requestRepaint in class AbstractComponent

getTag

public String getTag()
Gets the component UIDL tag.

Overrides:
getTag in class AbstractSelect
Returns:
the Component UIDL tag as string.

setFilteringMode

public void setFilteringMode(int filteringMode)
Description copied from interface: AbstractSelect.Filtering
Sets the option filtering mode.

Specified by:
setFilteringMode in interface AbstractSelect.Filtering
Parameters:
filteringMode - the filtering mode to use

getFilteringMode

public int getFilteringMode()
Description copied from interface: AbstractSelect.Filtering
Gets the current filtering mode.

Specified by:
getFilteringMode in interface AbstractSelect.Filtering
Returns:
the filtering mode in use

setColumns

@Deprecated
public void setColumns(int columns)
Deprecated. 

Note, one should use more generic setWidth(String) method instead of this. This now days actually converts columns to width with em css unit. 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

@Deprecated
public int getColumns()
Deprecated. see setter function

Returns:


Copyright © 2000-2009 IT Mill Ltd. All Rights Reserved.