public class IdUpdateContext extends UpdateContext
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.Constructor and Description |
---|
IdUpdateContext(PictogramElement pictogramElement,
GraphicsAlgorithm graphicsAlgorithm,
PictogramElement rootPictogramElement,
java.lang.Object domainObject)
Creates a new
IdUpdateContext instance holding the given
pictogram model instances and domain object instance. |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
getDomainObject()
Returns the stored domain object instance.
|
GraphicsAlgorithm |
getGraphicsAlgorithm()
Returns the stored
GraphicsAlgorithm . |
PictogramElement |
getPictogramElement()
Returns the stored
PictogramElement . |
PictogramElement |
getRootPictogramElement()
Returns the stored root
PictogramElement . |
void |
setDomainObject(java.lang.Object domainObject)
Sets a new domain object instance.
|
void |
setGraphicsAlgorithm(GraphicsAlgorithm graphicsAlgorithm)
Sets a new
GraphicsAlgorithm for the PictogramElement to
update. |
void |
setRootPictogramElement(PictogramElement rootPictogramElement)
Sets a new root
PictogramElement . |
toString
getProperty, getPropertyKeys, putProperty
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
getProperty, getPropertyKeys, putProperty
public IdUpdateContext(PictogramElement pictogramElement, GraphicsAlgorithm graphicsAlgorithm, PictogramElement rootPictogramElement, java.lang.Object domainObject)
IdUpdateContext
instance holding the given
pictogram model instances and domain object instance.pictogramElement
- The PictogramElement
that shall be updated, see
UpdateContext
.graphicsAlgorithm
- The associated GraphicsAlgorithm
for the
PictogramElement
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.public PictogramElement getPictogramElement()
PictogramElement
.getPictogramElement
in interface IPictogramElementContext
getPictogramElement
in class PictogramElementContext
PictogramElement
to layout.public GraphicsAlgorithm getGraphicsAlgorithm()
GraphicsAlgorithm
.GraphicsAlgorithm
for the
PictogramElement
to update.public void setGraphicsAlgorithm(GraphicsAlgorithm graphicsAlgorithm)
GraphicsAlgorithm
for the PictogramElement
to
update.graphicsAlgorithm
- The new instance to set.public PictogramElement getRootPictogramElement()
PictogramElement
.PictogramElement
.public void setRootPictogramElement(PictogramElement rootPictogramElement)
PictogramElement
.rootPictogramElement
- The new instance to set.public java.lang.Object getDomainObject()
public void setDomainObject(java.lang.Object domainObject)
domainObject
- The new instance to set.