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 V
createControlViewModel()
Creates control view model instance.protected void
createViewModels()
Creates the view models of this component.protected void
disposeViewModels()
Disposes the view models of this component.protected V
getControlViewModel()
protected void
handleExternalValidationEvent(ExternalValidationEvent event)
Handles inbound external validationevent
.protected boolean
isEditable()
Checks is component editable.protected void
refresh()
Refreshes the component.void
setLayoutData(IAefLayoutData layoutData)
Sets the layout data object.void
updateViewModels()
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:StandardComponent
Sets the layout data object.- Overrides:
setLayoutData
in classStandardComponent<M extends IModel,P extends IParameterization>
- Parameters:
layoutData
- the layout data to set, can benull
.
-
createViewModels
protected void createViewModels()
Description copied from class:Component
Creates the view models of this component. Override it to provide a view models of this component.- Overrides:
createViewModels
in classStandardComponent<M extends IModel,P extends IParameterization>
-
updateViewModels
public void updateViewModels()
Description copied from class:StandardComponent
Updates view models of the component. Override it to update view model properties according to current state of the component.- Overrides:
updateViewModels
in 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:Component
Disposes the view models of this component. Override it to do some additional disposal operations specific to a component.- Overrides:
disposeViewModels
in 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:
true
if editable,false
otherwise
-
handleExternalValidationEvent
protected void handleExternalValidationEvent(ExternalValidationEvent event)
Description copied from class:StandardComponent
Handles inbound external validationevent
.- Overrides:
handleExternalValidationEvent
in 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.
-
-