Class BmValueModel
- java.lang.Object
-
- com._1c.g5.aef2.validators.Validable
-
- com._1c.g5.aef2.models.Model
-
- com._1c.g5.aef2.models.EditableModel
-
- com._1c.g5.aef2.models.value.Value<T>
-
- com._1c.g5.v8.dt.aef2.bm.models.BmValue<Value>
-
- com._1c.g5.v8.dt.md.ui.aef.models.value.BmValueModel
-
- All Implemented Interfaces:
IAttribute<IBmObject,org.eclipse.emf.ecore.EStructuralFeature>
,IEditableModel
,IEmfAttribute<IBmObject>
,IModel
,IEmfValueAttribute<Value,IBmObject>
,IValue<Value>
,IValidable
,IModelApiAwareModel
,IValueModel
- Direct Known Subclasses:
AddressingAttributeModel
,BmCharacteristicsDescriptionValueModel
,UnfilledParentValueModel
public class BmValueModel extends BmValue<Value> implements IValueModel
The BMIValueModel
implementation.
-
-
Field Summary
Fields Modifier and Type Field Description protected IModelListener
listener
protected IValue<TypeDescription>
typeDescriptionValue
protected IValue<TypeItem>
typeItemValue
-
Constructor Summary
Constructors Constructor Description BmValueModel(org.eclipse.emf.ecore.EObject object, org.eclipse.emf.ecore.EStructuralFeature feature, IV8Project v8project, IColorProvider colorProvider, IFontProvider fontProvider)
Creates a new model.BmValueModel(org.eclipse.emf.ecore.EObject object, org.eclipse.emf.ecore.EStructuralFeature feature, org.eclipse.emf.ecore.EStructuralFeature typeDescriptionFeature, IV8Project v8project)
Creates a new model.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
createTypeDescriptionModel(org.eclipse.emf.ecore.EStructuralFeature typeDescriptionFeature)
Creates type description source model.void
dispose()
Disposes this model.Value
get()
IColorProvider
getColorProvider()
protected org.eclipse.emf.ecore.EObject
getContextObject()
Returns the context object to retrieve types.TypeItem
getCurrentTypeItem()
Returns the currentTypeItem
.IFontProvider
getFontProvider()
TypeDescription
getTypeDescription()
Returns theTypeDescription
of the object that keeps theValue
.IValue<TypeItem>
getTypeItemModel()
Returns the model ofTypeItem
.IV8Project
getV8project()
Returns the {@link IV8Project).protected void
initTypeItemModelExternal()
Inits TypeItem model external.boolean
isEqual(Value other)
Checks the value for equality with the current stored value.void
setComponent(IComponent<?> component)
Associate this model with the component.-
Methods inherited from class com._1c.g5.v8.dt.aef2.bm.models.BmValue
adapt, createTask, getChange, getModelApi, getObject, getObjectValue, getProperty, processBmValueChange, setModelApi, setObjectValue
-
Methods inherited from class com._1c.g5.aef2.models.value.Value
addValueListener, createWorkingCopy, discard, getCommittedValue, getUncommittedValue, getValidatorTarget, notifyValueChanged, queueNotifyValueChanged, removeValueListener, set, setCommittedValue, setUncommittedValue, setValue, toString
-
Methods inherited from class com._1c.g5.aef2.models.EditableModel
isEditable, setEditable
-
Methods inherited from class com._1c.g5.aef2.models.Model
addModelListener, beginExternalUpdate, checkOffline, checkOnline, commit, endExternalUpdate, getComponent, getCurrentChangeOrigin, getRunnableQueue, isOnline, notifyModelChanged, notifyModelCommitted, removeModelListener, setOnline
-
Methods inherited from class com._1c.g5.aef2.validators.Validable
addValidator, removeValidator, validate, validate
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com._1c.g5.aef2.models.IModel
addModelListener, commit, discard, getChange, getComponent, isOnline, removeModelListener
-
Methods inherited from interface com._1c.g5.aef2.validators.IValidable
addValidator, removeValidator, validate, validate
-
Methods inherited from interface com._1c.g5.aef2.models.value.IValue
addValueListener, createWorkingCopy, removeValueListener, set
-
Methods inherited from interface com._1c.g5.v8.dt.md.ui.aef.models.value.IValueModel
convertTypeItemToValue, getObject
-
-
-
-
Field Detail
-
typeDescriptionValue
protected IValue<TypeDescription> typeDescriptionValue
-
listener
protected IModelListener listener
-
-
Constructor Detail
-
BmValueModel
public BmValueModel(org.eclipse.emf.ecore.EObject object, org.eclipse.emf.ecore.EStructuralFeature feature, org.eclipse.emf.ecore.EStructuralFeature typeDescriptionFeature, IV8Project v8project)
Creates a new model.- Parameters:
object
- theIBmObject
that keeps theValue
feature, cannot benull
feature
- the feature of theValue
object, cannot benull
typeDescriptionFeature
- the feature of theTypeDescription
object, cannot benull
v8project
- the V8 project, cannot benull
-
BmValueModel
public BmValueModel(org.eclipse.emf.ecore.EObject object, org.eclipse.emf.ecore.EStructuralFeature feature, IV8Project v8project, IColorProvider colorProvider, IFontProvider fontProvider)
Creates a new model.
-
-
Method Detail
-
setComponent
public void setComponent(IComponent<?> component)
Description copied from interface:IModel
Associate this model with the component.- Specified by:
setComponent
in interfaceIModel
- Overrides:
setComponent
in classModel
- Parameters:
component
- the component to associate with.
-
get
public Value get()
-
getTypeItemModel
public IValue<TypeItem> getTypeItemModel()
Description copied from interface:IValueModel
Returns the model ofTypeItem
. It is the changeable model that can be changed from component, i.e. in case the user select the type from type selection dialog, or can be changed in automatically in case if theTypeDescription
was changed.- Specified by:
getTypeItemModel
in interfaceIValueModel
- Returns:
- the model of
TypeItem
, cannot benull
-
isEqual
public boolean isEqual(Value other)
Description copied from interface:IValue
Checks the value for equality with the current stored value.
-
dispose
public void dispose()
Description copied from interface:IModel
Disposes this model.
-
getTypeDescription
public TypeDescription getTypeDescription()
Description copied from interface:IValueModel
Returns theTypeDescription
of the object that keeps theValue
.- Specified by:
getTypeDescription
in interfaceIValueModel
- Returns:
- the
TypeDescription
instance.
-
getCurrentTypeItem
public TypeItem getCurrentTypeItem()
Description copied from interface:IValueModel
Returns the currentTypeItem
. It is calculated object that is depends on current state ofIValueModel.getTypeItemModel()
andIValueModel.getTypeDescription()
.- Specified by:
getCurrentTypeItem
in interfaceIValueModel
- Returns:
- the current
TypeItem
.
-
getV8project
public IV8Project getV8project()
Description copied from interface:IValueModel
Returns the {@link IV8Project).- Specified by:
getV8project
in interfaceIValueModel
- Returns:
- the v8 project.
-
getColorProvider
public IColorProvider getColorProvider()
- Specified by:
getColorProvider
in interfaceIValueModel
- Returns:
- the color provider, can be
null
-
getFontProvider
public IFontProvider getFontProvider()
- Specified by:
getFontProvider
in interfaceIValueModel
- Returns:
- the font provider, can be
null
-
createTypeDescriptionModel
protected void createTypeDescriptionModel(org.eclipse.emf.ecore.EStructuralFeature typeDescriptionFeature)
Creates type description source model.- Parameters:
typeDescriptionFeature
- the type description source field
-
initTypeItemModelExternal
protected void initTypeItemModelExternal()
Inits TypeItem model external.
-
getContextObject
protected org.eclipse.emf.ecore.EObject getContextObject()
Returns the context object to retrieve types.- Returns:
- the context object.
-
-