Class CommonAttributeContentTreeComponent.CommonAttributeContentMapper
- java.lang.Object
-
- com._1c.g5.v8.dt.ui.aef.mappers.AefLabelMapper<M,T>
-
- com._1c.g5.v8.dt.ui.aef.mappers.AefLabelCheckStateMapper<Object,TreeItemViewModel>
-
- com._1c.g5.v8.dt.ui.aef.component.NavigatorTreeComponent.NavigatorMapper
-
- com._1c.g5.v8.dt.md.ui.aef.components.CommonAttributeContentTreeComponent.CommonAttributeContentMapper
-
- All Implemented Interfaces:
IMapper<Object,TreeItemViewModel>
,IViewModelsMapper<Object,TreeItemViewModel>
- Enclosing class:
- CommonAttributeContentTreeComponent
protected class CommonAttributeContentTreeComponent.CommonAttributeContentMapper extends NavigatorTreeComponent.NavigatorMapper
Extended mapper for the navigator content.
-
-
Field Summary
-
Fields inherited from class com._1c.g5.v8.dt.ui.aef.mappers.AefLabelMapper
labelProvider
-
-
Constructor Summary
Constructors Constructor Description CommonAttributeContentMapper()
Create instance ofCommonAttributeContentTreeComponent.CommonAttributeContentMapper
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected CommonAttributeContentTreeComponent.CommonAttributeContentViewModelAdapter
createContentViewModelTrackingAdapter()
Creates an adapter which is responsible for tracking the view model changesprotected TreeItemViewModel
createItemViewModel()
Creates a view model item.void
dispose()
Disposes this mapper, its view models adapters.protected Pair<CommonAttributeUse,ItemViewModel>
getDefaultUseValue(CommonAttribute commonAttribute)
Gets the default value for not explicitly defined content itemprotected void
initItem(CommonAttributeContentItemViewModel viewItem, MdObject mdObject, CommonAttribute commonAttribute, CommonAttributeContentItem contentItem)
Inits the common attribute content item modelvoid
updateItemViewModel(TreeItemViewModel item, Object modelValue)
Updates item view model.-
Methods inherited from class com._1c.g5.v8.dt.ui.aef.component.NavigatorTreeComponent.NavigatorMapper
createModelToView
-
Methods inherited from class com._1c.g5.v8.dt.ui.aef.mappers.AefLabelMapper
createMapKey, getMappedModels, getMappedViewModels, mapModelToView, mapViewToModel
-
-
-
-
Constructor Detail
-
CommonAttributeContentMapper
public CommonAttributeContentMapper()
Create instance ofCommonAttributeContentTreeComponent.CommonAttributeContentMapper
-
-
Method Detail
-
dispose
public void dispose()
Disposes this mapper, its view models adapters.
-
updateItemViewModel
public void updateItemViewModel(TreeItemViewModel item, Object modelValue)
Description copied from class:AefLabelCheckStateMapper
Updates item view model.- Specified by:
updateItemViewModel
in interfaceIViewModelsMapper<Object,TreeItemViewModel>
- Overrides:
updateItemViewModel
in classAefLabelCheckStateMapper<Object,TreeItemViewModel>
- Parameters:
item
- the item view model, cannot benull
modelValue
- modelValue the model value, cannot benull
-
createItemViewModel
protected TreeItemViewModel createItemViewModel()
Description copied from class:AefLabelMapper
Creates a view model item.- Overrides:
createItemViewModel
in classNavigatorTreeComponent.NavigatorMapper
- Returns:
- the newly created view model, cannot be
null
-
getDefaultUseValue
protected Pair<CommonAttributeUse,ItemViewModel> getDefaultUseValue(CommonAttribute commonAttribute)
Gets the default value for not explicitly defined content item- Parameters:
commonAttribute
- The current common attribute, may not benull
- Returns:
- The view model for the use attribute
-
createContentViewModelTrackingAdapter
protected CommonAttributeContentTreeComponent.CommonAttributeContentViewModelAdapter createContentViewModelTrackingAdapter()
Creates an adapter which is responsible for tracking the view model changes- Returns:
- The adapter instance, may not be
null
-
initItem
protected void initItem(CommonAttributeContentItemViewModel viewItem, MdObject mdObject, CommonAttribute commonAttribute, CommonAttributeContentItem contentItem)
Inits the common attribute content item model- Parameters:
viewItem
- The model to initialize. May not benull
mdObject
- The target MD object that is the part of the content/potential content of a common attribute. May not benull
contentItem
- The correpsonding content item. May benull
commonAttribute
- The common attribute. May not benull
-
-