public final class LayoutServiceImpl extends java.lang.Object implements ILayoutService
Constructor and Description |
---|
LayoutServiceImpl() |
Modifier and Type | Method and Description |
---|---|
IDimension |
calculateSize(GraphicsAlgorithm ga)
Calculates the size of the given graphics algorithm.
|
IDimension |
calculateSize(GraphicsAlgorithm ga,
boolean considerLineWidth)
Calculates the size of the given graphics algorithm.
|
ILocation |
getConnectionMidpoint(Connection c,
double d)
Gets the connection midpoint.
|
IRectangle |
getGaBoundsForAnchor(Anchor anchor)
Returns the bounds of the graphics algorithm, which is referenced by the
anchor.
|
ILocationInfo |
getLocationInfo(Shape shape,
int x,
int y)
Returns the location info for a specific position inside a shape.
|
ILocation |
getLocationRelativeToDiagram(Anchor anchor)
Returns the location of the anchor relative to the diagram.
|
ILocation |
getLocationRelativeToDiagram(Shape shape)
Returns the location of the shape relative to the diagram.
|
void |
setHeight(GraphicsAlgorithm ga,
int height)
Sets the height of the given graphics algorithm.
|
void |
setLocation(GraphicsAlgorithm ga,
int x,
int y)
Sets the location of the given graphics algorithm.
|
void |
setLocation(GraphicsAlgorithm ga,
int x,
int y,
boolean avoidNegativeCoordinates)
Sets the location of the given graphics algorithm.
|
void |
setLocationAndSize(GraphicsAlgorithm ga,
int x,
int y,
int width,
int height)
Sets location and size of the given graphics algorithm.
|
void |
setLocationAndSize(GraphicsAlgorithm ga,
int x,
int y,
int width,
int height,
boolean avoidNegativeCoordinates)
Sets location and size of the given graphics algorithm.
|
void |
setSize(GraphicsAlgorithm ga,
int width,
int height)
Sets the size of the given graphics algorithm.
|
void |
setWidth(GraphicsAlgorithm ga,
int width)
Sets the width of the given graphics algorithm.
|
public IDimension calculateSize(GraphicsAlgorithm ga)
IGaLayoutService
calculateSize
in interface IGaLayoutService
ga
- org.eclipse.graphiti.services.IGaLayoutService#calculateSize(org.eclipse.graphiti.mm.pictograms.GraphicsAlgorithm)
public IDimension calculateSize(GraphicsAlgorithm ga, boolean considerLineWidth)
IGaLayoutService
calculateSize
in interface IGaLayoutService
ga
- considerLineWidth
- org.eclipse.graphiti.services.IGaLayoutService#calculateSize(org.eclipse.graphiti.mm.pictograms.GraphicsAlgorithm,
boolean)
public ILocation getConnectionMidpoint(Connection c, double d)
IPeLayoutService
getConnectionMidpoint
in interface IPeLayoutService
c
- d
- IPeLayoutService.getConnectionMidpoint(org.eclipse.graphiti.mm.pictograms.Connection,
double)
public IRectangle getGaBoundsForAnchor(Anchor anchor)
IPeLayoutService
getGaBoundsForAnchor
in interface IPeLayoutService
anchor
- IPeLayoutService.getGaBoundsForAnchor(org.eclipse.graphiti.mm.pictograms.Anchor)
public ILocationInfo getLocationInfo(Shape shape, int x, int y)
IPeLayoutService
getLocationInfo
in interface IPeLayoutService
shape
- x
- y
- IPeLayoutService.getLocationInfo(org.eclipse.graphiti.mm.pictograms.Shape,
int, int)
public ILocation getLocationRelativeToDiagram(Anchor anchor)
IPeLayoutService
getLocationRelativeToDiagram
in interface IPeLayoutService
anchor
- IPeLayoutService.getLocationRelativeToDiagram(org.eclipse.graphiti.mm.pictograms.Anchor)
public ILocation getLocationRelativeToDiagram(Shape shape)
IPeLayoutService
getLocationRelativeToDiagram
in interface IPeLayoutService
shape
- IPeLayoutService.getLocationRelativeToDiagram(org.eclipse.graphiti.mm.pictograms.Shape)
public void setHeight(GraphicsAlgorithm ga, int height)
IGaLayoutService
setHeight
in interface IGaLayoutService
ga
- height
- org.eclipse.graphiti.services.IGaLayoutService#setHeight(org.eclipse.graphiti.mm.pictograms.GraphicsAlgorithm,
int)
public void setLocationAndSize(GraphicsAlgorithm ga, int x, int y, int width, int height)
IGaLayoutService
setLocationAndSize
in interface IGaLayoutService
ga
- x
- y
- width
- height
- org.eclipse.graphiti.services.IGaLayoutService#setLocationAndSize(org.eclipse.graphiti.mm.pictograms.GraphicsAlgorithm,
int, int, int, int)
public void setLocationAndSize(GraphicsAlgorithm ga, int x, int y, int width, int height, boolean avoidNegativeCoordinates)
IGaLayoutService
setLocationAndSize
in interface IGaLayoutService
ga
- x
- y
- width
- height
- avoidNegativeCoordinates
- org.eclipse.graphiti.services.IGaLayoutService#setLocationAndSize(org.eclipse.graphiti.mm.pictograms.GraphicsAlgorithm,
int, int, int, int, boolean)
public void setLocation(GraphicsAlgorithm ga, int x, int y)
IGaLayoutService
setLocation
in interface IGaLayoutService
ga
- x
- y
- org.eclipse.graphiti.services.IGaLayoutService#setLocation(org.eclipse.graphiti.mm.pictograms.GraphicsAlgorithm,
int, int)
public void setLocation(GraphicsAlgorithm ga, int x, int y, boolean avoidNegativeCoordinates)
IGaLayoutService
setLocation
in interface IGaLayoutService
ga
- x
- y
- avoidNegativeCoordinates
- org.eclipse.graphiti.services.IGaLayoutService#setLocation(org.eclipse.graphiti.mm.pictograms.GraphicsAlgorithm,
int, int, boolean)
public void setSize(GraphicsAlgorithm ga, int width, int height)
IGaLayoutService
setSize
in interface IGaLayoutService
ga
- width
- height
- org.eclipse.graphiti.services.IGaLayoutService#setSize(org.eclipse.graphiti.mm.pictograms.GraphicsAlgorithm,
int, int)
public void setWidth(GraphicsAlgorithm ga, int width)
IGaLayoutService
setWidth
in interface IGaLayoutService
ga
- width
- org.eclipse.graphiti.services.IGaLayoutService#setWidth(org.eclipse.graphiti.mm.pictograms.GraphicsAlgorithm,
int)