Interface IWorkflowBpmnAssociationLikeEdgeBuilder<Self,​Element extends de.xima.bpmn_model.api.behavior.BpmnElement<?>>

    • Method Detail

      • closestDiagonalConnection

        @CanIgnoreReturnValue
        Self closestDiagonalConnection​(Element source,
                                       Element target)
        Sets the source and target of the association, and automatically selects the closest points on the source and target. The connection style is set to DIAGONAL.

        Points are selected as follows. First, find the relative cardinal position of the target's bounding box with respect to the source's bounding box, see classifyRectangleCardinalPosition. Depending on the result:

        • if the target is above / below / to the left / right of the source, select a point on the source's top / bottom / left / right edge and a point on the target's bottom / top / right / left edge (respectively). The points are selected so that are aligned vertically / horizontally with each other. Then draw a straight axis-aligned line between those two points. If a named point exists for the respective edges, uses the (NORTH / EAST / SOUTH / WEST) point instead.
        • if the target is northeast / southeast / southwest / northwest of the source, select the corresponding corner point's of the source's and target's bounding boxes, i.e. the source's northeast / southeast / southwest / northwest corner and the target's southwest / northwest / northeast / southeast corner (respectively). Then draws a diagonal line between those two points. If a named point exists for the respective corners, uses the NORTH_EAST / SOUTH_EAST / SOUTH_WEST / NORTH_WEST point instead.
        • if the source and target bounding boxes overlap, unsets the source and target.
        Parameters:
        source - The source element of the association.
        target - The target element of the association.
        Returns:
        This builder for chaining method calls.