Interface IPeCreateService
- All Known Subinterfaces:
ICreateService
,IPeService
- All Known Implementing Classes:
CreateServiceImpl
,PeServiceImpl
-
Method Summary
Modifier and TypeMethodDescriptioncreateBoxRelativeAnchor
(AnchorContainer anchorContainer) Creates a box relative anchor inside the given anchor container.createChopboxAnchor
(AnchorContainer anchorContainer) Creates a chop box anchor inside the given anchor container.createCompositeConnection
(Diagram diagram) Creates a composite connection (a connection that is made of several other connections) inside the given diagram.createConnectionDecorator
(Connection connection, boolean active, double location, boolean isRelative) Creates a connection decorator and adds it to the given connection.createContainerShape
(ContainerShape parentContainerShape, boolean active) Creates a container shape inside the given parent container shape.createCurvedConnection
(double[] controllPoints, Diagram diagram) Creates a curved connection (Bezier curve) inside the given diagram.createDiagram
(String diagramTypeId, String diagramName) Creates a diagram.createDiagram
(String diagramTypeId, String diagramName, boolean snap) Creates a diagram.createDiagram
(String diagramTypeId, String diagramName, int gridUnit, boolean snap) Creates a diagram.createDiagram
(String diagramTypeId, String diagramName, int horizontalGridUnit, int verticalGridUnit, boolean snap) Creates a diagram.createFixPointAnchor
(AnchorContainer anchorContainer) Creates a fix point anchor inside the given anchor container.createFreeFormConnection
(Diagram diagram) Creates a free form connection inside the given diagram.createManhattanConnection
(Diagram diagram) Creates a manhattan connection inside the given diagram.createShape
(ContainerShape parentContainerShape, boolean active) Creates a shape inside the given parent container shape.
-
Method Details
-
createBoxRelativeAnchor
Creates a box relative anchor inside the given anchor container.- Parameters:
anchorContainer
- the anchors parent- Returns:
- the new box relative anchor
-
createChopboxAnchor
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
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
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
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
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(String diagramTypeId, 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
Creates a fix point anchor inside the given anchor container.- Parameters:
anchorContainer
- the anchors parent- Returns:
- the new fix point anchor
-
createFreeFormConnection
Creates a free form connection inside the given diagram.- Parameters:
diagram
- the diagram- Returns:
- the new free form connection
-
createManhattanConnection
Creates a manhattan connection inside the given diagram.- Parameters:
diagram
- the diagram- Returns:
- the new free form connection
- Since:
- 0.8
-
createCurvedConnection
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
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
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
-