Class BmPictureModel
java.lang.Object
- All Implemented Interfaces:
IAttribute<IBmObject,
,org.eclipse.emf.ecore.EStructuralFeature> IEditableModel
,IEmfAttribute<IBmObject>
,IModel
,IEmfValueAttribute<Picture,
,IBmObject> IValue<Picture>
,IValidable
,IModelApiAwareModel
,IPictureModel
Picture model implementation
IPictureModel
}.-
Constructor Summary
ConstructorsConstructorDescriptionBmPictureModel
(org.eclipse.emf.ecore.EObject object, org.eclipse.emf.ecore.EStructuralFeature feature, IV8Project v8project) Instantiates a new picture model.BmPictureModel
(org.eclipse.emf.ecore.EObject object, org.eclipse.emf.ecore.EStructuralFeature feature, IV8Project v8project, IPictureService pictureService, boolean canChoiseFromFile) Instantiates a new picture model. -
Method Summary
Modifier and TypeMethodDescriptionvoid
clean()
Clean picture valuevoid
commit()
Commits the changes to the data model.void
dispose()
Disposes this model.org.eclipse.emf.ecore.EObject
Gets model object for setting pictureReturns picture service.Returns configuration params.boolean
Checks the value for equality with the current stored value.boolean
true
if this picture can be stored as file in file system.void
Sets picture parts.protected void
setObjectValue
(org.eclipse.emf.ecore.EObject object, org.eclipse.emf.ecore.EStructuralFeature feature, Picture valueToApply) Sets the new value of the provided model object feature during the commit.
The method is invoked within the task, so the given objects have the relevant state (e.g. attached to transaction).Methods inherited from class com._1c.g5.v8.dt.aef2.bm.models.BmValue
adapt, createTask, getChange, getModelApi, getObject, getObjectValue, getProperty, processBmValueChange, setModelApi
Methods inherited from class com._1c.g5.aef2.models.value.Value
addValueListener, createWorkingCopy, discard, get, 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, endExternalUpdate, getComponent, getCurrentChangeOrigin, getRunnableQueue, isOnline, notifyModelChanged, notifyModelCommitted, removeModelListener, setComponent, 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, discard, getChange, getComponent, isOnline, removeModelListener, setComponent
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, get, removeValueListener, set
-
Constructor Details
-
BmPictureModel
public BmPictureModel(org.eclipse.emf.ecore.EObject object, org.eclipse.emf.ecore.EStructuralFeature feature, IV8Project v8project) Instantiates a new picture model.- Parameters:
object
- the object, can not benull
feature
- the object feature, can not benull
v8project
- the V8 project, can not benull
-
BmPictureModel
public BmPictureModel(org.eclipse.emf.ecore.EObject object, org.eclipse.emf.ecore.EStructuralFeature feature, IV8Project v8project, IPictureService pictureService, boolean canChoiseFromFile) Instantiates a new picture model.- Parameters:
object
- the object, can not benull
feature
- the object feature, can not benull
v8project
- the V8 project, can not benull
pictureService
- the pictureService, can benull
canChoiseFromFile
- is this picture can choise from file, must be false ifpictureService
isnull
-
-
Method Details
-
dispose
public void dispose()Description copied from interface:IModel
Disposes this model. -
getV8project
Returns configuration params.- Specified by:
getV8project
in interfaceIPictureModel
- Returns:
- the project parameters.
-
getPictureService
Description copied from interface:IPictureModel
Returns picture service.- Specified by:
getPictureService
in interfaceIPictureModel
- Returns:
- the picture service
-
isPictureCanChoiseFromFile
public boolean isPictureCanChoiseFromFile()Description copied from interface:IPictureModel
true
if this picture can be stored as file in file system. This option affect to show tab "from file" in choise picture dialog.- Specified by:
isPictureCanChoiseFromFile
in interfaceIPictureModel
- Returns:
true
if this picture can be stored as file,false
in otherwise.
-
isEqual
Description copied from interface:IValue
Checks the value for equality with the current stored value. -
commit
public void commit()Description copied from interface:IModel
Commits the changes to the data model. -
set
Description copied from interface:IPictureModel
Sets picture parts.- Specified by:
set
in interfaceIPictureModel
- Parameters:
object
- the picture to set -null
,Picture
orString
typetransparentPoint
- the transparentPoint
-
clean
public void clean()Description copied from interface:IPictureModel
Clean picture value- Specified by:
clean
in interfaceIPictureModel
-
getModelObject
public org.eclipse.emf.ecore.EObject getModelObject()Description copied from interface:IPictureModel
Gets model object for setting picture- Specified by:
getModelObject
in interfaceIPictureModel
- Returns:
- model object for setting picture, never
null
-
setObjectValue
protected void setObjectValue(org.eclipse.emf.ecore.EObject object, org.eclipse.emf.ecore.EStructuralFeature feature, Picture valueToApply) Description copied from class:BmValue
Sets the new value of the provided model object feature during the commit.
The method is invoked within the task, so the given objects have the relevant state (e.g. attached to transaction).- Overrides:
setObjectValue
in classBmValue<Picture>
- Parameters:
object
- the object to set new value, cannot benull
.feature
- the feture to set, cannot benull
.valueToApply
- the new value to set, can benull
.
-