|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.vaadin.ui.AbstractComponent
com.vaadin.ui.AbstractField
com.vaadin.ui.AbstractSelect
com.vaadin.ui.Select
public class Select
A class representing a selection of items the user has selected in a UI. The
set of choices is presented as a set of Item
s 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.
Nested Class Summary |
---|
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 | |
---|---|
protected int |
pageLength
Holds value of property pageLength. |
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 |
Fields inherited from interface com.vaadin.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 |
addListener(FieldEvents.BlurListener listener)
Adds a BlurListener to the Component which gets fired
when a Field loses keyboard focus. |
void |
addListener(FieldEvents.FocusListener listener)
Adds a FocusListener to the Component which gets fired
when a Field receives keyboard focus. |
protected Container.Filter |
buildFilter(String filterString,
int filteringMode)
Constructs a filter instance to use when using a Filterable container in the ITEM_CAPTION_MODE_PROPERTY mode. |
void |
changeVariables(Object source,
Map<String,Object> variables)
Invoked when the value of a variable has changed. |
void |
containerItemSetChange(Container.ItemSetChangeEvent event)
Lets the listener know a Containers Item set has changed. |
int |
getColumns()
Deprecated. see setter function |
protected List<?> |
getFilteredOptions()
Filters the options in memory and returns the full filtered list. |
int |
getFilteringMode()
Gets the current filtering mode. |
protected List<?> |
getOptionsWithFilter(boolean needNullSelectOption)
Returns the filtered options for the current page using a container filter. |
boolean |
isMultiSelect()
Deprecated. use ListSelect , OptionGroup or
TwinColSelect instead |
boolean |
isScrollToSelectedItem()
Returns true if the select should find the page with the selected item when opening the popup (single select combo box only). |
void |
paintContent(PaintTarget target)
Paints the content of this component. |
void |
removeListener(FieldEvents.BlurListener listener)
Removes a BlurListener from the Component. |
void |
removeListener(FieldEvents.FocusListener listener)
Removes a FocusListener from the Component. |
void |
setColumns(int columns)
Deprecated. |
void |
setFilteringMode(int filteringMode)
Sets the option filtering mode. |
void |
setMultiSelect(boolean multiSelect)
Deprecated. use ListSelect , OptionGroup or
TwinColSelect instead |
void |
setScrollToSelectedItem(boolean scrollToSelectedItem)
Sets whether to scroll the selected item visible (directly open the page on which it is) when opening the combo box popup or not. |
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 |
Field Detail |
---|
protected int pageLength
Constructor Detail |
---|
public Select()
public Select(String caption, Collection<?> options)
public Select(String caption, Container dataSource)
public Select(String caption)
Method Detail |
---|
public void paintContent(PaintTarget target) throws PaintException
paintContent
in class AbstractSelect
target
- the Paint Event.
PaintException
- if the paint operation failed.protected List<?> getOptionsWithFilter(boolean needNullSelectOption)
filteredSize
is set to the total number of
items passing the filter.
The current container must be Filterable
and Indexed
, and
the filtering mode must be suitable for container filtering (tested with
#canUseContainerFilter()
).
Use getFilteredOptions()
and
sanitetizeList(List, boolean)
if this is not the case.
needNullSelectOption
-
protected Container.Filter buildFilter(String filterString, int filteringMode)
ITEM_CAPTION_MODE_PROPERTY
mode.
Note that the client side implementation expects the filter string to
apply to the item caption string it sees, so changing the behavior of
this method can cause problems.
filterString
- filteringMode
-
public void containerItemSetChange(Container.ItemSetChangeEvent event)
AbstractSelect
containerItemSetChange
in interface Container.ItemSetChangeListener
containerItemSetChange
in class AbstractSelect
event
- change event textContainer.ItemSetChangeListener.containerItemSetChange(com.vaadin.data.Container.ItemSetChangeEvent)
protected List<?> getFilteredOptions()
getOptionsWithFilter(boolean)
if possible (filterable container
and suitable item caption mode etc.).
public void changeVariables(Object source, Map<String,Object> variables)
changeVariables
in interface VariableOwner
changeVariables
in class AbstractSelect
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.AbstractComponent.changeVariables(java.lang.Object,
java.util.Map)
public void setFilteringMode(int filteringMode)
AbstractSelect.Filtering
setFilteringMode
in interface AbstractSelect.Filtering
filteringMode
- the filtering mode to usepublic int getFilteringMode()
AbstractSelect.Filtering
getFilteringMode
in interface AbstractSelect.Filtering
@Deprecated public void setColumns(int columns)
columns
- the number of columns to set.@Deprecated public int getColumns()
public void addListener(FieldEvents.BlurListener listener)
FieldEvents.BlurNotifier
BlurListener
to the Component which gets fired
when a Field
loses keyboard focus.
addListener
in interface FieldEvents.BlurNotifier
FieldEvents.BlurListener
public void removeListener(FieldEvents.BlurListener listener)
FieldEvents.BlurNotifier
BlurListener
from the Component.
removeListener
in interface FieldEvents.BlurNotifier
FieldEvents.BlurListener
public void addListener(FieldEvents.FocusListener listener)
FieldEvents.FocusNotifier
FocusListener
to the Component which gets fired
when a Field
receives keyboard focus.
addListener
in interface FieldEvents.FocusNotifier
FieldEvents.FocusListener
public void removeListener(FieldEvents.FocusListener listener)
FieldEvents.FocusNotifier
FocusListener
from the Component.
removeListener
in interface FieldEvents.FocusNotifier
FieldEvents.FocusListener
@Deprecated public void setMultiSelect(boolean multiSelect)
ListSelect
, OptionGroup
or
TwinColSelect
instead
AbstractSelect
setMultiSelect
in class AbstractSelect
multiSelect
- the New value of property multiSelect.AbstractSelect.setMultiSelect(boolean)
@Deprecated public boolean isMultiSelect()
ListSelect
, OptionGroup
or
TwinColSelect
instead
AbstractSelect
isMultiSelect
in class AbstractSelect
AbstractSelect.isMultiSelect()
public void setScrollToSelectedItem(boolean scrollToSelectedItem)
scrollToSelectedItem
- true to find the page with the selected item when opening the
selection popuppublic boolean isScrollToSelectedItem()
setScrollToSelectedItem(boolean)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |