Class SysEnumValueComponentPart
- java.lang.Object
-
- com._1c.g5.v8.dt.md.ui.aef.components.value.AbstractValueComponentPart<SysEnumValueControlViewModel,SysEnumValue>
-
- com._1c.g5.v8.dt.md.ui.aef.components.value.SysEnumValueComponentPart
-
- All Implemented Interfaces:
IValueComponentPart<SysEnumValueControlViewModel,IValueModel,SysEnumValue>
public class SysEnumValueComponentPart extends AbstractValueComponentPart<SysEnumValueControlViewModel,SysEnumValue>
TheIValueComponentPart
implementation forSysEnumValue
.
-
-
Constructor Summary
Constructors Constructor Description SysEnumValueComponentPart()
Creates a new component part.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
bindViewModel(SysEnumValueControlViewModel viewModel, IValueModel model, IMapper<SysEnumValue,?> mapper)
Binds the given view model to model.IMapper<SysEnumValue,?>
createMapper(SysEnumValueControlViewModel viewModel, IValueModel model)
Returns the newly created mapper that maps theValue
to view model.SysEnumValueControlViewModel
createViewModel(IValueModel model)
Creates a view model for the givenmodel
.org.eclipse.emf.ecore.EStructuralFeature
getViewModelBindingFeature()
Returns the view model feature that is binds by value component.protected boolean
isSuitableTypeName(IValueModel model)
Returnstrue
if the model is suitable by theIValueModel.getCurrentTypeItem()
.-
Methods inherited from class com._1c.g5.v8.dt.md.ui.aef.components.value.AbstractValueComponentPart
getTypeName, handleButtonPressed, hasClearAction, isEditable, isSuitable, isSuitableValue
-
-
-
-
Method Detail
-
bindViewModel
public void bindViewModel(SysEnumValueControlViewModel viewModel, IValueModel model, IMapper<SysEnumValue,?> mapper)
Description copied from interface:IValueComponentPart
Binds the given view model to model. It is the extra binding that is needed to fill view model with additional data.
NOTE: implement this functionality only if the default component binding usingIValueComponentPart.getViewModelBindingFeature()
and#createMapper()
is not enough.- Specified by:
bindViewModel
in interfaceIValueComponentPart<SysEnumValueControlViewModel,IValueModel,SysEnumValue>
- Overrides:
bindViewModel
in classAbstractValueComponentPart<SysEnumValueControlViewModel,SysEnumValue>
- Parameters:
viewModel
- the view model to bind.model
- theIValueModel
.mapper
- theIMapper
instance.
-
createViewModel
public SysEnumValueControlViewModel createViewModel(IValueModel model)
Description copied from interface:IValueComponentPart
Creates a view model for the givenmodel
.- Parameters:
model
- theIValueModel
.- Returns:
- the newly created view model.
-
getViewModelBindingFeature
public org.eclipse.emf.ecore.EStructuralFeature getViewModelBindingFeature()
Description copied from interface:IValueComponentPart
Returns the view model feature that is binds by value component.- Returns:
- the view model feature that is binds by
value component or
null
.
-
createMapper
public IMapper<SysEnumValue,?> createMapper(SysEnumValueControlViewModel viewModel, IValueModel model)
Description copied from interface:IValueComponentPart
Returns the newly created mapper that maps theValue
to view model.- Parameters:
viewModel
- the view model.model
- theIValueModel
.- Returns:
- the mapper.
-
isSuitableTypeName
protected boolean isSuitableTypeName(IValueModel model)
Description copied from class:AbstractValueComponentPart
Returnstrue
if the model is suitable by theIValueModel.getCurrentTypeItem()
.- Overrides:
isSuitableTypeName
in classAbstractValueComponentPart<SysEnumValueControlViewModel,SysEnumValue>
- Parameters:
model
- theIValueModel
.- Returns:
true
if the given model is suitable by type.
-
-