Interface IPeService

    • Method Detail

      • deletePictogramElementIgnoringCrossReferences

        void deletePictogramElementIgnoringCrossReferences​(PictogramElement pe)
        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 using deletePictogramElement(PictogramElement). In case you need to follow cross references as well and update them you will need to use deletePictogramElement(PictogramElement) instead.
        Parameters:
        pe - The pictogram element to delete
        Since:
        0.13
      • deletePictogramElementIgnoringCrossReferences

        void deletePictogramElementIgnoringCrossReferences​(java.lang.Iterable<PictogramElement> pes)
        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 using deletePictogramElement(PictogramElement). In case you need to follow cross references as well and update them you will need to use deletePictogramElement(PictogramElement) instead.
        Parameters:
        pes - The pictogram elements to delete
        Since:
        0.13
      • getActiveContainerPe

        PictogramElement getActiveContainerPe​(GraphicsAlgorithm ga)
        Gets the active container pe.
        Parameters:
        ga - the ga
        Returns:
        the active container pe
      • getActiveContainerPe

        PictogramElement getActiveContainerPe​(PictogramElement pictogramElement)
        Gets the active container pe.
        Parameters:
        pictogramElement - the pictogram element
        Returns:
        the active container pe
      • getAllConnections

        java.util.List<Connection> getAllConnections​(Anchor anchor)
        Returns all connections of an anchor.
        Parameters:
        anchor - the anchor
        Returns:
        list of connections
      • getAllConnections

        java.util.List<Connection> getAllConnections​(AnchorContainer anchorContainer)
        Returns all connections of an anchor container.
        Parameters:
        anchorContainer - the anchor container
        Returns:
        list of connections
      • getAllContainedPictogramElements

        java.util.Collection<PictogramElement> getAllContainedPictogramElements​(PictogramElement pe)
        Gets the all contained pictogram elements.
        Parameters:
        pe - the pe
        Returns:
        the all contained pictogram elements
      • getAllContainedShapes

        java.util.Collection<Shape> getAllContainedShapes​(ContainerShape cs)
        Returns all the contained container shapes. Dives through the whole shapes tree.
        Parameters:
        cs - the container shape
        Returns:
        all the contained container shapes
      • getChopboxAnchor

        Anchor getChopboxAnchor​(AnchorContainer anchorContainer)
        Gets the chopbox anchor.
        Parameters:
        anchorContainer - the anchor container
        Returns:
        The chopbox anchor of the anchor container if one exist, otherwise null
      • getDiagramForAnchor

        Diagram getDiagramForAnchor​(Anchor anchor)
        Returns the diagram for the given anchor.
        Parameters:
        anchor - the anchor
        Returns:
        the diagram
      • getDiagramForPictogramElement

        Diagram getDiagramForPictogramElement​(PictogramElement pe)
        Returns the diagram for the given pictogram element.
        Parameters:
        pe - the pe
        Returns:
        the diagram
      • getDiagramForShape

        Diagram getDiagramForShape​(Shape shape)
        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 elements
        diagram - the diag
        Returns:
        the elements not in diagram
      • getIncomingConnections

        java.util.List<Connection> getIncomingConnections​(AnchorContainer anchorContainer)
        Returns the incoming connections of an anchor container.
        Parameters:
        anchorContainer - the anchor container
        Returns:
        list of incoming connections
      • getLinkedPictogramElements

        java.lang.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.
        Parameters:
        elements - the elements
        diagram - the diag
        Returns:
        the linked pictogram elements
      • getOutgoingConnections

        java.util.List<Connection> getOutgoingConnections​(AnchorContainer anchorContainer)
        Returns the outgoing connections of an anchor container.
        Parameters:
        anchorContainer - the anchor container
        Returns:
        list of outgoing connections
      • getPictogramElementChildren

        java.util.Collection<PictogramElement> getPictogramElementChildren​(PictogramElement pe)
        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

        PictogramElement getPictogramElementParent​(PictogramElement pe)
        Gets the pictogram element parent.
        Parameters:
        pe - the pe
        Returns:
        the pictogram element parent
      • getProperty

        Property getProperty​(PropertyContainer propertyContainer,
                             java.lang.String key)
        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

        java.lang.String getPropertyValue​(PropertyContainer propertyContainer,
                                          java.lang.String key)
        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

        void moveBendpoints​(IExecutionInfo executionInfo)
        Move bendpoints.
        Parameters:
        executionInfo - the execution info
      • removeProperty

        boolean removeProperty​(PropertyContainer propertyContainer,
                               java.lang.String key)
        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

        void sendToBack​(Shape shape)
        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

        void sendToFront​(Shape shape)
        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

        void setPropertyValue​(PropertyContainer propertyContainer,
                              java.lang.String key,
                              java.lang.String value)
        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 key
        value - The new property value