Interface IFlattenedAlignmentItemMap<Value>
-
- Type Parameters:
Value
- The type of the value of the alignment item.
- All Superinterfaces:
IWorkflowBpmnAlignmentItem<Value,IWorkflowBpmnAlignmentItem<?,?>>
public interface IFlattenedAlignmentItemMap<Value> extends IWorkflowBpmnAlignmentItem<Value,IWorkflowBpmnAlignmentItem<?,?>>
The result offlattening
anIWorkflowBpmnAlignmentItem
, with the positions of all child items resolved. Provides methods to access the children directly, e.g. in order to retrieve their final positions.You can use both the
IWorkflowBpmnAlignmentItem
as well as itsvalues
as the key to access the item.Usually, when modeling a
WorkflowNode
orWorkflowTrigger
for a BPMN diagram, you would build and layout a hierarchy ofIWorkflowBpmnAlignmentItem
, then flatten it to get access to the final positions of eachBpmnElement
.- Since:
- 8.4.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description IWorkflowBpmnAssociationEdgeBuilder
association()
Gets a builder for adding anAssociation
between elements in this map.Rectangular2DDouble
boundingBox(Object value)
Finds
the item at the given value and returns itsbounding box
.double
coordinateAtEdge(Object value, ECardinalDirection2D direction)
Finds
the item at the given value and returns the coordinate of the edge in the given direction.de.xima.bpmn_model.api.element.bpmndi.BpmnShape
createBoundaryEventShape(de.xima.bpmn_model.api.element.bpmn.events.BoundaryEvent boundaryEvent)
Creates a BPMN shape
for the given boundary event and colorizes it with the default colors, if needed.de.xima.bpmn_model.api.element.bpmndi.BpmnShape
createBoundaryEventShape(IAnnotatedNamedBpmnElementLayout<? extends de.xima.bpmn_model.api.element.bpmn.events.BoundaryEvent> boundaryEvent)
Creates a BPMN shape
for the given boundary event and colorizes it with the default colors, if needed.de.xima.bpmn_model.api.element.dc.Point
createBpmnPointAtEdge(Object value, ECardinalDirection2D side, double position)
Finds
the item at the given value and creates a newPoint
for that a point on one of the item's 4 edges.de.xima.bpmn_model.api.element.dc.Point
createBpmnPointAtEdgeRelative(Object value, ECardinalDirection2D side, double ratio)
Finds
the item at the given value and creates a newPoint
for that a point on one of the item's 4 edges.de.xima.bpmn_model.api.element.bpmndi.BpmnShape
createBpmnShape(Object value)
Finds
the item at the given value and creates a newBpmnShape
for that item.de.xima.bpmn_model.api.element.bpmndi.BpmnShape
createDataObjectShape(de.xima.bpmn_model.api.element.bpmn.data.DataObjectReference dataObject)
Creates a BPMN shape
for the given data object and colorizes it with the default colors, if needed.de.xima.bpmn_model.api.element.bpmndi.BpmnShape
createDataObjectShape(IAnnotatedNamedBpmnElementLayout<? extends de.xima.bpmn_model.api.element.bpmn.data.DataObjectReference> dataObject)
Creates a BPMN shape
for the given data object and colorizes it with the default colors, if needed.de.xima.bpmn_model.api.element.bpmndi.BpmnShape
createDataStoreShape(de.xima.bpmn_model.api.element.bpmn.data.DataStoreReference dataStore)
Creates a BPMN shape
for the given data store and colorizes it with the default colors, if needed.de.xima.bpmn_model.api.element.bpmndi.BpmnShape
createDataStoreShape(IAnnotatedNamedBpmnElementLayout<? extends de.xima.bpmn_model.api.element.bpmn.data.DataStoreReference> dataStore)
Creates a BPMN shape
for the given data store and colorizes it with the default colors, if needed.de.xima.bpmn_model.api.element.bpmndi.BpmnShape
createEndEventShape(de.xima.bpmn_model.api.element.bpmn.events.EndEvent endEvent)
Creates a BPMN shape
for the given end event and colorizes it with the default colors, if needed.de.xima.bpmn_model.api.element.bpmndi.BpmnShape
createEndEventShape(IAnnotatedNamedBpmnElementLayout<? extends de.xima.bpmn_model.api.element.bpmn.events.EndEvent> endEvent)
Creates a BPMN shape
for the given end event and colorizes it with the default colors, if needed.de.xima.bpmn_model.api.element.bpmndi.BpmnShape
createExclusiveGatewayShape(de.xima.bpmn_model.api.element.bpmn.gateways.ExclusiveGateway gateway)
Creates a BPMN shape
for the given exclusive gateway and colorizes it with the default colors, if needed.de.xima.bpmn_model.api.element.bpmndi.BpmnShape
createExclusiveGatewayShape(IAnnotatedNamedBpmnElementLayout<? extends de.xima.bpmn_model.api.element.bpmn.gateways.ExclusiveGateway> gateway)
Creates a BPMN shape
for the given exclusive gateway and colorizes it with the default colors, if needed.de.xima.bpmn_model.api.element.bpmndi.BpmnShape
createExpandedSubProcessShape(de.xima.bpmn_model.api.element.bpmn.activities.SubProcess<?> subProcess)
Creates a BPMN shape
for the given expanded sub process and colorizes it with the default colors, if needed.de.xima.bpmn_model.api.element.bpmndi.BpmnShape
createExpandedSubProcessShape(ISubProcessBpmnElementLayout<? extends de.xima.bpmn_model.api.element.bpmn.activities.SubProcess<?>> subProcess)
Creates a BPMN shape
for the given expanded sub process and colorizes it with the default colors, if needed.de.xima.bpmn_model.api.element.dc.Point
createInPortBpmnPoint(Object value)
Finds
the item at the given value and creates a newPoint
for that item's in port.de.xima.bpmn_model.api.element.bpmndi.BpmnShape
createIntermediateCatchEventShape(de.xima.bpmn_model.api.element.bpmn.events.IntermediateCatchEvent intermediateCatchEvent)
Creates a BPMN shape
for the given intermediate catch event and colorizes it with the default colors, if needed.de.xima.bpmn_model.api.element.bpmndi.BpmnShape
createIntermediateCatchEventShape(IAnnotatedNamedBpmnElementLayout<? extends de.xima.bpmn_model.api.element.bpmn.events.IntermediateCatchEvent> intermediateCatchEvent)
Creates a BPMN shape
for the given intermediate catch event and colorizes it with the default colors, if needed.de.xima.bpmn_model.api.element.bpmndi.BpmnShape
createIntermediateThrowEventShape(de.xima.bpmn_model.api.element.bpmn.events.IntermediateThrowEvent intermediateThrowEvent)
Creates a BPMN shape
for the given intermediate throw event and colorizes it with the default colors, if needed.de.xima.bpmn_model.api.element.bpmndi.BpmnShape
createIntermediateThrowEventShape(IAnnotatedNamedBpmnElementLayout<? extends de.xima.bpmn_model.api.element.bpmn.events.IntermediateThrowEvent> intermediateThrowEvent)
Creates a BPMN shape
for the given intermediate throw event and colorizes it with the default colors, if needed.de.xima.bpmn_model.api.element.bpmndi.BpmnLabel
createLabel(de.xima.bpmn_model.api.element.bpmndi.BpmnEdge edge, StyledBpmnLabel styleLabel)
Creates the label for the given edge.de.xima.bpmn_model.api.element.bpmndi.BpmnLabel
createLabel(de.xima.bpmn_model.api.element.bpmndi.BpmnEdge edge, INamedBpmnElementLayout<?> namedElement)
Creates the label for the given edge.de.xima.bpmn_model.api.element.bpmndi.BpmnLabel
createLabel(de.xima.bpmn_model.api.element.bpmndi.BpmnShape shape, StyledBpmnLabel styleLabel)
Creates the label for the given shape.de.xima.bpmn_model.api.element.bpmndi.BpmnLabel
createLabel(de.xima.bpmn_model.api.element.bpmndi.BpmnShape shape, INamedBpmnElementLayout<?> namedElement)
Creates the label for the given shape.de.xima.bpmn_model.api.element.dc.Point
createOutPortBpmnPoint(Object value)
Finds
the item at the given value and creates a newPoint
for that item's out port.de.xima.bpmn_model.api.element.dc.Point
createResolvedBpmnPoint(Object value, String name)
Finds
the item at the given value and gets thenamed point
with the given name.de.xima.bpmn_model.api.element.bpmndi.BpmnShape
createStartEventShape(de.xima.bpmn_model.api.element.bpmn.events.StartEvent startEvent)
Creates a BPMN shape
for the given start event and colorizes it with the default colors, if needed.de.xima.bpmn_model.api.element.bpmndi.BpmnShape
createStartEventShape(IAnnotatedNamedBpmnElementLayout<? extends de.xima.bpmn_model.api.element.bpmn.events.StartEvent> startEvent)
Creates a BPMN shape
for the given start event and colorizes it with the default colors, if needed.IWorkflowBpmnSubProcessBodyShape
createSubProcessBodyEventShapes(IBoundedBpmnElementLayout<?> bounded)
Creates a BPMN shape
for the start and end events of the given sub process body (if any) and colorizes them with the default colors, if needed.de.xima.bpmn_model.api.element.bpmndi.BpmnShape
createTaskShape(de.xima.bpmn_model.api.element.bpmn.activities.Task<?> task)
Creates a BPMN shape
for the given task and colorizes it with the default colors, if needed.de.xima.bpmn_model.api.element.bpmndi.BpmnShape
createTaskShape(IAnnotatedNamedBpmnElementLayout<? extends de.xima.bpmn_model.api.element.bpmn.activities.Task<?>> task)
Creates a BPMN shape
for the given task and colorizes it with the default colors, if needed.de.xima.bpmn_model.api.element.bpmndi.BpmnShape
createTextAnnotationShape(de.xima.bpmn_model.api.element.bpmn.artifacts.TextAnnotation textAnnotation, StyledBpmnLabel label)
Creates a BPMN shape
for the given text annotation, colorizes it with the default colors if needed, andadds a label
to the shape.de.xima.bpmn_model.api.element.bpmndi.BpmnShape
createTextAnnotationShape(IAnnotatedBpmnElementLayout<?> annotatedLayout)
Creates a BPMN shape
for the given text annotation, colorizes it with the default colors if needed, andadds a label
to the shape.IWorkflowBpmnDataAssociationEdgeBuilder
dataAssociation()
Gets a builder for creating aBpmnEdge
for aDataAssociation
between elements in this map.IWorkflowBpmnFlowEdgeBuilder
flow()
Gets a builder for adding aSequenceFlow
between elements in this map.Positioned<IWorkflowBpmnAlignmentItem<?,?>,Point2DDouble>
get(Object value)
Gets the alignment item for the given value.Double
inPort(Object value)
Point2DDouble
inPortPoint(Object value)
IWorkflowBpmnAlignmentItem<?,?>
item(Object value)
Finds
the item at the given value and returns itsalignment item
.<Item extends IWorkflowBpmnAlignmentItem<?,?>>
Itemitem(Object value, Class<Item> type)
Finds
the item at the given value and returns itsalignment item
, if it is of the given type.Double
outPort(Object value)
Point2DDouble
outPortPoint(Object value)
Point2DDouble
pointAtEdge(Object value, ECardinalDirection2D side, double position)
Finds
the item at the given value and creates a point on one of that item's edges at the given position.Point2DDouble
pointAtEdgeRelative(Object value, ECardinalDirection2D side, double ratio)
Finds
the item at the given value and creates a point on one of that item's edges at the given position.Point2DDouble
position(Object value)
Point2DDouble
resolvedPoint(Object value, String name)
Finds
the item at the given value and returns thenamed point
with the given name.int
size()
Gets the number ofalignment items
present.-
Methods inherited from interface de.xima.fc.interfaces.workflow.bpmn.IWorkflowBpmnAlignmentItem
boundingBox, childAlignmentItems, inPort, outPort, point, point, portDirection, value
-
-
-
-
Method Detail
-
association
IWorkflowBpmnAssociationEdgeBuilder association()
Gets a builder for adding anAssociation
between elements in this map. This is a convenience method, you could also retrieve the corresponding elements manually from this map and create the association manually.- Returns:
- A builder for creating an association.
-
boundingBox
Rectangular2DDouble boundingBox(Object value)
Finds
the item at the given value and returns itsbounding box
.- Parameters:
value
- Thevalue
of the alignment item.- Returns:
- The bounding box of the alignment item, or null if no item with the given value exists.
-
coordinateAtEdge
double coordinateAtEdge(Object value, ECardinalDirection2D direction)
Finds
the item at the given value and returns the coordinate of the edge in the given direction. SeeGeometry2D#edgeCoordinate
for more details.
-
createBoundaryEventShape
@CanIgnoreReturnValue de.xima.bpmn_model.api.element.bpmndi.BpmnShape createBoundaryEventShape(de.xima.bpmn_model.api.element.bpmn.events.BoundaryEvent boundaryEvent)
Creates a BPMN shape
for the given boundary event and colorizes it with the default colors, if needed.- Parameters:
boundaryEvent
- The boundary event to create a shape for.- Returns:
- The new BPMN shape for the boundary event.
-
createBoundaryEventShape
@CanIgnoreReturnValue de.xima.bpmn_model.api.element.bpmndi.BpmnShape createBoundaryEventShape(IAnnotatedNamedBpmnElementLayout<? extends de.xima.bpmn_model.api.element.bpmn.events.BoundaryEvent> boundaryEvent)
Creates a BPMN shape
for the given boundary event and colorizes it with the default colors, if needed.This method will also create the
name
andtext annotation
, if the given layout has any.- Parameters:
boundaryEvent
- The boundary event to create a shape for.- Returns:
- The new BPMN shape for the boundary event.
-
createBpmnPointAtEdge
de.xima.bpmn_model.api.element.dc.Point createBpmnPointAtEdge(Object value, ECardinalDirection2D side, double position)
Finds
the item at the given value and creates a newPoint
for that a point on one of the item's 4 edges.- Parameters:
value
- Thevalue
of the alignment item.side
- The edge of the item to create the point on.position
- The position of the point on the edge, between 0 and the maximum length of the edge. For theNORTH
edge, 0 is the top-left corner. For theSOUTH
edge, 0 is the bottom-left corner. For theEAST
edge, 0 is the top-right corner. For theWEST
edge, 0 is the top-left corner.- Returns:
- The BPMN point with the position of the point, or null when no item exists for the given key.
-
createBpmnPointAtEdgeRelative
de.xima.bpmn_model.api.element.dc.Point createBpmnPointAtEdgeRelative(Object value, ECardinalDirection2D side, double ratio)
Finds
the item at the given value and creates a newPoint
for that a point on one of the item's 4 edges.- Parameters:
value
- Thevalue
of the alignment item.side
- The edge of the item to create the point on.ratio
- The relative position of the point on the edge, between 0 (start of the edge) and 1 (end of the edge). For theNORTH
edge, 0 is the top-left corner. For theSOUTH
edge, 0 is the bottom-left corner. For theEAST
edge, 0 is the top-right corner. For theWEST
edge, 0 is the top-left corner.- Returns:
- The BPMN point with the position of the point, or null when no item exists for the given key.
-
createBpmnShape
@CanIgnoreReturnValue de.xima.bpmn_model.api.element.bpmndi.BpmnShape createBpmnShape(Object value)
Finds
the item at the given value and creates a newBpmnShape
for that item. Uses theposition
andbounding box
for thebounds
of the shape. If thevalue
of the item is aBaseElement
, it will be set as theshape's BPMN element
.- Parameters:
value
- Thevalue
of the alignment item.- Returns:
- The new BPMN shape for the alignment item, or null when no item exists for the given key.
-
createDataObjectShape
@CanIgnoreReturnValue de.xima.bpmn_model.api.element.bpmndi.BpmnShape createDataObjectShape(de.xima.bpmn_model.api.element.bpmn.data.DataObjectReference dataObject)
Creates a BPMN shape
for the given data object and colorizes it with the default colors, if needed.- Parameters:
dataObject
- The data object to create a shape for.- Returns:
- The new BPMN shape for the boundary event.
-
createDataObjectShape
@CanIgnoreReturnValue de.xima.bpmn_model.api.element.bpmndi.BpmnShape createDataObjectShape(IAnnotatedNamedBpmnElementLayout<? extends de.xima.bpmn_model.api.element.bpmn.data.DataObjectReference> dataObject)
Creates a BPMN shape
for the given data object and colorizes it with the default colors, if needed.- Parameters:
dataObject
- The data object to create a shape for.- Returns:
- The new BPMN shape for the boundary event.
-
createDataStoreShape
@CanIgnoreReturnValue de.xima.bpmn_model.api.element.bpmndi.BpmnShape createDataStoreShape(de.xima.bpmn_model.api.element.bpmn.data.DataStoreReference dataStore)
Creates a BPMN shape
for the given data store and colorizes it with the default colors, if needed.- Parameters:
dataStore
- The data store to create a shape for.- Returns:
- The new BPMN shape for the boundary event.
-
createDataStoreShape
@CanIgnoreReturnValue de.xima.bpmn_model.api.element.bpmndi.BpmnShape createDataStoreShape(IAnnotatedNamedBpmnElementLayout<? extends de.xima.bpmn_model.api.element.bpmn.data.DataStoreReference> dataStore)
Creates a BPMN shape
for the given data store and colorizes it with the default colors, if needed.- Parameters:
dataStore
- The data store to create a shape for.- Returns:
- The new BPMN shape for the boundary event.
-
createEndEventShape
@CanIgnoreReturnValue de.xima.bpmn_model.api.element.bpmndi.BpmnShape createEndEventShape(de.xima.bpmn_model.api.element.bpmn.events.EndEvent endEvent)
Creates a BPMN shape
for the given end event and colorizes it with the default colors, if needed.- Parameters:
endEvent
- The end event to create a shape for.- Returns:
- The new BPMN shape for the end event.
-
createEndEventShape
@CanIgnoreReturnValue de.xima.bpmn_model.api.element.bpmndi.BpmnShape createEndEventShape(IAnnotatedNamedBpmnElementLayout<? extends de.xima.bpmn_model.api.element.bpmn.events.EndEvent> endEvent)
Creates a BPMN shape
for the given end event and colorizes it with the default colors, if needed.This method will also create the
name
andtext annotation
, if the given layout has any.- Parameters:
endEvent
- The end event to create a shape for.- Returns:
- The new BPMN shape for the end event.
-
createExclusiveGatewayShape
@CanIgnoreReturnValue de.xima.bpmn_model.api.element.bpmndi.BpmnShape createExclusiveGatewayShape(de.xima.bpmn_model.api.element.bpmn.gateways.ExclusiveGateway gateway)
Creates a BPMN shape
for the given exclusive gateway and colorizes it with the default colors, if needed.- Parameters:
gateway
- The exclusive gateway to create a shape for.- Returns:
- The new BPMN shape for the exclusive gateway.
-
createExclusiveGatewayShape
@CanIgnoreReturnValue de.xima.bpmn_model.api.element.bpmndi.BpmnShape createExclusiveGatewayShape(IAnnotatedNamedBpmnElementLayout<? extends de.xima.bpmn_model.api.element.bpmn.gateways.ExclusiveGateway> gateway)
Creates a BPMN shape
for the given exclusive gateway and colorizes it with the default colors, if needed.This method will also create the
name
andtext annotation
, if the given layout has any.- Parameters:
gateway
- The exclusive gateway to create a shape for.- Returns:
- The new BPMN shape for the exclusive gateway.
-
createExpandedSubProcessShape
@CanIgnoreReturnValue de.xima.bpmn_model.api.element.bpmndi.BpmnShape createExpandedSubProcessShape(de.xima.bpmn_model.api.element.bpmn.activities.SubProcess<?> subProcess)
Creates a BPMN shape
for the given expanded sub process and colorizes it with the default colors, if needed.- Parameters:
subProcess
- The expanded sub process to create a shape for.- Returns:
- The new BPMN shape for the expanded sub process.
-
createExpandedSubProcessShape
@CanIgnoreReturnValue de.xima.bpmn_model.api.element.bpmndi.BpmnShape createExpandedSubProcessShape(ISubProcessBpmnElementLayout<? extends de.xima.bpmn_model.api.element.bpmn.activities.SubProcess<?>> subProcess)
Creates a BPMN shape
for the given expanded sub process and colorizes it with the default colors, if needed.This method will also create the
name
andtext annotation
, as well as thestart
andend event
, if the given layout has any.- Parameters:
subProcess
- The expanded sub process to create a shape for.- Returns:
- The new BPMN shape for the expanded sub process.
-
createInPortBpmnPoint
de.xima.bpmn_model.api.element.dc.Point createInPortBpmnPoint(Object value)
Finds
the item at the given value and creates a newPoint
for that item's in port. Retrieves the item'sin port
and resolves that in port to an absolute position (with respect to the coordinate system of this alignment item map).- Parameters:
value
- Thevalue
of the alignment item.- Returns:
- The BPMN point with the position of the in port, or null when no item exists for the given key.
-
createIntermediateCatchEventShape
@CanIgnoreReturnValue de.xima.bpmn_model.api.element.bpmndi.BpmnShape createIntermediateCatchEventShape(de.xima.bpmn_model.api.element.bpmn.events.IntermediateCatchEvent intermediateCatchEvent)
Creates a BPMN shape
for the given intermediate catch event and colorizes it with the default colors, if needed.- Parameters:
intermediateCatchEvent
- The intermediate catch event to create a shape for.- Returns:
- The new BPMN shape for the intermediate catch event.
-
createIntermediateCatchEventShape
@CanIgnoreReturnValue de.xima.bpmn_model.api.element.bpmndi.BpmnShape createIntermediateCatchEventShape(IAnnotatedNamedBpmnElementLayout<? extends de.xima.bpmn_model.api.element.bpmn.events.IntermediateCatchEvent> intermediateCatchEvent)
Creates a BPMN shape
for the given intermediate catch event and colorizes it with the default colors, if needed.This method will also create the
name
andtext annotation
, if the given layout has any.- Parameters:
intermediateCatchEvent
- The intermediate catch event to create a shape for.- Returns:
- The new BPMN shape for the intermediate catch event.
-
createIntermediateThrowEventShape
@CanIgnoreReturnValue de.xima.bpmn_model.api.element.bpmndi.BpmnShape createIntermediateThrowEventShape(de.xima.bpmn_model.api.element.bpmn.events.IntermediateThrowEvent intermediateThrowEvent)
Creates a BPMN shape
for the given intermediate throw event and colorizes it with the default colors, if needed.- Parameters:
intermediateThrowEvent
- The intermediate throw event to create a shape for.- Returns:
- The new BPMN shape for the intermediate throw event.
-
createIntermediateThrowEventShape
@CanIgnoreReturnValue de.xima.bpmn_model.api.element.bpmndi.BpmnShape createIntermediateThrowEventShape(IAnnotatedNamedBpmnElementLayout<? extends de.xima.bpmn_model.api.element.bpmn.events.IntermediateThrowEvent> intermediateThrowEvent)
Creates a BPMN shape
for the given intermediate throw event and colorizes it with the default colors, if needed.This method will also create the
name
andtext annotation
, if the given layout has any.- Parameters:
intermediateThrowEvent
- The intermediate throw event to create a shape for.- Returns:
- The new BPMN shape for the intermediate throw event.
-
createLabel
@CanIgnoreReturnValue de.xima.bpmn_model.api.element.bpmndi.BpmnLabel createLabel(de.xima.bpmn_model.api.element.bpmndi.BpmnShape shape, StyledBpmnLabel styleLabel)
Creates the label for the given shape. If theshape already has a label
already, uses that label, otherwise creates a new label for the shape. Applies the bounds and label style to the label, if available, and returns the label.- Parameters:
shape
- The shape to create a label for. The label will be added to this shape.styleLabel
- The style to apply to the label, may be null. If null, the label will not have any style.- Returns:
- The new BPMN label for the shape, or the existing label if the shape already has one.
-
createLabel
@CanIgnoreReturnValue de.xima.bpmn_model.api.element.bpmndi.BpmnLabel createLabel(de.xima.bpmn_model.api.element.bpmndi.BpmnEdge edge, StyledBpmnLabel styleLabel)
Creates the label for the given edge. If theedge already has a label
already, uses that label, otherwise creates a new label for the edge. Applies the bounds and label style to the label, if available, and returns the label.- Parameters:
edge
- The edge to create a label for. The label will be added to this edge.styleLabel
- The style to apply to the label, may be null. If null, the label will not have any style.- Returns:
- The new BPMN label for the edge, or the existing label if the edge already has one.
-
createLabel
@CanIgnoreReturnValue de.xima.bpmn_model.api.element.bpmndi.BpmnLabel createLabel(de.xima.bpmn_model.api.element.bpmndi.BpmnShape shape, INamedBpmnElementLayout<?> namedElement)
Creates the label for the given shape. If theshape already has a label
already, uses that label, otherwise creates a new label for the shape. Applies the bounds and label style to the label, if available, and returns the label.- Parameters:
shape
- The shape to create a label for. The label will be added to this shape.namedElement
- An element with a styled label apply, may be null. If null, the label will not have any style.- Returns:
- The new BPMN label for the shape, or the existing label if the shape already has one.
-
createLabel
@CanIgnoreReturnValue de.xima.bpmn_model.api.element.bpmndi.BpmnLabel createLabel(de.xima.bpmn_model.api.element.bpmndi.BpmnEdge edge, INamedBpmnElementLayout<?> namedElement)
Creates the label for the given edge. If theedge already has a label
already, uses that label, otherwise creates a new label for the edge. Applies the bounds and label style to the label, if available, and returns the label.- Parameters:
edge
- The edge to create a label for. The label will be added to this edge.namedElement
- An element with a styled label apply, may be null. If null, the label will not have any style.- Returns:
- The new BPMN label for the edge, or the existing label if the edge already has one.
-
createOutPortBpmnPoint
de.xima.bpmn_model.api.element.dc.Point createOutPortBpmnPoint(Object value)
Finds
the item at the given value and creates a newPoint
for that item's out port. Retrieves the item'sout port
and resolves that out port to an absolute position (with respect to the coordinate system of this alignment item map).- Parameters:
value
- Thevalue
of the alignment item.- Returns:
- The BPMN point with the position of the out port, or null when no item exists for the given key.
-
createResolvedBpmnPoint
de.xima.bpmn_model.api.element.dc.Point createResolvedBpmnPoint(Object value, String name)
Finds
the item at the given value and gets thenamed point
with the given name. The point is resolved relative to the item's position. Creates and returns a newPoint
with those coordinates.- Parameters:
value
- Thevalue
of the alignment item.name
- The name of the point to retrieve.- Returns:
- A new BPMN point with the resolved coordinates of the given named point.
-
createStartEventShape
@CanIgnoreReturnValue de.xima.bpmn_model.api.element.bpmndi.BpmnShape createStartEventShape(de.xima.bpmn_model.api.element.bpmn.events.StartEvent startEvent)
Creates a BPMN shape
for the given start event and colorizes it with the default colors, if needed.- Parameters:
startEvent
- The start event to create a shape for.- Returns:
- The new BPMN shape for the start event.
-
createStartEventShape
@CanIgnoreReturnValue de.xima.bpmn_model.api.element.bpmndi.BpmnShape createStartEventShape(IAnnotatedNamedBpmnElementLayout<? extends de.xima.bpmn_model.api.element.bpmn.events.StartEvent> startEvent)
Creates a BPMN shape
for the given start event and colorizes it with the default colors, if needed.This method will also create the
name
andtext annotation
, if the given layout has any.- Parameters:
startEvent
- The start event to create a shape for.- Returns:
- The new BPMN shape for the start event.
-
createSubProcessBodyEventShapes
@CanIgnoreReturnValue IWorkflowBpmnSubProcessBodyShape createSubProcessBodyEventShapes(IBoundedBpmnElementLayout<?> bounded)
Creates a BPMN shape
for the start and end events of the given sub process body (if any) and colorizes them with the default colors, if needed.- Parameters:
bounded
- The body of a sub process with a start and end event for which to create shapes.- Returns:
- The new BPMN shapes for the start and end events.
-
createTaskShape
@CanIgnoreReturnValue de.xima.bpmn_model.api.element.bpmndi.BpmnShape createTaskShape(de.xima.bpmn_model.api.element.bpmn.activities.Task<?> task)
Creates a BPMN shape
for the given task and colorizes it with the default colors, if needed.- Parameters:
task
- The task to create a shape for.- Returns:
- The new BPMN shape for the task.
-
createTaskShape
@CanIgnoreReturnValue de.xima.bpmn_model.api.element.bpmndi.BpmnShape createTaskShape(IAnnotatedNamedBpmnElementLayout<? extends de.xima.bpmn_model.api.element.bpmn.activities.Task<?>> task)
Creates a BPMN shape
for the given task and colorizes it with the default colors, if needed.This method will also create the
name
andtext annotation
, if the given layout has any.- Parameters:
task
- The task to create a shape for.- Returns:
- The new BPMN shape for the task.
-
createTextAnnotationShape
@CanIgnoreReturnValue de.xima.bpmn_model.api.element.bpmndi.BpmnShape createTextAnnotationShape(de.xima.bpmn_model.api.element.bpmn.artifacts.TextAnnotation textAnnotation, StyledBpmnLabel label)
Creates a BPMN shape
for the given text annotation, colorizes it with the default colors if needed, andadds a label
to the shape.- Parameters:
textAnnotation
- The text annotation to create a shape for.label
- The label of the text annotation.- Returns:
- The new BPMN shape for the text annotation.
-
createTextAnnotationShape
@CanIgnoreReturnValue de.xima.bpmn_model.api.element.bpmndi.BpmnShape createTextAnnotationShape(IAnnotatedBpmnElementLayout<?> annotatedLayout)
Creates a BPMN shape
for the given text annotation, colorizes it with the default colors if needed, andadds a label
to the shape.- Parameters:
annotatedLayout
- The annotated layout with the text annotation and its text.- Returns:
- The new BPMN shape for the text annotation.
-
dataAssociation
IWorkflowBpmnDataAssociationEdgeBuilder dataAssociation()
Gets a builder for creating aBpmnEdge
for aDataAssociation
between elements in this map. This is a convenience method, you could also retrieve the corresponding elements manually from this map and create the edge manually.- Returns:
- A builder for creating an edge for a data association.
-
flow
IWorkflowBpmnFlowEdgeBuilder flow()
Gets a builder for adding aSequenceFlow
between elements in this map. This is a convenience method, you could also retrieve the corresponding elements manually from this map and create the flow manually.- Returns:
- A builder for creating a sequence flow.
-
get
Positioned<IWorkflowBpmnAlignmentItem<?,?>,Point2DDouble> get(Object value)
Gets the alignment item for the given value. The value corresponds to thevalue
of each individual alignment item. You may also pass an instance ofIWorkflowBpmnAlignmentItem
; if you do, this is treated as if you had passed thevalue
of that item.- Parameters:
value
- The value of the alignment item to get.- Returns:
- The alignment item for the given key, or null if no such item exists.
-
inPort
Double inPort(Object value)
- Parameters:
value
- Thevalue
of the alignment item.- Returns:
- The in port of the alignment item, or null if no item with the given value exists.
-
inPortPoint
Point2DDouble inPortPoint(Object value)
Finds
the item at the given value, retrieves itsin port
and resolves that in port to an absolute position (with respect to the coordinate system of this alignment item map).- Parameters:
value
- Thevalue
of the alignment item.- Returns:
- The absolute position of the in port, or null if no item with the given value exists.
-
item
IWorkflowBpmnAlignmentItem<?,?> item(Object value)
Finds
the item at the given value and returns itsalignment item
.- Parameters:
value
- The value of the alignment item to get.- Returns:
- The alignment item for the given key, or null if no such item exists.
-
item
<Item extends IWorkflowBpmnAlignmentItem<?,?>> Item item(Object value, Class<Item> type)
Finds
the item at the given value and returns itsalignment item
, if it is of the given type.- Parameters:
value
- The value of the alignment item to get.type
- The desired alignment item subtype.- Returns:
- The alignment item for the given key, or null if no such item exists.
-
outPort
Double outPort(Object value)
- Parameters:
value
- Thevalue
of the alignment item.- Returns:
- The out port of the alignment item, or null if no item with the given value exists.
-
outPortPoint
Point2DDouble outPortPoint(Object value)
Finds
the item at the given value, retrieves itsin port
and resolves that in port to an absolute position (with respect to the coordinate system of this alignment item map).- Parameters:
value
- Thevalue
of the alignment item.- Returns:
- The absolute position of the in port, or null if no item with the given value exists.
-
pointAtEdge
Point2DDouble pointAtEdge(Object value, ECardinalDirection2D side, double position)
Finds
the item at the given value and creates a point on one of that item's edges at the given position.- Parameters:
value
- Thevalue
of the alignment item.side
- The edge of the item to create the point on.position
- The position of the point on the edge, between 0 and the maximum length of the edge. For theNORTH
edge, 0 is the top-left corner. For theSOUTH
edge, 0 is the bottom-left corner. For theEAST
edge, 0 is the top-right corner. For theWEST
edge, 0 is the top-left corner.- Returns:
- The absolute position of the in port, or null if no item with the given value exists.
-
pointAtEdgeRelative
Point2DDouble pointAtEdgeRelative(Object value, ECardinalDirection2D side, double ratio)
Finds
the item at the given value and creates a point on one of that item's edges at the given position.- Parameters:
value
- Thevalue
of the alignment item.side
- The edge of the item to create the point on.ratio
- The relative position of the point on the edge, between 0 (start of the edge) and 1 (end of the edge). For theNORTH
edge, 0 is the top-left corner. For theSOUTH
edge, 0 is the bottom-left corner. For theEAST
edge, 0 is the top-right corner. For theWEST
edge, 0 is the top-left corner.- Returns:
- The absolute position of the in port, or null if no item with the given value exists.
-
position
Point2DDouble position(Object value)
- Parameters:
value
- Thevalue
of the alignment item.- Returns:
- The position of the alignment item, or null if no item with the given value exists.
-
resolvedPoint
Point2DDouble resolvedPoint(Object value, String name)
Finds
the item at the given value and returns thenamed point
with the given name. The point is resolved relative to the item's position.- Parameters:
value
- Thevalue
of the alignment item.name
- The name of the point to retrieve.- Returns:
- The point with the given name, or null if no item with the given value exists.
-
size
int size()
Gets the number ofalignment items
present.- Returns:
- The number of alignment items.
-
-