public class CheckBoxImpl extends AbstractField<com.vaadin.ui.CheckBox,java.lang.Boolean,java.lang.Boolean> implements CheckBox
HasValue.ValueChangeEvent<V>
Component.Alignment, Component.BelongToFrame, Component.Disposable, Component.Editable, Component.Focusable, Component.HasCaption, Component.HasDescription, Component.HasIcon, Component.HasXmlDescriptor, Component.Wrapper
HasContextHelp.ContextHelpIconClickEvent
editable, parentEditableChangeListener, validators, VALIDATORS_LIST_INITIAL_CAPACITY
internalValue, uiTestIdsSupport, valueBinding
alignment, applicationContext, component, contextHelpIconClickHandler, contextHelpIconClickListener, descriptionAsHtml, element, frame, htmlSanitizerEnabled, icon, ICON_STYLE, id, parent
AUTO_SIZE, AUTO_SIZE_PX, FULL_SIZE
Constructor and Description |
---|
CheckBoxImpl() |
Modifier and Type | Method and Description |
---|---|
void |
commit()
Updates all changes since the previous commit to the data source.
|
protected JmixCheckBox |
createComponent() |
void |
discard()
Discards all changes since last commit.
|
void |
focus()
Sets focus to this component
|
int |
getTabIndex()
Gets the tabulator index of the
HasTabIndex component. |
boolean |
isBuffered() |
boolean |
isChecked() |
boolean |
isModified()
Tests if the value stored in the object has been modified since it was
last updated from the data source.
|
void |
setBuffered(boolean buffered)
Sets the buffered mode.
|
void |
setParent(Component parent)
INTERNAL.
ComponentContainer.add(Component) is normally used for adding components
to a parent and the used method will call this method implicitly. |
void |
setTabIndex(int tabIndex)
Sets the tabulator index of the
Focusable component. |
void |
setValue(java.lang.Boolean value) |
addValidator, attachValueChangeListener, getDatatypeConversionErrorMsg, getErrorMessage, getRequiredMessage, getValidators, isEditable, isRequired, isValid, removeValidator, setEditable, setEditableToComponent, setRequired, setRequiredMessage, setupComponentErrorProvider, triggerValidators, validate
addValueChangeListener, componentValueChanged, convertToModel, convertToPresentation, fieldValueEquals, getValue, getValueSource, setUiTestId, setUiTestIdsSupport, setValueSource, setValueToPresentation, valueBindingActivated, valueBindingConnected
addAttachListener, addDetachListener, addStyleName, assignDebugId, attached, detached, getAlignment, getCaption, getComponent, getComposition, getContextHelpIconClickHandler, getContextHelpText, getDebugId, getDescription, getEventHub, getFrame, getHeight, getHeightSizeUnit, getHtmlSanitizer, getIcon, getIconName, getIconResource, getId, getParent, getStyleName, getUiComponentProperties, getUiProperties, getWidth, getWidthSizeUnit, getXmlDescriptor, hasSubscriptions, hasValidationError, isAttached, isCaptionAsHtml, isContextHelpTextHtmlEnabled, isDescriptionAsHtml, isEnabled, isEnabledRecursive, isHtmlSanitizerEnabled, isResponsive, isVisible, isVisibleRecursive, onContextHelpIconClick, publish, removeStyleName, sanitize, setAlignment, setApplicationContext, setCaption, setCaptionAsHtml, setContextHelpIconClickHandler, setContextHelpText, setContextHelpTextHtmlEnabled, setDebugId, setDescription, setDescriptionAsHtml, setEnabled, setFrame, setHeight, setHtmlSanitizerEnabled, setIcon, setIconFromSet, setId, setResponsive, setStyleName, setValidationError, setVisible, setWidth, setXmlDescriptor, unsubscribe, unwrap, unwrapComposition, unwrapCompositionOrNull, unwrapOrNull, withUnwrapped, withUnwrappedComposition
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getValueSource, setValueSource
addValueChangeListener, clear, getEmptyValue, getValue, isEmpty
isEditable, isEditableWithParent, setEditable
getFrame, setFrame
addStyleName, getAlignment, getHeight, getHeightSizeUnit, getId, getParent, getStyleName, getWidth, getWidthSizeUnit, isEnabled, isEnabledRecursive, isResponsive, isVisible, isVisibleRecursive, removeStyleName, setAlignment, setEnabled, setHeight, setHeightAuto, setHeightFull, setId, setResponsive, setSizeAuto, setSizeFull, setStyleName, setVisible, setWidth, setWidthAuto, setWidthFull, unwrap, unwrapComposition, unwrapCompositionOrNull, unwrapOrNull, withUnwrapped, withUnwrappedComposition
isValid, isValidateOnCommit, validate
getIcon, setIcon, setIconFromSet
getContextHelpIconClickHandler, getContextHelpText, isContextHelpTextHtmlEnabled, setContextHelpIconClickHandler, setContextHelpText, setContextHelpTextHtmlEnabled
isCaptionAsHtml, setCaptionAsHtml
getCaption, setCaption
getDescription, setDescription
isDescriptionAsHtml, setDescriptionAsHtml
isHtmlSanitizerEnabled, setHtmlSanitizerEnabled
addValidator, addValidators, getValidators, removeValidator
getRequiredMessage, isRequired, setRequired, setRequiredMessage
isFocusable, setFocusable
protected JmixCheckBox createComponent()
public void setValue(@Nullable java.lang.Boolean value)
setValue
in interface HasValue<java.lang.Boolean>
setValue
in class AbstractValueComponent<com.vaadin.ui.CheckBox,java.lang.Boolean,java.lang.Boolean>
public boolean isChecked()
public void focus()
Component.Focusable
focus
in interface Component.Focusable
public int getTabIndex()
Component.Focusable
HasTabIndex
component.getTabIndex
in interface Component.Focusable
HasTabIndex
componentpublic void setTabIndex(int tabIndex)
Component.Focusable
Focusable
component.
The tab index property is used to specify the order in which the
fields are focused when the user presses the Tab key. Components with
a defined tab index are focused sequentially first, and then the
components with no tab index.setTabIndex
in interface Component.Focusable
tabIndex
- tab indexpublic void setParent(@Nullable Component parent)
Component
ComponentContainer.add(Component)
is normally used for adding components
to a parent and the used method will call this method implicitly.setParent
in interface Component
setParent
in class AbstractField<com.vaadin.ui.CheckBox,java.lang.Boolean,java.lang.Boolean>
parent
- Parent componentpublic void commit()
Buffered
commit
in interface Buffered
commit
in class AbstractValueComponent<com.vaadin.ui.CheckBox,java.lang.Boolean,java.lang.Boolean>
public void discard()
Buffered
discard
in interface Buffered
discard
in class AbstractValueComponent<com.vaadin.ui.CheckBox,java.lang.Boolean,java.lang.Boolean>
public boolean isBuffered()
isBuffered
in interface Buffered
isBuffered
in class AbstractValueComponent<com.vaadin.ui.CheckBox,java.lang.Boolean,java.lang.Boolean>
true
if buffered mode is on, false
otherwisepublic void setBuffered(boolean buffered)
Buffered
When in buffered mode, an internal buffer will be used to store changes
until Buffered.commit()
is called. Calling Buffered.discard()
will revert
the internal buffer to the value of the data source.
When in non-buffered mode both read and write operations will be done
directly on the data source. In this mode the Buffered.commit()
and
Buffered.discard()
methods serve no purpose.
setBuffered
in interface Buffered
setBuffered
in class AbstractValueComponent<com.vaadin.ui.CheckBox,java.lang.Boolean,java.lang.Boolean>
buffered
- true
if buffered mode should be turned on, false
otherwisepublic boolean isModified()
Buffered
isModified
in interface Buffered
isModified
in class AbstractValueComponent<com.vaadin.ui.CheckBox,java.lang.Boolean,java.lang.Boolean>
true
if the value in the object has been modified
since the last data source update, false
if not.