Class AbstractReferenceValueComponentPart<VM extends ValueControlViewModel>
- java.lang.Object
-
- com._1c.g5.v8.dt.md.ui.aef.components.value.AbstractValueComponentPart<VM,ReferenceValue>
-
- com._1c.g5.v8.dt.md.ui.aef.components.value.AbstractReferenceValueComponentPart<VM>
-
- All Implemented Interfaces:
IValueComponentPart<VM,IValueModel,ReferenceValue>
- Direct Known Subclasses:
EnumValueComponentPart
,PredefinedValueComponentPart
public abstract class AbstractReferenceValueComponentPart<VM extends ValueControlViewModel> extends AbstractValueComponentPart<VM,ReferenceValue>
The abstractIValueComponentPart
implementation forReferenceValue
.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractReferenceValueComponentPart(Class<? extends org.eclipse.emf.ecore.EObject>[] valueClasses, Class<? extends MdObject> supportedContainerType, String... supportedTypeCategories)
Creates a new component part.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected MdObject
getContainer(IValueModel model)
Returns theMdObject
for the givenIValue.get()
value.protected MdObject
getContainer(EmptyRef value)
protected String
getTypeName(TypeItem item)
Returns the type name of the item.protected boolean
isSuitableContainer(MdObject mdObject)
Returnstrue
if the given object is suitable for component part.protected boolean
isSuitableValue(IValueModel model)
Returnstrue
if the model is suitable by valueIValue.get()
.-
Methods inherited from class com._1c.g5.v8.dt.md.ui.aef.components.value.AbstractValueComponentPart
bindViewModel, handleButtonPressed, hasClearAction, isEditable, isSuitable, isSuitableTypeName
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com._1c.g5.v8.dt.md.ui.aef.components.value.IValueComponentPart
createMapper, createViewModel, getViewModelBindingFeature
-
-
-
-
Constructor Detail
-
AbstractReferenceValueComponentPart
protected AbstractReferenceValueComponentPart(Class<? extends org.eclipse.emf.ecore.EObject>[] valueClasses, Class<? extends MdObject> supportedContainerType, String... supportedTypeCategories)
Creates a new component part.- Parameters:
valueClasses
- the supported inner value classes ofReferenceValue
.supportedContainerType
- the supported container type, cannot benull
.supportedTypeCategories
- the supported type categories.
-
-
Method Detail
-
isSuitableValue
protected boolean isSuitableValue(IValueModel model)
Description copied from class:AbstractValueComponentPart
Returnstrue
if the model is suitable by valueIValue.get()
.- Overrides:
isSuitableValue
in classAbstractValueComponentPart<VM extends ValueControlViewModel,ReferenceValue>
- Parameters:
model
- theIValueModel
.- Returns:
true
if the given model is suitable by value.
-
getTypeName
protected String getTypeName(TypeItem item)
Description copied from class:AbstractValueComponentPart
Returns the type name of the item. It uses the {@link McoreUtil#getTypeName(TypeItem))- Overrides:
getTypeName
in classAbstractValueComponentPart<VM extends ValueControlViewModel,ReferenceValue>
- Parameters:
item
- theTypeItem
- Returns:
- the type name
-
getContainer
protected MdObject getContainer(IValueModel model)
Returns theMdObject
for the givenIValue.get()
value.- Parameters:
model
- theIValueModel
.- Returns:
- the
MdObject
.
-
getContainer
protected MdObject getContainer(EmptyRef value)
- Parameters:
value
- the empty value.- Returns:
- the
MdObject
.
-
-