Interface IPeCreateService
-
- All Known Subinterfaces:
ICreateService
,IPeService
- All Known Implementing Classes:
CreateServiceImpl
,PeServiceImpl
public interface IPeCreateService
The interface IPeCreateService provides services for the creation of all available pictogram elements. E.g. Shapes, Connections, Anchors, ...
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description BoxRelativeAnchor
createBoxRelativeAnchor(AnchorContainer anchorContainer)
Creates a box relative anchor inside the given anchor container.ChopboxAnchor
createChopboxAnchor(AnchorContainer anchorContainer)
Creates a chop box anchor inside the given anchor container.CompositeConnection
createCompositeConnection(Diagram diagram)
Creates a composite connection (a connection that is made of several other connections) inside the given diagram.ConnectionDecorator
createConnectionDecorator(Connection connection, boolean active, double location, boolean isRelative)
Creates a connection decorator and adds it to the given connection.ContainerShape
createContainerShape(ContainerShape parentContainerShape, boolean active)
Creates a container shape inside the given parent container shape.CurvedConnection
createCurvedConnection(double[] controllPoints, Diagram diagram)
Creates a curved connection (Bezier curve) inside the given diagram.Diagram
createDiagram(java.lang.String diagramTypeId, java.lang.String diagramName)
Creates a diagram.Diagram
createDiagram(java.lang.String diagramTypeId, java.lang.String diagramName, boolean snap)
Creates a diagram.Diagram
createDiagram(java.lang.String diagramTypeId, java.lang.String diagramName, int gridUnit, boolean snap)
Creates a diagram.Diagram
createDiagram(java.lang.String diagramTypeId, java.lang.String diagramName, int horizontalGridUnit, int verticalGridUnit, boolean snap)
Creates a diagram.FixPointAnchor
createFixPointAnchor(AnchorContainer anchorContainer)
Creates a fix point anchor inside the given anchor container.FreeFormConnection
createFreeFormConnection(Diagram diagram)
Creates a free form connection inside the given diagram.ManhattanConnection
createManhattanConnection(Diagram diagram)
Creates a manhattan connection inside the given diagram.Shape
createShape(ContainerShape parentContainerShape, boolean active)
Creates a shape inside the given parent container shape.
-
-
-
Method Detail
-
createBoxRelativeAnchor
BoxRelativeAnchor createBoxRelativeAnchor(AnchorContainer anchorContainer)
Creates a box relative anchor inside the given anchor container.- Parameters:
anchorContainer
- the anchors parent- Returns:
- the new box relative anchor
-
createChopboxAnchor
ChopboxAnchor createChopboxAnchor(AnchorContainer anchorContainer)
Creates a chop box anchor inside the given anchor container.- Parameters:
anchorContainer
- the anchors parent- Returns:
- the new chop box anchor
-
createConnectionDecorator
ConnectionDecorator createConnectionDecorator(Connection connection, boolean active, double location, boolean isRelative)
Creates a connection decorator and adds it to the given connection.- Parameters:
connection
- the connectionactive
- TRUE, if decorator is active, FALSE otherwiselocation
- location of the decorator (must be between 0 and 1)isRelative
- true if the decorator should be positioned relative to the connection's midpoint- Returns:
- the new connection decorator
-
createContainerShape
ContainerShape createContainerShape(ContainerShape parentContainerShape, boolean active)
Creates a container shape inside the given parent container shape.- Parameters:
parentContainerShape
- the parent container shapeactive
-true
, if the created shape should be active,false
otherwise. An active shape can be selected in the diagram editor and it is also relevant for layouting: an active shape opens a coordinate system relative to its next active parent which can be used for layouting itsPictogramElement
children, while an inactive one uses the coordinate system of its next direct parent for layouting its children.By default all shapes should be active, inactive shapes should be used for grouping purposes or for linking a group of graphical objects to the domain world only.
For those familiar with GEF: only for active shapes a GEF EditPart will be created by the Graphiti framework, not for inactive ones.
- Returns:
- the new container shape
-
createDiagram
Diagram createDiagram(java.lang.String diagramTypeId, java.lang.String diagramName)
Creates a diagram. Snapping to the grid is disabled by default.- Parameters:
diagramTypeId
- the type id of the diagramdiagramName
- the name of the diagram- Returns:
- the new diagram
- Since:
- 0.12
- See Also:
createDiagram(String diagramTypeId, String diagramName, boolean snap)
-
createDiagram
Diagram createDiagram(java.lang.String diagramTypeId, java.lang.String diagramName, boolean snap)
Creates a diagram.- Parameters:
diagramTypeId
- the type id of the diagramdiagramName
- the name of the diagramsnap
- TRUE enables snap to grid- Returns:
- the new diagram
- See Also:
createDiagram(String diagramTypeId, String diagramName, int gridUnit, boolean snap)
-
createDiagram
Diagram createDiagram(java.lang.String diagramTypeId, java.lang.String diagramName, int gridUnit, boolean snap)
Creates a diagram.- Parameters:
diagramTypeId
- the type id of the diagramdiagramName
- the name of the diagramgridUnit
- grid size (in both directions) in pixel; if 0 then no grid will be drawnsnap
- TRUE enables snap to grid- Returns:
- the new diagram
-
createDiagram
Diagram createDiagram(java.lang.String diagramTypeId, java.lang.String diagramName, int horizontalGridUnit, int verticalGridUnit, boolean snap)
Creates a diagram.- Parameters:
diagramTypeId
- the type id of the diagramdiagramName
- the name of the diagramhorizontalGridUnit
- horizontal grid size in pixel; if 0 then no grid will be drawnverticalGridUnit
- vertical grid size in pixel; if 0 then no grid will be drawnsnap
- TRUE enables snap to grid- Returns:
- the new diagram
- Since:
- 0.8
-
createFixPointAnchor
FixPointAnchor createFixPointAnchor(AnchorContainer anchorContainer)
Creates a fix point anchor inside the given anchor container.- Parameters:
anchorContainer
- the anchors parent- Returns:
- the new fix point anchor
-
createFreeFormConnection
FreeFormConnection createFreeFormConnection(Diagram diagram)
Creates a free form connection inside the given diagram.- Parameters:
diagram
- the diagram- Returns:
- the new free form connection
-
createManhattanConnection
ManhattanConnection createManhattanConnection(Diagram diagram)
Creates a manhattan connection inside the given diagram.- Parameters:
diagram
- the diagram- Returns:
- the new free form connection
- Since:
- 0.8
-
createCurvedConnection
CurvedConnection createCurvedConnection(double[] controllPoints, Diagram diagram)
Creates a curved connection (Bezier curve) inside the given diagram.- Parameters:
controllPoints
- an array of double value pairs defining the control points (two values - x and y - define the point) of the Bezier curvediagram
- the diagram- Returns:
- the new curved connection
- Since:
- 0.9
-
createCompositeConnection
CompositeConnection createCompositeConnection(Diagram diagram)
Creates a composite connection (a connection that is made of several other connections) inside the given diagram.CompositeConnection
s can be used to combine any number ofCurvedConnection
s into one semantical connection using itsCompositeConnection.getChildren()
relation. Note that the composite connection itself needs to have an associatedGraphicsAlgorithm
(usually aPolyline
) for its visualization, although it might be invisible and only the child connections have a visible polyline as their visualization.
Note that this is an experimental API and might change without further notice.- Parameters:
diagram
- the diagram- Returns:
- the new composite connection
- Since:
- 0.9
-
createShape
Shape createShape(ContainerShape parentContainerShape, boolean active)
Creates a shape inside the given parent container shape.- Parameters:
parentContainerShape
- the parent container shapeactive
-true
, if the created shape should be active,false
otherwise. An active shape can be selected in the diagram editor and it is also relevant for layouting: an active shape opens a coordinate system which can be used for layouting itsPictogramElement
children, while an inactive one does not provide one but uses the coordinate system of its next active parent for layouting its children.By default all shapes should be active, inactive shapes should be used for grouping purposes or for linking a group of graphical objects to the domain world only.
For those familiar with GEF: only for active shapes a GEF EditPart will be created by the Graphiti framework, not for inactive ones.
- Returns:
- the new shape
-
-