Package org.eclipse.graphiti.pattern.id
Class IdUpdateContext
- All Implemented Interfaces:
IContext
,IPictogramElementContext
,IUpdateContext
,IPropertyBag
This class represents a special
UpdateContext
suitable for usage
within an IdPattern
. Besides the usual UpdateContext
options
this context object also stores the associated GraphicsAlgorithm
for
the PictogramElement
of the context, the root
PictogramElement
of the pattern and the linked domain object. The
second may be of use for easier finding a certain child within a pattern
representation.- Since:
- 0.10
-
Constructor Summary
ConstructorDescriptionIdUpdateContext
(PictogramElement pictogramElement, GraphicsAlgorithm graphicsAlgorithm, PictogramElement rootPictogramElement, Object domainObject) Creates a newIdUpdateContext
instance holding the given pictogram model instances and domain object instance. -
Method Summary
Modifier and TypeMethodDescriptionReturns the stored domain object instance.Returns the storedGraphicsAlgorithm
.Returns the storedPictogramElement
.Returns the stored rootPictogramElement
.void
setDomainObject
(Object domainObject) Sets a new domain object instance.void
setGraphicsAlgorithm
(GraphicsAlgorithm graphicsAlgorithm) Sets a newGraphicsAlgorithm
for thePictogramElement
to update.void
setRootPictogramElement
(PictogramElement rootPictogramElement) Sets a new rootPictogramElement
.Methods inherited from class org.eclipse.graphiti.internal.features.context.impl.base.PictogramElementContext
setPictogramElement, toString
Methods inherited from class org.eclipse.graphiti.PropertyBag
getProperty, getPropertyKeys, putProperty
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.eclipse.graphiti.IPropertyBag
getProperty, getPropertyKeys, putProperty
-
Constructor Details
-
IdUpdateContext
public IdUpdateContext(PictogramElement pictogramElement, GraphicsAlgorithm graphicsAlgorithm, PictogramElement rootPictogramElement, Object domainObject) Creates a newIdUpdateContext
instance holding the given pictogram model instances and domain object instance.- Parameters:
pictogramElement
- ThePictogramElement
that shall be updated, seeUpdateContext
.graphicsAlgorithm
- The associatedGraphicsAlgorithm
for thePictogramElement
rootPictogramElement
- The root pictogram element, this is the one that holds the ID property for the patterndomainObject
- The domain object that is linked with the pattern root pictogram element.
-
-
Method Details
-
getPictogramElement
Returns the storedPictogramElement
.- Specified by:
getPictogramElement
in interfaceIPictogramElementContext
- Overrides:
getPictogramElement
in classPictogramElementContext
- Returns:
- The instance of the
PictogramElement
to layout.
-
getGraphicsAlgorithm
Returns the storedGraphicsAlgorithm
.- Returns:
- The instance of the
GraphicsAlgorithm
for thePictogramElement
to update.
-
setGraphicsAlgorithm
Sets a newGraphicsAlgorithm
for thePictogramElement
to update.- Parameters:
graphicsAlgorithm
- The new instance to set.
-
getRootPictogramElement
Returns the stored rootPictogramElement
.- Returns:
- The instance of the root
PictogramElement
.
-
setRootPictogramElement
Sets a new rootPictogramElement
.- Parameters:
rootPictogramElement
- The new instance to set.
-
getDomainObject
Returns the stored domain object instance.- Returns:
- The stored instance of the domain object.
-
setDomainObject
Sets a new domain object instance.- Parameters:
domainObject
- The new instance to set.
-