Package org.eclipse.graphiti.pattern.id
Class IdLayoutContext
- java.lang.Object
-
- All Implemented Interfaces:
IContext
,ILayoutContext
,IPictogramElementContext
,IPropertyBag
public class IdLayoutContext extends LayoutContext
This class represents a specialLayoutContext
suitable for usage within anIdPattern
. Besides the usualLayoutContext
options this context object also stores the associatedGraphicsAlgorithm
for thePictogramElement
of the context and the rootPictogramElement
of the pattern. The latter may be of use for easier finding a certain child within a pattern representation.- Since:
- 0.10
-
-
Constructor Summary
Constructors Constructor Description IdLayoutContext(PictogramElement pictogramElement, GraphicsAlgorithm graphicsAlgorithm, PictogramElement rootPictogramElement)
Creates a newIdLayoutContext
instance holding the given pictogram model instances.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GraphicsAlgorithm
getGraphicsAlgorithm()
Returns the storedGraphicsAlgorithm
.PictogramElement
getRootPictogramElement()
Returns the stored rootPictogramElement
.void
setGraphicsAlgorithm(GraphicsAlgorithm graphicsAlgorithm)
Sets a newGraphicsAlgorithm
for thePictogramElement
to layout.void
setRootPictogramElement(PictogramElement rootPictogramElement)
Sets a new rootPictogramElement
.-
Methods inherited from class org.eclipse.graphiti.internal.features.context.impl.base.PictogramElementContext
getPictogramElement, 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.features.context.IPictogramElementContext
getPictogramElement
-
Methods inherited from interface org.eclipse.graphiti.IPropertyBag
getProperty, getPropertyKeys, putProperty
-
-
-
-
Constructor Detail
-
IdLayoutContext
public IdLayoutContext(PictogramElement pictogramElement, GraphicsAlgorithm graphicsAlgorithm, PictogramElement rootPictogramElement)
Creates a newIdLayoutContext
instance holding the given pictogram model instances.- Parameters:
pictogramElement
- ThePictogramElement
that shall be layouted, seeLayoutContext
.graphicsAlgorithm
- The associatedGraphicsAlgorithm
for thePictogramElement
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 storedGraphicsAlgorithm
.- Returns:
- The instance of the
GraphicsAlgorithm
for thePictogramElement
to layout.
-
setGraphicsAlgorithm
public void setGraphicsAlgorithm(GraphicsAlgorithm graphicsAlgorithm)
Sets a newGraphicsAlgorithm
for thePictogramElement
to layout.- Parameters:
graphicsAlgorithm
- The new instance to set.
-
getRootPictogramElement
public PictogramElement getRootPictogramElement()
Returns the stored rootPictogramElement
.- Returns:
- The instance of the root
PictogramElement
.
-
setRootPictogramElement
public void setRootPictogramElement(PictogramElement rootPictogramElement)
Sets a new rootPictogramElement
.- Parameters:
rootPictogramElement
- The new instance to set.
-
-