Package org.eclipse.graphiti.services
Interface IPeLayoutService
- All Known Subinterfaces:
ILayoutService
,IPeService
,IUiLayoutService
- All Known Implementing Classes:
LayoutServiceImpl
,PeServiceImpl
,UiLayoutService
public interface IPeLayoutService
The interface IPeLayoutService provides services (e.g. query location info
for a pictogram element) which makes it easier to write layout features.
-
Method Summary
Modifier and TypeMethodDescriptiongetConnectionMidpoint
(Connection c, double d) Gets the connection midpoint.getGaBoundsForAnchor
(Anchor anchor) Returns the bounds of the graphics algorithm, which is referenced by the anchor.getLocationInfo
(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.
-
Method Details
-
getConnectionMidpoint
Gets the connection midpoint.- Parameters:
c
- the connectiond
- a relative location on the connection (must be between 0 and 1)- Returns:
- the connection midpoint
-
getGaBoundsForAnchor
Returns the bounds of the graphics algorithm, which is referenced by the anchor.- Parameters:
anchor
- the anchor- Returns:
- the bounds of the anchor graphics algorithm
-
getLocationInfo
Returns the location info for a specific position inside a shape. The location info contains the shape and the graphics algorithm at the given position.- Parameters:
shape
- the shapex
- x coordinatey
- y coordinate- Returns:
- the location info
- See Also:
-
getLocationRelativeToDiagram
Returns the location of the anchor relative to the diagram.- Parameters:
anchor
- the given anchor- Returns:
- the relative location
-
getLocationRelativeToDiagram
Returns the location of the shape relative to the diagram.- Parameters:
shape
- the given shape- Returns:
- the relative location
-