Interface IWorkflowBpmnAlignmentItem<Value,Children extends IWorkflowBpmnAlignmentItem<?,?>>
-
- Type Parameters:
Value
- The type of the value of the alignment item.Children
- The type of the children of this alignment item.
- All Known Subinterfaces:
IFlattenedAlignmentItemMap<Value>
,IStructuredBpmnModelPart
,IWorkflowBpmnTwoChildAlignmentItem<Value,First,Second>
public interface IWorkflowBpmnAlignmentItem<Value,Children extends IWorkflowBpmnAlignmentItem<?,?>>
An alignment item used when modeling workflow elements for a BPMN diagram. Makes it easier to layout and position createdBPMN elements
. Allows you to build a hierarchy of alignment items, thenflatten
this hierarchy to access the final positions of each item.- Since:
- 8.4.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Rectangular2DDouble
boundingBox()
The bounding box of this alignment item, i.e.List<Positioned<? extends Children,Point2DDouble>>
childAlignmentItems()
The children of this alignment item, together with their position.Double
inPort()
The in port that accepts an incoming sequence flow.Double
outPort()
The out port for the sequence flow that connects this item with other items.Point2DDouble
point(ECardinalDirection2D direction, double ratio)
Returns the point on the boundary of this alignment item in the given direction and at the given ratio.Point2DDouble
point(String name)
Returns the named point on this alignment item.ECardinalDirection2D
portDirection()
The direction where the out port is located.Value
value()
The value wrapped in this alignment item.
-
-
-
Method Detail
-
boundingBox
Rectangular2DDouble boundingBox()
The bounding box of this alignment item, i.e. its width and height.- Returns:
- The bounding box of this alignment item.
-
childAlignmentItems
List<Positioned<? extends Children,Point2DDouble>> childAlignmentItems()
The children of this alignment item, together with their position. The position is always relative to the top-left corner of this alignment item.- Returns:
- The children of this alignment item, together with their position.
-
inPort
Double inPort()
The in port that accepts an incoming sequence flow.The meaning of this value depends on the
direction
:EAST
- The distance from the top edge of the part to the position to the in port. The in port is on the left edge of the part's bounding box.
SOUTH
- The distance from the left edge of the part to the position to the in port. The in port is on the top edge of the part's bounding box.
WEST
- The distance from the top edge of the part to the position to the in port. The in port is on the right edge of the part's bounding box.
SOUTH
- The distance from the left edge of the part to the position to the in port. The in port is on the bottom edge of the part's bounding box.
May be null if this item does not have an in port, such as a
StartEvent
.- Returns:
- The position of the in port, relative to the top or left edge.
-
outPort
Double outPort()
The out port for the sequence flow that connects this item with other items.The meaning of this value depends on the
direction
:EAST
- The distance from the top edge of the part to the position to the out port. The out port is on the right edge of the part's bounding box.
SOUTH
- The distance from the left edge of the part to the position to the out port. The out port is on the bottom edge of the part's bounding box.
WEST
- The distance from the top edge of the part to the position to the out port. The out port is on the left edge of the part's bounding box.
NORTH
- The distance from the left edge of the part to the position to the out port. The out port is on the top edge of the part's bounding box.
May be null if this part does not have an out port, i.e. if execution of this part never finishes successfully, such as an
EndEvent
.- Returns:
- The position of the out port, relative to the top or left edge.
-
point
Point2DDouble point(ECardinalDirection2D direction, double ratio)
Returns the point on the boundary of this alignment item in the given direction and at the given ratio. The point is always relative to the top-left corner of this alignment item's bounding box.In formal terms, this is the intersection point of an axis-aligned ray with the actual shape of the alignment item. The ray is situated at the given ratio between the minimum and maximum extent of the shape; and starts at infinity in the given direction.
For example, when the direction is north and the ratio is 0.25, take the minimum and maximum x coordinate of the shape, the move to 25% the distance between the minimum and maximum x coordinate, then move vertically away from the shape and cast a ray downwards towards the shape. To illustrate:
direction = NORTH ratio = 0.25 v marks the boundary point | | <------------ downwards ray at 25% of the boundary box width | | | | ^ | / \ | / \ v/ \ / \ / \ <--- triangular shape / \ / \ /_______________\ <---------------> width of the bounding box
- Parameters:
direction
- The direction from which to obtain the point. This points towards an edge the alignment item's bounding box.ratio
- The ratio of the distance from the left or top part of the edge pointed to by the given direction.- Returns:
- The point in the alignment item's boundary, relative to the top-left corner of the item's bounding box.
-
point
Point2DDouble point(String name)
Returns the named point on this alignment item. Each alignment item may contain special points, which are always relative to the top-left corner of this alignment item. For example, a gateway could have points for the 4 corners of the rhombus shape.- Returns:
- The named point on this alignment item with the given name, relative to the top-left corner of the item's bounding box.
-
portDirection
ECardinalDirection2D portDirection()
The direction where the out port is located. The in port is at the opposite end. If aninPort()
oroutPort()
is set (non-null), a port direction must be set as well. If no port is set, the port direction must be null.- Returns:
- The direction where the out port is located, or null when this item does not have an in or out port.
-
value
Value value()
The value wrapped in this alignment item.- Returns:
- The wrapped value.
-
-