public class DesktopCheckBox extends DesktopAbstractField<javax.swing.JCheckBox> implements CheckBox
Field.Validator
Component.ActionOwner, Component.ActionsHolder, Component.Alignment, Component.BelongToFrame, Component.Buffered, Component.ChildEditableController, Component.Collapsable, Component.Container, Component.Disposable, Component.Editable, Component.EditableChangeEvent, Component.EditableChangeListener, Component.EditableChangeNotifier, Component.ExpandedStateChangeEvent, Component.ExpandedStateChangeListener, Component.Focusable, Component.HasBorder, Component.HasButtonsPanel, Component.HasCaption, Component.HasFormatter, Component.HasIcon, Component.HasInputPrompt, Component.HasNamedComponents, Component.HasPresentations, Component.HasRowsCount, Component.HasSettings, Component.HasValue, Component.HasXmlDescriptor, Component.LayoutClickEvent, Component.LayoutClickListener, Component.LayoutClickNotifier, Component.Margin, Component.MouseEventDetails, Component.OrderedContainer, Component.OuterMargin, Component.SecuredActionsHolder, Component.ShortcutAction, Component.ShortcutNotifier, Component.ShortcutTriggeredEvent, Component.Spacing, Component.UiPermissionAware, Component.Validatable, Component.ValueChangeEvent, Component.ValueChangeListener, Component.Wrapper
SWING_PROPERTY_CLASS, SWING_PROPERTY_ID
AUTO_SIZE, AUTO_SIZE_PX, UNITS_PERCENTAGE, UNITS_PIXELS
Constructor and Description |
---|
DesktopCheckBox() |
Modifier and Type | Method and Description |
---|---|
void |
commit()
Updates all changes since the previous commit to the data source.
|
void |
discard()
Discards all changes since last commit.
|
Datasource |
getDatasource() |
java.lang.String |
getDescription() |
MetaProperty |
getMetaProperty() |
MetaPropertyPath |
getMetaPropertyPath() |
java.lang.Boolean |
getValue() |
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 |
setDatasource(Datasource datasource,
java.lang.String property)
Set datasource and its property.
|
void |
setDescription(java.lang.String description) |
void |
setParent(Component parent)
INTERNAL.
Component.Container.add(Component) is normally used for adding components
to a parent and the used method will call this method implicitly. |
void |
setValue(java.lang.Object value) |
void |
updateEnabled() |
addListener, addValidator, addValueChangeListener, getRequiredMessage, getValidators, isEditable, isRequired, isValid, removeListener, removeValidator, removeValueChangeListener, setEditable, setRequired, setRequiredMessage, updateMissingValueState, validate
addStyleName, assignAutoDebugId, getAlignment, getCaption, getComponent, getComposition, getDebugId, getFrame, getHeight, getHeightUnits, getIcon, getId, getParent, getStyleName, getTabIndex, getWidth, getWidthUnits, getXmlDescriptor, isComponentVisible, isEnabled, isEnabledItself, isParentEnabled, isResponsive, isVisible, isVisibleItself, removeStyleName, requestFocus, setAlignment, setCaption, setContainer, setDebugId, setEnabled, setExpanded, setFrame, setHeight, setIcon, setId, setParentEnabled, setResponsive, setStyleName, setTabIndex, setVisible, setWidth, setXmlDescriptor, unwrap, unwrapComposition
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addValidator, getRequiredMessage, getValidators, isRequired, removeValidator, setRequired, setRequiredMessage
addListener, addValueChangeListener, removeListener, removeValueChangeListener
isEditable, isEditableWithParent, setEditable
getFrame, setFrame
addStyleName, getAlignment, getDebugId, getHeight, getHeightUnits, getId, getParent, getStyleName, getWidth, getWidthUnits, isEnabled, isEnabledItself, isResponsive, isVisible, isVisibleItself, removeStyleName, requestFocus, setAlignment, setDebugId, setEnabled, setHeight, setHeightAuto, setHeightFull, setId, setResponsive, setSizeAuto, setSizeFull, setStyleName, setVisible, setWidth, setWidthAuto, setWidthFull, unwrap, unwrapComposition
getCaption, setCaption
isValid, isValidateOnCommit, validate
getIcon, setIcon
getTabIndex, isFocusable, setFocusable, setTabIndex
public java.lang.Boolean getValue()
getValue
in interface CheckBox
getValue
in interface Component.HasValue
public void setValue(java.lang.Object value)
setValue
in interface Component.HasValue
public Datasource getDatasource()
getDatasource
in interface DatasourceComponent
public MetaProperty getMetaProperty()
getMetaProperty
in interface DatasourceComponent
public MetaPropertyPath getMetaPropertyPath()
getMetaPropertyPath
in interface DatasourceComponent
public void setDatasource(Datasource datasource, java.lang.String property)
DatasourceComponent
setDatasource
in interface DatasourceComponent
public void setParent(Component parent)
Component
Component.Container.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 DesktopAbstractField<javax.swing.JCheckBox>
parent
- Parent componentpublic java.lang.String getDescription()
getDescription
in interface Component.HasCaption
public void setDescription(java.lang.String description)
setDescription
in interface Component.HasCaption
public void updateEnabled()
public boolean isChecked()
public void commit()
Component.Buffered
commit
in interface Component.Buffered
public void discard()
Component.Buffered
discard
in interface Component.Buffered
public boolean isBuffered()
isBuffered
in interface Component.Buffered
true
if buffered mode is on, false
otherwisepublic void setBuffered(boolean buffered)
Component.Buffered
When in buffered mode, an internal buffer will be used to store changes
until Component.Buffered.commit()
is called. Calling Component.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 Component.Buffered.commit()
and
Component.Buffered.discard()
methods serve no purpose.
setBuffered
in interface Component.Buffered
buffered
- true
if buffered mode should be turned on, false
otherwisepublic boolean isModified()
Component.Buffered
isModified
in interface Component.Buffered
true
if the value in the object has been modified
since the last data source update, false
if not.