Package org.eclipse.graphiti.services
Interface IPeService
- All Superinterfaces:
IPeCreateService
,IPeLayoutService
- All Known Implementing Classes:
PeServiceImpl
The interface IPeService provides convenient services for the creation and
layout of pictogram elements.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Deletes the given pictogram element (and with it all aggregated elements!).void
Deletes the given pictogram elements (and with it all aggregated elements!).void
Deletes the given pictogram element (and with it all aggregated elements!).Gets the active container pe.getActiveContainerPe
(PictogramElement pictogramElement) Gets the active container pe.getAllConnections
(Anchor anchor) Returns all connections of an anchor.getAllConnections
(AnchorContainer anchorContainer) Returns all connections of an anchor container.Gets the all contained pictogram elements.Returns all the contained container shapes.getChopboxAnchor
(AnchorContainer anchorContainer) Gets the chopbox anchor.getDiagramForAnchor
(Anchor anchor) Returns the diagram for the given anchor.Returns the diagram for the given pictogram element.getDiagramForShape
(Shape shape) Returns the diagram for the given shape.org.eclipse.emf.ecore.EObject[]
getElementsNotInDiagram
(org.eclipse.emf.ecore.EObject[] elements, Diagram diagram) From the given elements, returns all elements that are not linked by a PictogramLink in the given Diagram.getIncomingConnections
(AnchorContainer anchorContainer) Returns the incoming connections of an anchor container.Object[]
getLinkedPictogramElements
(org.eclipse.emf.ecore.EObject[] elements, Diagram diagram) Return all the pictogram elements of the given Diagram which have at least one link to one of the given elements.getOutgoingConnections
(AnchorContainer anchorContainer) Returns the outgoing connections of an anchor container.Returns a pictogram element's children.Gets the pictogram element parent.getProperty
(PropertyContainer propertyContainer, String key) Returns the property of a given property container for a specific key.getPropertyValue
(PropertyContainer propertyContainer, String key) Returns the first element of the property values of a given property container for a specific key.void
moveBendpoints
(IExecutionInfo executionInfo) Move bendpoints.boolean
removeProperty
(PropertyContainer propertyContainer, String key) Removes the property of a given property container for a specific key.void
sendToBack
(Shape shape) Reorders parent's children to make the given shape the backmost one.void
sendToFront
(Shape shape) Reorders parent's children to make the given shape the frontmost one.void
setPropertyValue
(PropertyContainer propertyContainer, String key, String value) Sets/modifies the property's value of a given property container for a specific key.Methods inherited from interface org.eclipse.graphiti.services.IPeCreateService
createBoxRelativeAnchor, createChopboxAnchor, createCompositeConnection, createConnectionDecorator, createContainerShape, createCurvedConnection, createDiagram, createDiagram, createDiagram, createDiagram, createFixPointAnchor, createFreeFormConnection, createManhattanConnection, createShape
Methods inherited from interface org.eclipse.graphiti.services.IPeLayoutService
getConnectionMidpoint, getGaBoundsForAnchor, getLocationInfo, getLocationRelativeToDiagram, getLocationRelativeToDiagram
-
Method Details
-
deletePictogramElement
Deletes the given pictogram element (and with it all aggregated elements!). This method will also follow all cross references which might for large models cause performance issues. In case you suffer from that you might check to usedeletePictogramElementIgnoringCrossReferences(Iterable)
anddeletePictogramElementIgnoringCrossReferences(PictogramElement)
instead.- Parameters:
pe
- The pictogram element to delete
-
deletePictogramElementIgnoringCrossReferences
Deletes the given pictogram element (and with it all aggregated elements!). This method will not follow cross references which might for large models have performance advantages over usingdeletePictogramElement(PictogramElement)
. In case you need to follow cross references as well and update them you will need to usedeletePictogramElement(PictogramElement)
instead.- Parameters:
pe
- The pictogram element to delete- Since:
- 0.13
-
deletePictogramElementIgnoringCrossReferences
Deletes the given pictogram elements (and with it all aggregated elements!). This method will not follow cross references which might for large models have performance advantages over usingdeletePictogramElement(PictogramElement)
. In case you need to follow cross references as well and update them you will need to usedeletePictogramElement(PictogramElement)
instead.- Parameters:
pes
- The pictogram elements to delete- Since:
- 0.13
-
getActiveContainerPe
Gets the active container pe.- Parameters:
ga
- the ga- Returns:
- the active container pe
-
getActiveContainerPe
Gets the active container pe.- Parameters:
pictogramElement
- the pictogram element- Returns:
- the active container pe
-
getAllConnections
Returns all connections of an anchor.- Parameters:
anchor
- the anchor- Returns:
- list of connections
-
getAllConnections
Returns all connections of an anchor container.- Parameters:
anchorContainer
- the anchor container- Returns:
- list of connections
-
getAllContainedPictogramElements
Gets the all contained pictogram elements.- Parameters:
pe
- the pe- Returns:
- the all contained pictogram elements
-
getAllContainedShapes
Returns all the contained container shapes. Dives through the whole shapes tree.- Parameters:
cs
- the container shape- Returns:
- all the contained container shapes
-
getChopboxAnchor
Gets the chopbox anchor.- Parameters:
anchorContainer
- the anchor container- Returns:
- The chopbox anchor of the anchor container if one exist, otherwise null
-
getDiagramForAnchor
Returns the diagram for the given anchor.- Parameters:
anchor
- the anchor- Returns:
- the diagram
-
getDiagramForPictogramElement
Returns the diagram for the given pictogram element.- Parameters:
pe
- the pe- Returns:
- the diagram
-
getDiagramForShape
Returns the diagram for the given shape.- Parameters:
shape
- the shape- Returns:
- the diagram
-
getElementsNotInDiagram
org.eclipse.emf.ecore.EObject[] getElementsNotInDiagram(org.eclipse.emf.ecore.EObject[] elements, Diagram diagram) From the given elements, returns all elements that are not linked by a PictogramLink in the given Diagram.- Parameters:
elements
- the elementsdiagram
- the diag- Returns:
- the elements not in diagram
-
getIncomingConnections
Returns the incoming connections of an anchor container.- Parameters:
anchorContainer
- the anchor container- Returns:
- list of incoming connections
-
getLinkedPictogramElements
Return all the pictogram elements of the given Diagram which have at least one link to one of the given elements.- Parameters:
elements
- the elementsdiagram
- the diag- Returns:
- the linked pictogram elements
-
getOutgoingConnections
Returns the outgoing connections of an anchor container.- Parameters:
anchorContainer
- the anchor container- Returns:
- list of outgoing connections
-
getPictogramElementChildren
Returns a pictogram element's children.
Some Examples: returns all connections of a diagram, all shapes of a container shape, all decorators of a connection, all anchors of an anchor container- Parameters:
pe
- the given pictogram element- Returns:
- all the pictogram element's children
-
getPictogramElementParent
Gets the pictogram element parent.- Parameters:
pe
- the pe- Returns:
- the pictogram element parent
-
getProperty
Returns the property of a given property container for a specific key.- Parameters:
propertyContainer
- The property container (e.g. PictogramElement or GraphicsAlgorithm)key
- The property key- Returns:
- The property for the key
-
getPropertyValue
Returns the first element of the property values of a given property container for a specific key.- Parameters:
propertyContainer
- The property container (e.g. PictogramElement or GraphicsAlgorithm)key
- The property key- Returns:
- The fist value of the property values for the key
-
moveBendpoints
Move bendpoints.- Parameters:
executionInfo
- the execution info
-
removeProperty
Removes the property of a given property container for a specific key.- Parameters:
propertyContainer
- The property container (e.g. PictogramElement or GraphicsAlgorithm)key
- The property key- Returns:
- True, if the property existed
-
sendToBack
Reorders parent's children to make the given shape the backmost one. This is a convenient service to modify the z order. The z order of shapes in their containers can also be modified by changing the order of the children in the corresponding container shape directly. The last element in the list will be painted on top.- Parameters:
shape
- shape to make the backmost one
-
sendToFront
Reorders parent's children to make the given shape the frontmost one. This is a convenient service to modify the z order. The z order of shapes in their containers can also be modified by changing the order of the children in the corresponding container shape directly. The last element in the list will be painted on top.- Parameters:
shape
- shape to make the frontmost one
-
setPropertyValue
Sets/modifies the property's value of a given property container for a specific key.
The property object will be created if it does not exist.- Parameters:
propertyContainer
- The property container (e.g. PictogramElement or GraphicsAlgorithm)key
- The property keyvalue
- The new property value
-