org.eclipse.graphiti.pattern.id
Class IdUpdateContext

java.lang.Object
  extended by PictogramElementContext
      extended by org.eclipse.graphiti.features.context.impl.UpdateContext
          extended by org.eclipse.graphiti.pattern.id.IdUpdateContext
All Implemented Interfaces:
IContext, IPictogramElementContext, IUpdateContext, IPropertyBag

public class IdUpdateContext
extends UpdateContext

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

Field Summary
private  Object domainObject
           
private  GraphicsAlgorithm graphicsAlgorithm
           
private  PictogramElement rootPictogramElement
           
 
Constructor Summary
IdUpdateContext(PictogramElement pictogramElement, GraphicsAlgorithm graphicsAlgorithm, PictogramElement rootPictogramElement, Object domainObject)
          Creates a new IdUpdateContext instance holding the given pictogram model instances and domain object instance.
 
Method Summary
 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(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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.graphiti.IPropertyBag
getProperty, getPropertyKeys, putProperty
 

Field Detail

graphicsAlgorithm

private GraphicsAlgorithm graphicsAlgorithm

rootPictogramElement

private PictogramElement rootPictogramElement

domainObject

private Object domainObject
Constructor Detail

IdUpdateContext

public IdUpdateContext(PictogramElement pictogramElement,
                       GraphicsAlgorithm graphicsAlgorithm,
                       PictogramElement rootPictogramElement,
                       Object domainObject)
Creates a new IdUpdateContext instance holding the given pictogram model instances and domain object instance.

Parameters:
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 pattern
domainObject - The domain object that is linked with the pattern root pictogram element.
Method Detail

getPictogramElement

public PictogramElement getPictogramElement()
Returns the stored PictogramElement.

Returns:
The instance of the PictogramElement to layout.

getGraphicsAlgorithm

public GraphicsAlgorithm getGraphicsAlgorithm()
Returns the stored GraphicsAlgorithm.

Returns:
The instance of the GraphicsAlgorithm for the PictogramElement to update.

setGraphicsAlgorithm

public void setGraphicsAlgorithm(GraphicsAlgorithm graphicsAlgorithm)
Sets a new GraphicsAlgorithm for the PictogramElement to update.

Parameters:
graphicsAlgorithm - The new instance to set.

getRootPictogramElement

public PictogramElement getRootPictogramElement()
Returns the stored root PictogramElement.

Returns:
The instance of the root PictogramElement.

setRootPictogramElement

public void setRootPictogramElement(PictogramElement rootPictogramElement)
Sets a new root PictogramElement.

Parameters:
rootPictogramElement - The new instance to set.

getDomainObject

public Object getDomainObject()
Returns the stored domain object instance.

Returns:
The stored instance of the domain object.

setDomainObject

public void setDomainObject(Object domainObject)
Sets a new domain object instance.

Parameters:
domainObject - The new instance to set.


Copyright (c) SAP AG 2005, 2012.