Package org.eclipse.graphiti.pattern.id
Class IdLayoutContext
- All Implemented Interfaces:
IContext,ILayoutContext,IPictogramElementContext,IPropertyBag
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
-
Constructor Summary
ConstructorsConstructorDescriptionIdLayoutContext(PictogramElement pictogramElement, GraphicsAlgorithm graphicsAlgorithm, PictogramElement rootPictogramElement) Creates a newIdLayoutContextinstance holding the given pictogram model instances. -
Method Summary
Modifier and TypeMethodDescriptionReturns the storedGraphicsAlgorithm.Returns the stored rootPictogramElement.voidsetGraphicsAlgorithm(GraphicsAlgorithm graphicsAlgorithm) Sets a newGraphicsAlgorithmfor thePictogramElementto layout.voidsetRootPictogramElement(PictogramElement rootPictogramElement) Sets a new rootPictogramElement.Methods inherited from class org.eclipse.graphiti.internal.features.context.impl.base.PictogramElementContext
getPictogramElement, setPictogramElement, toStringMethods inherited from class org.eclipse.graphiti.PropertyBag
getProperty, getPropertyKeys, putPropertyMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.eclipse.graphiti.features.context.IPictogramElementContext
getPictogramElementMethods inherited from interface org.eclipse.graphiti.IPropertyBag
getProperty, getPropertyKeys, putProperty
-
Constructor Details
-
IdLayoutContext
public IdLayoutContext(PictogramElement pictogramElement, GraphicsAlgorithm graphicsAlgorithm, PictogramElement rootPictogramElement) Creates a newIdLayoutContextinstance holding the given pictogram model instances.- Parameters:
pictogramElement- ThePictogramElementthat shall be layouted, seeLayoutContext.graphicsAlgorithm- The associatedGraphicsAlgorithmfor thePictogramElementrootPictogramElement- The root pictogram element, this is the one that holds the ID property for the pattern
-
-
Method Details
-
getGraphicsAlgorithm
Returns the storedGraphicsAlgorithm.- Returns:
- The instance of the
GraphicsAlgorithmfor thePictogramElementto layout.
-
setGraphicsAlgorithm
Sets a newGraphicsAlgorithmfor thePictogramElementto layout.- 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.
-