org.eclipse.graphiti.pattern.id
Class IdLayoutContext

java.lang.Object
  extended by PictogramElementContext
      extended by org.eclipse.graphiti.features.context.impl.LayoutContext
          extended by org.eclipse.graphiti.pattern.id.IdLayoutContext
All Implemented Interfaces:
IContext, ILayoutContext, IPictogramElementContext, IPropertyBag

public class IdLayoutContext
extends LayoutContext

This class represents a special LayoutContext suitable for usage within an IdPattern. Besides the usual LayoutContext options this context object also stores the associated GraphicsAlgorithm for the PictogramElement of the context and the root PictogramElement of the pattern. The latter may be of use for easier finding a certain child within a pattern representation.

Since:
0.10

Field Summary
private  GraphicsAlgorithm graphicsAlgorithm
           
private  PictogramElement rootPictogramElement
           
 
Constructor Summary
IdLayoutContext(PictogramElement pictogramElement, GraphicsAlgorithm graphicsAlgorithm, PictogramElement rootPictogramElement)
          Creates a new IdLayoutContext instance holding the given pictogram model instances.
 
Method Summary
 GraphicsAlgorithm getGraphicsAlgorithm()
          Returns the stored GraphicsAlgorithm.
 PictogramElement getRootPictogramElement()
          Returns the stored root PictogramElement.
 void setGraphicsAlgorithm(GraphicsAlgorithm graphicsAlgorithm)
          Sets a new GraphicsAlgorithm for the PictogramElement to layout.
 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.features.context.IPictogramElementContext
getPictogramElement
 
Methods inherited from interface org.eclipse.graphiti.IPropertyBag
getProperty, getPropertyKeys, putProperty
 

Field Detail

graphicsAlgorithm

private GraphicsAlgorithm graphicsAlgorithm

rootPictogramElement

private PictogramElement rootPictogramElement
Constructor Detail

IdLayoutContext

public IdLayoutContext(PictogramElement pictogramElement,
                       GraphicsAlgorithm graphicsAlgorithm,
                       PictogramElement rootPictogramElement)
Creates a new IdLayoutContext instance holding the given pictogram model instances.

Parameters:
pictogramElement - The PictogramElement that shall be layouted, see LayoutContext.
graphicsAlgorithm - The associated GraphicsAlgorithm for the PictogramElement
rootPictogramElement - The root pictogram element, this is the one that holds the ID property for the pattern
Method Detail

getGraphicsAlgorithm

public GraphicsAlgorithm getGraphicsAlgorithm()
Returns the stored GraphicsAlgorithm.

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

setGraphicsAlgorithm

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

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.


Copyright (c) SAP AG 2005, 2012.