Interface IWorkflowBpmnLayoutAlignOnFlowSideBuilder

  • All Superinterfaces:
    IWorkflowBpmnLayoutAlignOnFlowSideConfigurator<IWorkflowBpmnLayoutAlignOnFlowSideBuilder>

    public interface IWorkflowBpmnLayoutAlignOnFlowSideBuilder
    extends IWorkflowBpmnLayoutAlignOnFlowSideConfigurator<IWorkflowBpmnLayoutAlignOnFlowSideBuilder>
    Builder for aligning an item (such as a label) on the left or right side of (the edge of) a sequence flow or message flow.

    The following image illustrates the alignment for side = RIGHT_OF_FLOW, alignment = 1.0 spacing = 20, offset = 0; when the red flow line goes from top-left to bottom-right and the alignment item has a yellow bounding box of 50x20 pixels:

    Align on flow side example

    • The rectangle is on the right side of the flow line.
    • The spacing 20 is the distance between the line and the rectangle, i.e. the distance between the top-right corner of the rectangle and the line in the example image above (yellow).
    • An alignment of 1.0 means the rectangle is as close to the end of the line as possible, i.e. the bottom-right point of the rectangle touches the line that is orthogonal to the flow line and passes through the flow line's end point.
    • The offset is 0 so the rectangle is not set off. If the offset were non-zero, the rectangle would be shifted by that amount in the direction of the red flow line. A positive offset would shift the rectangle to the bottom right, a negative offset would shift it to the top left.
    Since:
    8.4.0
    • Method Detail

      • build

        Point2DDouble build​(IWorkflowBpmnAlignmentItem<?,​?> item,
                            de.xima.bpmn_model.api.element.bpmndi.BpmnEdge edge)
        Aligns the alignment item on the left or right side of the flow represented by the waypoints of the given edge.
        Parameters:
        item - The alignment item to align on the flow side.
        edge - The BPMN edge to align the item on.
        Returns:
        The top-left corner of the aligned item, in the same coordinate system as the coordinates of the given edge's waypoints.
      • build

        Point2DDouble build​(IWorkflowBpmnAlignmentItem<?,​?> item,
                            List<Point2DDouble> waypoints)
        Aligns the alignment item on the left or right side of the flow represented by the given waypoints.
        Parameters:
        item - The alignment item to align on the flow side.
        waypoints - The waypoints of the BPMN edge to align the item on.
        Returns:
        The top-left corner of the aligned item, in the same coordinate system as the coordinates of the given waypoints.