Class EmptyValueComponentPart
- java.lang.Object
-
- com._1c.g5.v8.dt.md.ui.aef.components.value.EmptyValueComponentPart
-
- All Implemented Interfaces:
IValueComponentPart<ValueControlViewModel,IValueModel,Value>
public class EmptyValueComponentPart extends Object implements IValueComponentPart<ValueControlViewModel,IValueModel,Value>
TheIValueComponentPart
implementation forValue
objects that is not supported.
-
-
Constructor Summary
Constructors Constructor Description EmptyValueComponentPart()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
bindViewModel(ValueControlViewModel viewModel, IValueModel model, IMapper<Value,?> mapper)
Binds the given view model to model.IMapper<Value,?>
createMapper(ValueControlViewModel viewModel, IValueModel model)
Returns the newly created mapper that maps theValue
to view model.ValueControlViewModel
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.void
handleButtonPressed(ValueControlViewModel viewModel, IValueModel model)
Handles the button events.boolean
hasClearAction(ValueControlViewModel viewModel, IValueModel model)
Returnstrue
if the value component should create clear action button for the given model.boolean
isSuitable(IValueModel model)
Returns thetrue
if the part is suitable for the givenmodel
.
-
-
-
Method Detail
-
isSuitable
public boolean isSuitable(IValueModel model)
Description copied from interface:IValueComponentPart
Returns thetrue
if the part is suitable for the givenmodel
.- Specified by:
isSuitable
in interfaceIValueComponentPart<ValueControlViewModel,IValueModel,Value>
- Parameters:
model
- theIValueModel
.- Returns:
- the
true
if the part is suitable for the givenmodel
.
-
bindViewModel
public void bindViewModel(ValueControlViewModel viewModel, IValueModel model, IMapper<Value,?> 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<ValueControlViewModel,IValueModel,Value>
- Parameters:
viewModel
- the view model to bind.model
- theIValueModel
.mapper
- theIMapper
instance.
-
handleButtonPressed
public void handleButtonPressed(ValueControlViewModel viewModel, IValueModel model)
Description copied from interface:IValueComponentPart
Handles the button events.- Specified by:
handleButtonPressed
in interfaceIValueComponentPart<ValueControlViewModel,IValueModel,Value>
- Parameters:
viewModel
- the view model.model
- theIValueModel
.
-
createViewModel
public ValueControlViewModel createViewModel(IValueModel model)
Description copied from interface:IValueComponentPart
Creates a view model for the givenmodel
.- Specified by:
createViewModel
in interfaceIValueComponentPart<ValueControlViewModel,IValueModel,Value>
- 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.- Specified by:
getViewModelBindingFeature
in interfaceIValueComponentPart<ValueControlViewModel,IValueModel,Value>
- Returns:
- the view model feature that is binds by
value component or
null
.
-
createMapper
public IMapper<Value,?> createMapper(ValueControlViewModel viewModel, IValueModel model)
Description copied from interface:IValueComponentPart
Returns the newly created mapper that maps theValue
to view model.- Specified by:
createMapper
in interfaceIValueComponentPart<ValueControlViewModel,IValueModel,Value>
- Parameters:
viewModel
- the view model.model
- theIValueModel
.- Returns:
- the mapper.
-
hasClearAction
public boolean hasClearAction(ValueControlViewModel viewModel, IValueModel model)
Description copied from interface:IValueComponentPart
Returnstrue
if the value component should create clear action button for the given model.- Specified by:
hasClearAction
in interfaceIValueComponentPart<ValueControlViewModel,IValueModel,Value>
- Parameters:
viewModel
- the view model.model
- theIValueModel
.- Returns:
true
if the clear action button is required.
-
-