Class CheckableLabelComponent<M,VM extends CheckableLabelViewModel>
- java.lang.Object
-
- com._1c.g5.aef2.components.Component<M,P>
-
- com._1c.g5.aef2.standard.components.StandardComponent<M,P>
-
- com._1c.g5.aef2.standard.components.AbstractControlComponent<IValue<M>,ILabeledParametrization,VM>
-
- com._1c.g5.aef2.standard.components.CheckableLabelComponent<M,VM>
-
- All Implemented Interfaces:
IComponent<IValue<M>>
,IEventChannel
- Direct Known Subclasses:
ExtendedLabelComponent
public class CheckableLabelComponent<M,VM extends CheckableLabelViewModel> extends AbstractControlComponent<IValue<M>,ILabeledParametrization,VM>
Checkable label component that shows lable and checkbox.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com._1c.g5.aef2.standard.components.StandardComponent
StandardComponent.BindingDirection
-
-
Constructor Summary
Constructors Constructor Description CheckableLabelComponent(ILabeledParametrization parametrization)
Constructor ofCheckableLabelComponent
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
attachToModel()
Attaches this component to the model.protected M
convertBooleanToValue(Boolean viewValue)
Converts the checkbox state value to model value.protected Boolean
convertValueToBoolean(M modelValue)
Converts the model value to the checkbox state.protected VM
createCheckedLabelViewModel()
Creates view model.protected VM
createControlViewModel()
Creates control view model instance.protected void
detachFromModel()
Detaches this component from the model.-
Methods inherited from class com._1c.g5.aef2.standard.components.AbstractControlComponent
createViewModels, disposeViewModels, getControlViewModel, handleExternalValidationEvent, isEditable, refresh, setLayoutData, updateViewModels
-
Methods inherited from class com._1c.g5.aef2.standard.components.StandardComponent
bindList, bindModel, bindValue, bindValue, createDefaultViewModelList, createDefaultViewModelValue, getLayoutData, isEnabled, isPassive, setEnabled, setFocus, updateViewModelStatus
-
Methods inherited from class com._1c.g5.aef2.components.Component
addComponent, addListener, addViewModel, areChildCommitsEnabled, areChildRefreshEnabled, areComponentsCreated, beginExternalUpdate, checkComponents, checkViewModels, commit, createComponents, dispose, disposeComponents, endExternalUpdate, getComponents, getModel, getParameterization, getParent, getRunnableQueue, getScene, getServiceEventQualifiers, getViewModels, isDisposed, isInExternalUpdate, queueAndWaitEvent, queueEvent, removeComponent, removeListener, removeViewModel, setChildCommitsEnabled, setChildRefreshEnable, setModel, setParent, setScene, subscribeOnEvents, subscribeOnEvents, unsubscribeOnEvents
-
-
-
-
Constructor Detail
-
CheckableLabelComponent
public CheckableLabelComponent(ILabeledParametrization parametrization)
Constructor ofCheckableLabelComponent
.- Parameters:
parametrization
- the label parametrization, cannot benull
-
-
Method Detail
-
attachToModel
protected void attachToModel()
Description copied from class:Component
Attaches this component to the model. Override it to add some listeners to the model.- Overrides:
attachToModel
in classComponent<IValue<M>,ILabeledParametrization>
-
detachFromModel
protected void detachFromModel()
Description copied from class:Component
Detaches this component from the model. Override it to remove listeners from the model.- Overrides:
detachFromModel
in classComponent<IValue<M>,ILabeledParametrization>
-
createControlViewModel
protected VM createControlViewModel()
Description copied from class:AbstractControlComponent
Creates control view model instance.- Specified by:
createControlViewModel
in classAbstractControlComponent<IValue<M>,ILabeledParametrization,VM extends CheckableLabelViewModel>
- Returns:
- a newly created control view model.
-
createCheckedLabelViewModel
protected VM createCheckedLabelViewModel()
Creates view model.- Returns:
- the checked label view model, cannot be
null
-
convertBooleanToValue
protected M convertBooleanToValue(Boolean viewValue)
Converts the checkbox state value to model value.- Parameters:
value
- the boolean value, cannot benull
- Returns:
- the model value, cannot be
null
-
-