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
ConstructorsConstructorDescriptionCheckableLabelComponent(ILabeledParametrization parametrization) Constructor ofCheckableLabelComponent. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidAttaches this component to the model.protected MconvertBooleanToValue(Boolean viewValue) Converts the checkbox state value to model value.protected BooleanconvertValueToBoolean(M modelValue) Converts the model value to the checkbox state.protected VMCreates view model.protected VMCreates control view model instance.protected voidDetaches this component from the model.Methods inherited from class com._1c.g5.aef2.standard.components.AbstractControlComponent
createViewModels, disposeViewModels, getControlViewModel, handleExternalValidationEvent, isEditable, refresh, setLayoutData, updateViewModelsMethods inherited from class com._1c.g5.aef2.standard.components.StandardComponent
bindList, bindModel, bindValue, bindValue, createDefaultViewModelList, createDefaultViewModelValue, getLayoutData, isEnabled, isPassive, setEnabled, setFocus, updateViewModelStatusMethods 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 Details
-
CheckableLabelComponent
Constructor ofCheckableLabelComponent.- Parameters:
parametrization- the label parametrization, cannot benull
-
-
Method Details
-
attachToModel
protected void attachToModel()Description copied from class:ComponentAttaches this component to the model. Override it to add some listeners to the model.- Overrides:
attachToModelin classComponent<IValue<M>,ILabeledParametrization>
-
detachFromModel
protected void detachFromModel()Description copied from class:ComponentDetaches this component from the model. Override it to remove listeners from the model.- Overrides:
detachFromModelin classComponent<IValue<M>,ILabeledParametrization>
-
createControlViewModel
Description copied from class:AbstractControlComponentCreates control view model instance.- Specified by:
createControlViewModelin classAbstractControlComponent<IValue<M>,ILabeledParametrization, VM extends CheckableLabelViewModel> - Returns:
- a newly created control view model.
-
createCheckedLabelViewModel
Creates view model.- Returns:
- the checked label view model, cannot be
null
-
convertBooleanToValue
Converts the checkbox state value to model value.- Parameters:
value- the boolean value, cannot benull- Returns:
- the model value, cannot be
null
-
convertValueToBoolean
Converts the model value to the checkbox state.- Parameters:
modelValue- the model value, cannot benull- Returns:
- the boolean value, cannot be
null
-