CheckBox based on the
new data binding API@Deprecated public class CheckBox extends AbstractField<Boolean>
AbstractField.FocusShortcut, AbstractField.ReadOnlyStatusChangeEventField.ValueChangeEventComponent.ErrorEvent, Component.Event, Component.Focusable, Component.ListenerClientConnector.AttachEvent, ClientConnector.AttachListener, ClientConnector.ConnectorErrorEvent, ClientConnector.DetachEvent, ClientConnector.DetachListenerSizeable.UnitBuffered.SourceExceptionProperty.Editor, Property.ReadOnlyException, Property.ReadOnlyStatusChangeListener, Property.ReadOnlyStatusChangeNotifier, Property.Transactional<T>, Property.ValueChangeListener, Property.ValueChangeNotifier, Property.ViewerDESIGN_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 |
|---|
CheckBox()
Deprecated.
Creates a new checkbox.
|
CheckBox(String caption)
Deprecated.
Creates a new checkbox with a set caption.
|
CheckBox(String caption,
boolean initialState)
Deprecated.
Creates a new checkbox with a caption and a set initial state.
|
CheckBox(String caption,
Property<?> dataSource)
Deprecated.
Creates a new checkbox that is connected to a boolean property.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addBlurListener(FieldEvents.BlurListener listener)
Deprecated.
|
void |
addFocusListener(FieldEvents.FocusListener listener)
Deprecated.
|
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) |
boolean |
booleanValue()
Deprecated.
As of 7.0, use
AbstractField.getValue() instead and, if needed,
handle null values. |
void |
clear()
Deprecated.
Clears the value of the field.
|
protected Collection<String> |
getCustomAttributes()
Deprecated.
|
protected CheckBoxState |
getState()
Deprecated.
|
Class<Boolean> |
getType()
Deprecated.
Returns the type of the Field.
|
boolean |
isEmpty()
Deprecated.
Is the field empty?
In general, "empty" state is same as null.
|
void |
readDesign(org.jsoup.nodes.Element design,
DesignContext designContext)
Deprecated.
|
void |
removeBlurListener(FieldEvents.BlurListener listener)
Deprecated.
|
void |
removeFocusListener(FieldEvents.FocusListener listener)
Deprecated.
|
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) |
protected void |
setInternalValue(Boolean newValue)
Deprecated.
Sets the internal field value.
|
void |
writeDesign(org.jsoup.nodes.Element design,
DesignContext designContext)
Deprecated.
|
addListener, addListener, addReadOnlyStatusChangeListener, addValidator, addValueChangeListener, attach, beforeClientResponse, commit, detach, discard, fireReadOnlyStatusChange, fireValueChange, focus, getConversionError, getConversionError, getConvertedValue, getConverter, getCurrentBufferedSourceException, getErrorMessage, getInternalValue, getModelType, getPropertyDataSource, getRequiredError, getState, getTabIndex, getValidators, getValue, isBuffered, isInvalidAllowed, isInvalidCommitted, isModified, isReadOnly, isRequired, isValid, isValidationVisible, readOnlyStatusChange, removeAllValidators, removeListener, removeListener, removeReadOnlyStatusChangeListener, removeValidator, removeValueChangeListener, setBuffered, setConversionError, setConvertedValue, setConverter, setConverter, setCurrentBufferedSourceException, setInvalidAllowed, setInvalidCommitted, setLocale, setPropertyDataSource, setReadOnly, setRequired, setRequiredError, setTabIndex, setValidationVisible, setValue, setValue, setValue, shouldHideErrors, validate, validate, valueChangegetExplicitImmediateValue, isImmediate, setImmediateaddContextClickListener, addListener, addShortcutListener, addStyleName, findAncestor, fireComponentErrorEvent, fireComponentEvent, getActionManager, getCaption, getComponentError, getData, getDebugId, getDescription, getHeight, getHeightUnits, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getWidth, getWidthUnits, isCaptionAsHtml, isConnectorEnabled, isEnabled, isOrHasAncestor, isRequiredIndicatorVisible, isResponsive, isVisible, removeContextClickListener, removeListener, removeShortcutListener, removeStyleName, setCaption, setCaptionAsHtml, setComponentError, setData, setDebugId, setDescription, setDescription, setEnabled, setHeight, setHeight, setHeightUndefined, setIcon, setId, setParent, setPrimaryStyleName, setRequiredIndicatorVisible, setResponsive, setSizeFull, setSizeUndefined, setStyleName, setVisible, setWidth, setWidth, setWidthUndefinedaddAttachListener, addDetachListener, addExtension, addListener, addListener, addListener, addMethodInvocationToQueue, createState, encodeState, equals, fireEvent, getAllChildrenIterable, getConnectorId, getErrorHandler, getExtensions, getListeners, 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, setResource, updateDiffstateclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitaddListener, addStyleName, addStyleNames, getCaption, getDescription, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getUI, isEnabled, isVisible, removeListener, removeStyleName, removeStyleNames, setCaption, setEnabled, setIcon, setId, setParent, setPrimaryStyleName, setStyleName, setStyleName, setVisibleaddAttachListener, addDetachListener, encodeState, getErrorHandler, getExtensions, getRpcManager, getStateType, handleConnectorRequest, isAttached, isConnectorEnabled, markAsDirty, markAsDirtyRecursive, removeAttachListener, removeDetachListener, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandlergetHeight, getHeightUnits, getWidth, getWidthUnits, setHeight, setHeight, setHeightUndefined, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthUndefinedaddShortcutListener, removeShortcutListenerpublic CheckBox()
public CheckBox(String caption)
caption - the Checkbox caption.public CheckBox(String caption, boolean initialState)
caption - the caption of the checkboxinitialState - the initial state of the checkboxpublic Class<Boolean> getType()
AbstractFieldgetValue and
setValue must be compatible with this type: one must be able
to safely cast the value returned from getValue to the given
type and pass any variable assignable to this type as an argument to
setValue.protected CheckBoxState getState()
getState in class AbstractField<Boolean>protected void setInternalValue(Boolean newValue)
AbstractFieldAbstractField.getInternalValue() if necessary.setInternalValue in class AbstractField<Boolean>newValue - the new value to be set.public void addBlurListener(FieldEvents.BlurListener listener)
@Deprecated public void addListener(FieldEvents.BlurListener listener)
#addBlurListener(BlurListener)public void removeBlurListener(FieldEvents.BlurListener listener)
@Deprecated public void removeListener(FieldEvents.BlurListener listener)
#removeBlurListener(BlurListener)public void addFocusListener(FieldEvents.FocusListener listener)
@Deprecated public void addListener(FieldEvents.FocusListener listener)
#addFocusListener(FocusListener)public void removeFocusListener(FieldEvents.FocusListener listener)
@Deprecated public void removeListener(FieldEvents.FocusListener listener)
#removeFocusListener(FocusListener)@Deprecated public boolean booleanValue()
AbstractField.getValue() instead and, if needed,
handle null values.public void readDesign(org.jsoup.nodes.Element design,
DesignContext designContext)
readDesign in interface ComponentreadDesign in class AbstractField<Boolean>protected Collection<String> getCustomAttributes()
getCustomAttributes in class AbstractField<Boolean>public void writeDesign(org.jsoup.nodes.Element design,
DesignContext designContext)
writeDesign in interface ComponentwriteDesign in class AbstractField<Boolean>public void clear()
Field
The field value is typically reset to the initial value of the field.
Calling Field.isEmpty() on a cleared field must always returns true.
public boolean isEmpty()
FieldCopyright © 2019 Vaadin Ltd. All rights reserved.