public interface IPeCreateService
Modifier and Type | Method and 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.
|
BoxRelativeAnchor createBoxRelativeAnchor(AnchorContainer anchorContainer)
anchorContainer
- the anchors parentChopboxAnchor createChopboxAnchor(AnchorContainer anchorContainer)
anchorContainer
- the anchors parentConnectionDecorator createConnectionDecorator(Connection connection, boolean active, double location, boolean isRelative)
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 midpointContainerShape createContainerShape(ContainerShape parentContainerShape, boolean active)
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 its
PictogramElement
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.
Diagram createDiagram(java.lang.String diagramTypeId, java.lang.String diagramName)
diagramTypeId
- the type id of the diagramdiagramName
- the name of the diagramcreateDiagram(String diagramTypeId, String diagramName, boolean
snap)
Diagram createDiagram(java.lang.String diagramTypeId, java.lang.String diagramName, boolean snap)
diagramTypeId
- the type id of the diagramdiagramName
- the name of the diagramsnap
- TRUE enables snap to gridcreateDiagram(String diagramTypeId, String diagramName, int
gridUnit, boolean snap)
Diagram createDiagram(java.lang.String diagramTypeId, java.lang.String diagramName, int gridUnit, boolean snap)
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 gridDiagram createDiagram(java.lang.String diagramTypeId, java.lang.String diagramName, int horizontalGridUnit, int verticalGridUnit, boolean snap)
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 gridFixPointAnchor createFixPointAnchor(AnchorContainer anchorContainer)
anchorContainer
- the anchors parentFreeFormConnection createFreeFormConnection(Diagram diagram)
diagram
- the diagramManhattanConnection createManhattanConnection(Diagram diagram)
diagram
- the diagramCurvedConnection createCurvedConnection(double[] controllPoints, Diagram diagram)
controllPoints
- an array of double value pairs defining the control points
(two values - x and y - define the point) of the Bezier curvediagram
- the diagramCompositeConnection createCompositeConnection(Diagram diagram)
CompositeConnection
s
can be used to combine any number of CurvedConnection
s into one
semantical connection using its CompositeConnection.getChildren()
relation. Note that the composite connection itself needs to have an
associated GraphicsAlgorithm
(usually a Polyline
) for its
visualization, although it might be invisible and only the child
connections have a visible polyline as their visualization.diagram
- the diagramShape createShape(ContainerShape parentContainerShape, boolean active)
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 its PictogramElement
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.