Class LayoutServiceImpl
java.lang.Object
org.eclipse.graphiti.internal.services.impl.LayoutServiceImpl
- All Implemented Interfaces:
IGaLayoutService,ILayoutService,IPeLayoutService
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCalculates the size of the given graphics algorithm.calculateSize(GraphicsAlgorithm ga, boolean considerLineWidth) Calculates the size of the given graphics algorithm.getConnectionMidpoint(Connection c, double d) Gets the connection midpoint.getGaBoundsForAnchor(Anchor anchor) Returns the bounds of the graphics algorithm, which is referenced by the anchor.protected IGaServicegetLocationInfo(Shape shape, int x, int y) Returns the location info for a specific position inside a shape.getLocationRelativeToDiagram(Anchor anchor) Returns the location of the anchor relative to the diagram.Returns the location of the shape relative to the diagram.protected IPeServicevoidsetHeight(GraphicsAlgorithm ga, int height) Sets the height of the given graphics algorithm.voidsetLocation(GraphicsAlgorithm ga, int x, int y) Sets the location of the given graphics algorithm.voidsetLocation(GraphicsAlgorithm ga, int x, int y, boolean avoidNegativeCoordinates) Sets the location of the given graphics algorithm.voidsetLocationAndSize(GraphicsAlgorithm ga, int x, int y, int width, int height) Sets location and size of the given graphics algorithm.voidsetLocationAndSize(GraphicsAlgorithm ga, int x, int y, int width, int height, boolean avoidNegativeCoordinates) Sets location and size of the given graphics algorithm.voidsetSize(GraphicsAlgorithm ga, int width, int height) Sets the size of the given graphics algorithm.voidsetWidth(GraphicsAlgorithm ga, int width) Sets the width of the given graphics algorithm.
-
Constructor Details
-
LayoutServiceImpl
public LayoutServiceImpl()
-
-
Method Details
-
calculateSize
Description copied from interface:IGaLayoutServiceCalculates the size of the given graphics algorithm. If the graphics algorithm is a polyline or polygon then the size will be calculated. Otherwise the size of the graphics algorithm is simply returned.- Specified by:
calculateSizein interfaceIGaLayoutService- Parameters:
ga-- Returns:
- See Also:
-
calculateSize
Description copied from interface:IGaLayoutServiceCalculates the size of the given graphics algorithm. If the graphics algorithm is a polyline or polygon then the size will be calculated. Otherwise the size of the graphics algorithm is simply returned.- Specified by:
calculateSizein interfaceIGaLayoutService- Parameters:
ga-considerLineWidth-- Returns:
- See Also:
-
getConnectionMidpoint
Description copied from interface:IPeLayoutServiceGets the connection midpoint.- Specified by:
getConnectionMidpointin interfaceIPeLayoutService- Parameters:
c-d-- Returns:
- See Also:
-
getGaBoundsForAnchor
Description copied from interface:IPeLayoutServiceReturns the bounds of the graphics algorithm, which is referenced by the anchor.- Specified by:
getGaBoundsForAnchorin interfaceIPeLayoutService- Parameters:
anchor-- Returns:
- See Also:
-
getLocationInfo
Description copied from interface:IPeLayoutServiceReturns the location info for a specific position inside a shape. The location info contains the shape and the graphics algorithm at the given position.- Specified by:
getLocationInfoin interfaceIPeLayoutService- Parameters:
shape-x-y-- Returns:
- See Also:
-
getLocationRelativeToDiagram
Description copied from interface:IPeLayoutServiceReturns the location of the anchor relative to the diagram.- Specified by:
getLocationRelativeToDiagramin interfaceIPeLayoutService- Parameters:
anchor-- Returns:
- See Also:
-
getLocationRelativeToDiagram
Description copied from interface:IPeLayoutServiceReturns the location of the shape relative to the diagram.- Specified by:
getLocationRelativeToDiagramin interfaceIPeLayoutService- Parameters:
shape-- Returns:
- See Also:
-
setHeight
Description copied from interface:IGaLayoutServiceSets the height of the given graphics algorithm.- Specified by:
setHeightin interfaceIGaLayoutService- Parameters:
ga-height-- See Also:
-
setLocationAndSize
Description copied from interface:IGaLayoutServiceSets location and size of the given graphics algorithm.- Specified by:
setLocationAndSizein interfaceIGaLayoutService- Parameters:
ga-x-y-width-height-- See Also:
-
setLocationAndSize
public void setLocationAndSize(GraphicsAlgorithm ga, int x, int y, int width, int height, boolean avoidNegativeCoordinates) Description copied from interface:IGaLayoutServiceSets location and size of the given graphics algorithm.- Specified by:
setLocationAndSizein interfaceIGaLayoutService- Parameters:
ga-x-y-width-height-avoidNegativeCoordinates-- See Also:
-
setLocation
Description copied from interface:IGaLayoutServiceSets the location of the given graphics algorithm.- Specified by:
setLocationin interfaceIGaLayoutService- Parameters:
ga-x-y-- See Also:
-
setLocation
Description copied from interface:IGaLayoutServiceSets the location of the given graphics algorithm.- Specified by:
setLocationin interfaceIGaLayoutService- Parameters:
ga-x-y-avoidNegativeCoordinates-- See Also:
-
setSize
Description copied from interface:IGaLayoutServiceSets the size of the given graphics algorithm.- Specified by:
setSizein interfaceIGaLayoutService- Parameters:
ga-width-height-- See Also:
-
setWidth
Description copied from interface:IGaLayoutServiceSets the width of the given graphics algorithm.- Specified by:
setWidthin interfaceIGaLayoutService- Parameters:
ga-width-- See Also:
-
getGaService
-
getPeService
-