Class AbstractControlComponent<M extends IModel,P extends IParameterization,V extends ControlViewModel>
- 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<M,P,V>
-
- Type Parameters:
M- the model type.P- the parameterization type.V- the view model type.
- All Implemented Interfaces:
IComponent<M>,IEventChannel
- Direct Known Subclasses:
AbstractDtSelectComponent,AbstractGridComponent,BigDecimalSpinnerComponent,ButtonComponent,CheckableLabelComponent,CheckBoxComponent,ComboComponent,ComboLabelComponent,CommonPicturePreviewImageComponent,CommonPicturePreviewImageSizeComponent,DoubleSpinnerComponent,DtDynamicTableComponent,DtDynamicTreeComponent,DtMappedCheckboxComponent,DtPictureComponent,EnumRadioGroupComponent,ImageButtonComponent,LabelComponent,LinkComponent,LongSpinnerComponent,NullableSpinnerComponent,RadioGroupComponent,RadioGroupComponent,SeparatorComponent,SpinnerComponent,TextComponent,TextPreviewComponent,ToolBarComponent,TreeComponent
public abstract class AbstractControlComponent<M extends IModel,P extends IParameterization,V extends ControlViewModel> extends StandardComponent<M,P>
The basic class for all control components.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com._1c.g5.aef2.standard.components.StandardComponent
StandardComponent.BindingDirection
-
-
Constructor Summary
Constructors Constructor Description AbstractControlComponent(P parameterization)Creates control component instance.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract VcreateControlViewModel()Creates control view model instance.protected voidcreateViewModels()Creates the view models of this component.protected voiddisposeViewModels()Disposes the view models of this component.protected VgetControlViewModel()protected voidhandleExternalValidationEvent(ExternalValidationEvent event)Handles inbound external validationevent.protected booleanisEditable()Checks is component editable.protected voidrefresh()Refreshes the component.voidsetLayoutData(IAefLayoutData layoutData)Sets the layout data object.voidupdateViewModels()Updates view models of the component.-
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, attachToModel, beginExternalUpdate, checkComponents, checkViewModels, commit, createComponents, detachFromModel, 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
-
AbstractControlComponent
public AbstractControlComponent(P parameterization)
Creates control component instance.- Parameters:
parameterization- the parameterization instance.
-
-
Method Detail
-
setLayoutData
public void setLayoutData(IAefLayoutData layoutData)
Description copied from class:StandardComponentSets the layout data object.- Overrides:
setLayoutDatain classStandardComponent<M extends IModel,P extends IParameterization>- Parameters:
layoutData- the layout data to set, can benull.
-
createViewModels
protected void createViewModels()
Description copied from class:ComponentCreates the view models of this component. Override it to provide a view models of this component.- Overrides:
createViewModelsin classStandardComponent<M extends IModel,P extends IParameterization>
-
updateViewModels
public void updateViewModels()
Description copied from class:StandardComponentUpdates view models of the component. Override it to update view model properties according to current state of the component.- Overrides:
updateViewModelsin classStandardComponent<M extends IModel,P extends IParameterization>
-
getControlViewModel
protected final V getControlViewModel()
- Returns:
- the control view model
-
disposeViewModels
protected void disposeViewModels()
Description copied from class:ComponentDisposes the view models of this component. Override it to do some additional disposal operations specific to a component.- Overrides:
disposeViewModelsin classStandardComponent<M extends IModel,P extends IParameterization>
-
refresh
protected void refresh()
Refreshes the component. It disposes the view model and recreate it again.
NOTE: The refresh may be used in highly specialized cases when the component creates different view models depending on some conditions.
-
isEditable
protected boolean isEditable()
Checks is component editable.- Returns:
trueif editable,falseotherwise
-
handleExternalValidationEvent
protected void handleExternalValidationEvent(ExternalValidationEvent event)
Description copied from class:StandardComponentHandles inbound external validationevent.- Overrides:
handleExternalValidationEventin classStandardComponent<M extends IModel,P extends IParameterization>- Parameters:
event- the event, cannot benull.
-
createControlViewModel
protected abstract V createControlViewModel()
Creates control view model instance.- Returns:
- a newly created control view model.
-
-