public class OptionGroup 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.VerticalLocationIsAbstractField.FocusShortcut, AbstractField.ReadOnlyStatusChangeEventContainer.Editor, Container.Filter, Container.Filterable, Container.Hierarchical, Container.Indexed, Container.ItemSetChangeListener, Container.ItemSetChangeNotifier, Container.Ordered, Container.PropertySetChangeListener, Container.PropertySetChangeNotifier, Container.SimpleFilterable, Container.Sortable, Container.ViewerComponent.ErrorEvent, Component.Event, Component.Focusable, Component.ListenerClientConnector.AttachEvent, ClientConnector.AttachListener, ClientConnector.ConnectorErrorEvent, ClientConnector.DetachEvent, ClientConnector.DetachListenerSizeable.UnitField.ValueChangeEventBuffered.SourceExceptionProperty.Editor, Property.ReadOnlyException, Property.ReadOnlyStatusChangeListener, Property.ReadOnlyStatusChangeNotifier, Property.Transactional<T>, Property.ValueChangeListener, Property.ValueChangeNotifier, Property.ViewerITEM_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, itemsDESIGN_ATTR_PLAIN_TEXTSIZE_UNDEFINED, UNITS_CM, UNITS_EM, UNITS_EX, UNITS_INCH, UNITS_MM, UNITS_PERCENTAGE, UNITS_PICAS, UNITS_PIXELS, UNITS_POINTS| Constructor and Description |
|---|
OptionGroup() |
OptionGroup(String caption) |
OptionGroup(String caption,
Collection<?> options) |
OptionGroup(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) |
void |
changeVariables(Object source,
Map<String,Object> variables)
Invoked when the value of a variable has changed.
|
protected OptionGroupState |
getState()
Returns the shared state bean with information to be sent from the server
to the client.
|
boolean |
isHtmlContentAllowed()
Checks whether captions are interpreted as html or plain text.
|
boolean |
isItemEnabled(Object itemId)
Returns true if the item is enabled.
|
void |
paintContent(PaintTarget target)
Paints the content of this component.
|
protected void |
paintItem(PaintTarget target,
Object itemId) |
protected Object |
readItem(org.jsoup.nodes.Element child,
Set<String> selected,
DesignContext context)
Reads an Item from a design and inserts it into the data source.
|
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 |
setHtmlContentAllowed(boolean htmlContentAllowed)
Sets whether html is allowed in the item captions.
|
void |
setItemEnabled(Object itemId,
boolean enabled)
Sets an item disabled or enabled.
|
protected void |
setValue(Object newValue,
boolean repaintIsNotNeeded)
Sets the value of the field.
|
protected org.jsoup.nodes.Element |
writeItem(org.jsoup.nodes.Element design,
Object itemId,
DesignContext context)
Writes a data source Item to a design.
|
addContainerProperty, addItem, addItem, addItems, addItems, addItemSetChangeListener, addListener, addListener, addPropertySetChangeListener, attach, 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, readDesign, readItems, removeAllItems, removeContainerProperty, removeItem, removeItemSetChangeListener, removeListener, removeListener, removePropertySetChangeListener, sanitizeSelection, select, setContainerDataSource, setItemCaption, setItemCaptionMode, setItemCaptionPropertyId, setItemIcon, setItemIconPropertyId, setMultiSelect, setNewItemHandler, setNewItemsAllowed, setNullSelectionAllowed, setNullSelectionItemId, setValue, setValue, size, unselect, writeDesign, writeItemsaddListener, 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, shouldHideErrors, toString, validate, validate, valueChangeaddContextClickListener, 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, setWidthUndefinedaddAttachListener, 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, setResourceclone, finalize, getClass, notify, notifyAll, wait, wait, waitmarkAsDirtyisEnabled, isImmediateaddListener, addStyleName, getCaption, getDescription, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getUI, isEnabled, isReadOnly, isVisible, removeListener, removeStyleName, setCaption, setEnabled, setIcon, setId, setParent, setPrimaryStyleName, setReadOnly, setStyleName, setVisibleaddAttachListener, addDetachListener, beforeClientResponse, encodeState, getErrorHandler, getExtensions, getRpcManager, getStateType, handleConnectorRequest, isAttached, isConnectorEnabled, markAsDirtyRecursive, removeAttachListener, removeDetachListener, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandlergetConnectorIdgetHeight, getHeightUnits, getWidth, getWidthUnits, setHeight, setHeight, setHeightUndefined, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthUndefinedaddShortcutListener, removeShortcutListenerpublic OptionGroup()
public OptionGroup(String caption, Collection<?> options)
public OptionGroup(String caption)
public void paintContent(PaintTarget target) throws PaintException
AbstractSelectpaintContent in interface LegacyComponentpaintContent in class AbstractSelecttarget - the Paint Event.PaintException - if the paint operation failed.protected void paintItem(PaintTarget target, Object itemId) throws PaintException
paintItem in class AbstractSelectPaintExceptionpublic void changeVariables(Object source, Map<String,Object> variables)
AbstractSelectchangeVariables in interface VariableOwnerchangeVariables in class AbstractSelectsource - 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.com.vaadin.ui.AbstractComponent#changeVariables(java.lang.Object,
java.util.Map)public void addBlurListener(FieldEvents.BlurListener listener)
FieldEvents.BlurNotifierBlurListener to the Component which gets fired
when a Field loses keyboard focus.addBlurListener in interface FieldEvents.BlurNotifierFieldEvents.BlurListener@Deprecated public void addListener(FieldEvents.BlurListener listener)
#addBlurListener(BlurListener)addListener in interface FieldEvents.BlurNotifierpublic void removeBlurListener(FieldEvents.BlurListener listener)
FieldEvents.BlurNotifierBlurListener from the Component.removeBlurListener in interface FieldEvents.BlurNotifierFieldEvents.BlurListener@Deprecated public void removeListener(FieldEvents.BlurListener listener)
#removeBlurListener(BlurListener)removeListener in interface FieldEvents.BlurNotifierpublic void addFocusListener(FieldEvents.FocusListener listener)
FieldEvents.FocusNotifierFocusListener to the Component which gets fired
when a Field receives keyboard focus.addFocusListener in interface FieldEvents.FocusNotifierFieldEvents.FocusListener@Deprecated public void addListener(FieldEvents.FocusListener listener)
#addFocusListener(FocusListener)addListener in interface FieldEvents.FocusNotifierpublic void removeFocusListener(FieldEvents.FocusListener listener)
FieldEvents.FocusNotifierFocusListener from the Component.removeFocusListener in interface FieldEvents.FocusNotifierFieldEvents.FocusListener@Deprecated public void removeListener(FieldEvents.FocusListener listener)
#removeFocusListener(FocusListener)removeListener in interface FieldEvents.FocusNotifierprotected void setValue(Object newValue, boolean repaintIsNotNeeded)
AbstractFieldsetValue in class AbstractField<Object>newValue - the New value of the field.repaintIsNotNeeded - True iff caller is sure that repaint is not needed.public void setItemEnabled(Object itemId, boolean enabled)
itemId - the id of the item to be disabled or enabledenabled - if true the item is enabled, otherwise the item is disabledpublic boolean isItemEnabled(Object itemId)
itemId - the id of the item to be checkedsetItemEnabled(Object, boolean)public void setHtmlContentAllowed(boolean htmlContentAllowed)
htmlContentAllowed - true if the captions are used as html, false if used as plain
textpublic boolean isHtmlContentAllowed()
setHtmlContentAllowed(boolean)protected Object readItem(org.jsoup.nodes.Element child, Set<String> selected, DesignContext context)
AbstractSelectreadItem in class AbstractSelectchild - a child element representing the itemselected - A set accumulating selected items. If the item that is read is
marked as selected, its item id should be added to this set.context - the DesignContext instance used in parsingprotected org.jsoup.nodes.Element writeItem(org.jsoup.nodes.Element design,
Object itemId,
DesignContext context)
AbstractSelectwriteItem in class AbstractSelectdesign - the element into which to insert the itemitemId - the id of the item to writecontext - the DesignContext instance used in writingprotected OptionGroupState getState()
AbstractComponentgetState in class AbstractSelectCopyright © 2016 Vaadin Ltd. All rights reserved.