|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.yworks.yfiles.bpmn.view.BpmnRealizerFactory
This is a factory for elements conforming to the Business Process Modeling Notation (BPMN).
Realizers for the different kinds of BPMN elements can be
created (see the many createXXX
methods of this class),
queried for BPMN properties (see e.g. getType
or
isShadowEnabled
), and
updated (see e.g. setType
or collapse
and
expand
).
Changing the type of a BPMN node in a graph (using setType
) is
possible. Since changing the BPMN type may require changing the realizer
and/or the grouping state, this is only supported for nodes that belong to a
graph with a hierarchy manager (but not for (unbound) realizers).
BPMN nodes with ProxyShapeNodeRealizer
s are supported, if the proxy
realizers are not nested.
Changing the type of a BPMN edge in a graph (using setType
) is
supported as well.
Method Summary | |
static void |
collapse(Node node)
Collapses the collapsible BPMN node realizer. |
static NodeRealizer |
createActivity(ActivityTypeEnum activityType,
TaskTypeEnum taskType)
Creates a BPMN activity node realizer for the given activity type and task type. |
static NodeRealizer |
createActivity(ActivityTypeEnum activityType,
TaskTypeEnum taskType,
MarkerTypeEnum marker)
Creates a BPMN activity node realizer for the given activity type, task type, and activity marker. |
static NodeRealizer |
createActivity(ActivityTypeEnum activityType,
TaskTypeEnum taskType,
MarkerTypeEnum[] markers)
Creates a BPMN activity node realizer for the given activity type, task type, and activity markers. |
static NodeRealizer |
createActivity(BpmnTypeEnum activityStatefulType)
Creates a BPMN activity node realizer for the given activity type. |
static NodeRealizer |
createArtifact(BpmnTypeEnum artifactType)
Creates a BPMN artifact node realizer for the given artifact type. |
static NodeRealizer |
createArtifact(BpmnTypeEnum artifactType,
DataObjectTypeEnum dataObjectType,
MarkerTypeEnum[] markers)
Creates a BPMN artifact node realizer for the given artifact type, data object type, and artifact markers. |
static NodeRealizer |
createChoreography(ChoreographyTypeEnum choreographyType,
MarkerTypeEnum[] markers)
Creates a BPMN choreography node realizer for the given choreography type and choreography markers. |
static EdgeRealizer |
createConnection(BpmnTypeEnum connectionType)
Returns a BPMN connection edge realizer for the given connection type. |
static NodeRealizer |
createConversation(ConversationTypeEnum conversationType,
boolean isSubConversation)
Creates a BPMN conversation node realizer for the given conversation type. |
static NodeRealizer |
createEvent(BpmnTypeEnum eventType,
EventCharEnum eventCharacteristic)
Returns a BPMN event node realizer for the given event type and characteristic. |
static NodeRealizer |
createGateway(BpmnTypeEnum gatewayType)
Returns a BPMN gateway node realizer for the given gateway type. |
static TableGroupNodeRealizer |
createPool(BpmnTypeEnum poolType)
Creates a BPMN Pool node realizer. |
static void |
expand(Node node)
Expands the collapsible BPMN node realizer. |
static ActivityTypeEnum |
getActivityType(NodeRealizer nodeRealizer)
Returns the activity type constant of the given node realizer. |
static ChoreographyTypeEnum |
getChoreographyType(NodeRealizer nodeRealizer)
Returns the choreography type constant of the given node realizer. |
static ConversationTypeEnum |
getConversationType(NodeRealizer nodeRealizer)
Returns the conversation type constant of the given node realizer. |
static DataObjectTypeEnum |
getDataObjectType(NodeRealizer nodeRealizer)
Returns the data object type constant of the given node realizer. |
static EventCharEnum |
getEventCharacteristic(NodeRealizer nodeRealizer)
Returns the BPMN event characteristic of the given node realizer. |
static MarkerTypeEnum[] |
getMarkers(NodeRealizer nodeRealizer)
Returns the BPMN markers of the given node realizer. |
static TaskTypeEnum |
getTaskType(NodeRealizer nodeRealizer)
Returns the task type of the given node realizer. |
static BpmnTypeEnum |
getType(Edge edge)
Returns the BPMN type of the realizer for the given edge. |
static BpmnTypeEnum |
getType(EdgeRealizer realizer)
Returns the BPMN type of the given edge realizer. |
static BpmnTypeEnum |
getType(Node node)
Returns the BPMN type of the realizer for the given node. |
static BpmnTypeEnum |
getType(NodeRealizer realizer)
Returns the BPMN type of the given node realizer. |
static boolean |
isBpmnEdgeRealizer(EdgeRealizer realizer)
Determines whether or not the given edge realizer is a BPMN edge realizer. |
static boolean |
isBpmnNodeRealizer(NodeRealizer nodeRealizer)
Determines whether or not the given node realizer is a BPMN node realizer. |
static boolean |
isShadowEnabled(NodeRealizer realizer)
Returns whether or not the given BPMN node realizer has a shadow. |
static boolean |
isTypeDependentLineStrokeEnabled(NodeRealizer realizer)
Determines whether or not the border of the specified node realizer is drawn using the realizer's lineType or using a stroke that
is determined by the BPMN type of the node.
|
static void |
setActivityType(NodeRealizer nodeRealizer,
ActivityTypeEnum type)
Sets the activity type for the given node realizer. |
static void |
setChoreographyType(NodeRealizer nodeRealizer,
ChoreographyTypeEnum type)
Sets the choreography type for the given node realizer. |
static void |
setConversationType(NodeRealizer nodeRealizer,
ConversationTypeEnum type)
Sets the conversation type for the given node realizer. |
static void |
setDataObjectType(NodeRealizer nodeRealizer,
DataObjectTypeEnum type)
Sets the data object type for the given node realizer. |
static void |
setEventCharacteristic(NodeRealizer nodeRealizer,
EventCharEnum characteristic)
Sets the BPMN event characteristic for the given node realizer. |
static void |
setMarkers(NodeRealizer nodeRealizer,
MarkerTypeEnum[] markers)
Sets the BPMN markers (maximum of four) for the given node realizer. |
static void |
setShadowEnabled(NodeRealizer realizer,
boolean enabled)
Specifies whether or not the given BPMN node realizer has a shadow. |
static void |
setTaskType(NodeRealizer nodeRealizer,
TaskTypeEnum taskType)
Sets the task type for the given node realizer. |
static EdgeRealizer |
setType(Edge edge,
BpmnTypeEnum type)
Sets the BPMN type of the given edge. |
static NodeRealizer |
setType(Node node,
BpmnTypeEnum bpmnType)
Sets the BPMN type for the given node. |
static NodeRealizer |
setType(Node node,
MarkerTypeEnum[] markers,
ActivityTypeEnum activityType,
TaskTypeEnum taskType)
Sets the BPMN type of the given node to an activity type with the given activity markers and the given task type. |
static NodeRealizer |
setType(Node node,
MarkerTypeEnum[] markers,
ChoreographyTypeEnum choreographyType)
Sets the BPMN type of the given node to a choreography type with the given choreography markers. |
static void |
setTypeDependentLineStrokeEnabled(NodeRealizer realizer,
boolean enabled)
Specifies whether or not the border of the specified node realizer is drawn using the realizer's lineType or using a stroke that
is determined by the BPMN type of the node.
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static BpmnTypeEnum getType(NodeRealizer realizer)
ProxyShapeNodeRealizer
s.
realizer
- a node realizer
BpmnTypeEnum
or null
getType(Node)
,
getType(EdgeRealizer)
public static BpmnTypeEnum getType(Node node)
node
- a node
BpmnTypeEnum
or null
getType(NodeRealizer)
public static BpmnTypeEnum getType(EdgeRealizer realizer)
realizer
- an edge realizer
BpmnTypeEnum
or null
getType(Edge)
,
getType(NodeRealizer)
public static BpmnTypeEnum getType(Edge edge)
edge
- an edge
BpmnTypeEnum
or null
getType(EdgeRealizer)
public static NodeRealizer setType(Node node, BpmnTypeEnum bpmnType)
If the type is a BPMN event type, this method also sets the characteristic for the resulting node using an arbitrary value, which forms a valid combination with the given event type.
Setting the BPMN type may result in a change of the realizer and/or its grouping state. This method supports nodes
that use ProxyShapeNodeRealizer
s.
For unsupported types and nodes not belonging to a Graph2D
an illegal argument exception is thrown.
It is also thrown, if the graph does not have a hierarchy manager.
node
- a nodebpmnType
- a BPMN bpmnType BpmnTypeEnum
IllegalArgumentException
- for unsupported types and nodes not belonging to a Graph2D
or if the graph has no hierarchy manager.getType(Node)
,
setEventCharacteristic(NodeRealizer, EventCharEnum)
public static NodeRealizer setType(Node node, MarkerTypeEnum[] markers, ActivityTypeEnum activityType, TaskTypeEnum taskType)
Setting the marker(s) may result in a change of the realizer and/or its grouping state. This method supports
nodes with ProxyShapeNodeRealizer
s.
For unsupported types and nodes not belonging to a Graph2D
an illegal argument exception is thrown.
It is also thrown, if the graph does not have a hierarchy manager.
node
- a nodemarkers
- the activity markers to set.activityType
- the activity type to set.taskType
- the task type to set.
IllegalArgumentException
- for unsupported types and nodes not belonging to a Graph2D
or if the graph has no hierarchy manager.setMarkers(y.view.NodeRealizer, MarkerTypeEnum[])
,
setActivityType(y.view.NodeRealizer, ActivityTypeEnum)
,
setTaskType(y.view.NodeRealizer, TaskTypeEnum)
public static NodeRealizer setType(Node node, MarkerTypeEnum[] markers, ChoreographyTypeEnum choreographyType)
Setting the marker(s) may result in a change of the realizer and/or its grouping state. This method supports
nodes with ProxyShapeNodeRealizer
s.
For unsupported types and nodes not belonging to a Graph2D
an illegal argument exception is thrown.
It is also thrown, if the graph does not have a hierarchy manager.
node
- the node whose BPMN type is set.markers
- the choreography markers to set.choreographyType
- the choreography type to set.
IllegalArgumentException
- for unsupported types and nodes not belonging to a Graph2D
or if the graph has no hierarchy manager.setMarkers(y.view.NodeRealizer, MarkerTypeEnum[])
,
setChoreographyType(y.view.NodeRealizer, ChoreographyTypeEnum)
public static EdgeRealizer setType(Edge edge, BpmnTypeEnum type)
edge
- an edgetype
- a BPMN type BpmnTypeEnum
IllegalArgumentException
- for unsupported types and edges not belonging to a Graph2D
public static void collapse(Node node)
node
- a collapsible BPMN nodeexpand(Node)
public static void expand(Node node)
node
- a collapsible BPMN elementcollapse(Node)
public static NodeRealizer createActivity(BpmnTypeEnum activityStatefulType)
activityStatefulType
- a BPMN activity type.
ProxyShapeNodeRealizer
will be
returned.
IllegalArgumentException
- if the activity type is unknown.BpmnTypeEnum.isActivityType(BpmnTypeEnum)
public static NodeRealizer createActivity(ActivityTypeEnum activityType, TaskTypeEnum taskType)
activityType
- the activity type.taskType
- the task type.
ProxyShapeNodeRealizer
will be
returned.public static NodeRealizer createActivity(ActivityTypeEnum activityType, TaskTypeEnum taskType, MarkerTypeEnum marker)
activityType
- the activity type.taskType
- the task type.marker
- the activity marker.
ProxyShapeNodeRealizer
will be
returned.public static NodeRealizer createActivity(ActivityTypeEnum activityType, TaskTypeEnum taskType, MarkerTypeEnum[] markers)
activityType
- the activity type.taskType
- the task type.markers
- the activity markers.
ProxyShapeNodeRealizer
will be
returned.public static NodeRealizer createGateway(BpmnTypeEnum gatewayType)
gatewayType
- a BPMN gateway type
IllegalArgumentException
- if the gateway type is unknownBpmnTypeEnum.getGatewayTypes()
public static NodeRealizer createArtifact(BpmnTypeEnum artifactType)
artifactType
- a BPMN artifact type.
ProxyShapeNodeRealizer
will be
returned.
IllegalArgumentException
- if the artifact type is unknown.BpmnTypeEnum.isArtifactType(BpmnTypeEnum)
public static NodeRealizer createArtifact(BpmnTypeEnum artifactType, DataObjectTypeEnum dataObjectType, MarkerTypeEnum[] markers)
artifactType
- the artifact type.dataObjectType
- the data object type. Ignored if the specified
artifact type is not BpmnTypeEnum.ARTIFACT_TYPE_DATA_OBJECT
.markers
- the artifact markers.
ProxyShapeNodeRealizer
will be
returned.public static NodeRealizer createEvent(BpmnTypeEnum eventType, EventCharEnum eventCharacteristic)
eventType
- a BPMN event typeeventCharacteristic
- a BPMN event characteristic
IllegalArgumentException
- if the given event type/characteristic combination is unknownpublic static NodeRealizer createConversation(ConversationTypeEnum conversationType, boolean isSubConversation)
conversationType
- the conversation type.isSubConversation
- if true
, the node realizer is
marked using MarkerTypeEnum.CLOSED
.
public static NodeRealizer createChoreography(ChoreographyTypeEnum choreographyType, MarkerTypeEnum[] markers)
choreographyType
- the choreography type.markers
- the choreography markers.
public static boolean isTypeDependentLineStrokeEnabled(NodeRealizer realizer)
lineType
or using a stroke that
is determined by the BPMN type of the node.
Note: If the specified realizer is a
proxy realizer
, the
proxy's delegate realizer
is queried!
realizer
- the realizer of a BPMN node.
true
if the stroke depends on the node's BPMN type
and false
otherwise.setTypeDependentLineStrokeEnabled(y.view.NodeRealizer, boolean)
public static void setTypeDependentLineStrokeEnabled(NodeRealizer realizer, boolean enabled)
lineType
or using a stroke that
is determined by the BPMN type of the node.
Note: If the specified realizer is a
proxy realizer
, this property
is set for the
proxy's delegate realizer
only!
realizer
- the realizer of a BPMN node.enabled
- true
if the stroke depends on the node's BPMN
type and false
if the node's lineType
should be
used.isTypeDependentLineStrokeEnabled(y.view.NodeRealizer)
public static TableGroupNodeRealizer createPool(BpmnTypeEnum poolType)
poolType
- the pool type.
public static TaskTypeEnum getTaskType(NodeRealizer nodeRealizer)
Note: If the specified realizer is a
proxy realizer
, the
proxy's delegate realizer
is queried!
public static void setTaskType(NodeRealizer nodeRealizer, TaskTypeEnum taskType)
Note: If the specified realizer is a
proxy realizer
, this property
is set for the
proxy's delegate realizer
only!
public static MarkerTypeEnum[] getMarkers(NodeRealizer nodeRealizer)
Note: If the specified realizer is a
proxy realizer
, the
proxy's delegate realizer
is queried!
public static void setMarkers(NodeRealizer nodeRealizer, MarkerTypeEnum[] markers)
Note: If the specified realizer is a
proxy realizer
, markers
are set for the
proxy's delegate realizer
only!
public static EventCharEnum getEventCharacteristic(NodeRealizer nodeRealizer)
Note: If the specified realizer is a
proxy realizer
, the
proxy's delegate realizer
is queried!
nodeRealizer
- a node realizer
null
BpmnTypeEnum
public static void setEventCharacteristic(NodeRealizer nodeRealizer, EventCharEnum characteristic)
Note: If the specified realizer is a
proxy realizer
, this property
is set for the
proxy's delegate realizer
only!
nodeRealizer
- a node realizercharacteristic
- the BPMN event characteristicBpmnTypeEnum
public static boolean isShadowEnabled(NodeRealizer realizer)
Note: This method requires the specified realizer to be one that has been created by one of the factory methods provided by this class. If this is not the case, its behavior is undefined.
realizer
- a BPMN node realizer created by one of the factory methods of this class.
true
if the given BPMN node realizer paints a shadow; false
otherwise.setShadowEnabled(NodeRealizer, boolean)
public static void setShadowEnabled(NodeRealizer realizer, boolean enabled)
Note: This method requires the specified realizer to be one that has been created by one of the factory methods provided by this class. If this is not the case, its behavior is undefined.
realizer
- a BPMN node realizer created by one of the factory methods of this class.enabled
- if true
the realizer will paint a shadow; if false
the realizer will not
paint a shadow.isShadowEnabled(NodeRealizer)
public static boolean isBpmnNodeRealizer(NodeRealizer nodeRealizer)
nodeRealizer
- the node realizer to check.
true
if the given edge realizer is a BPMN node realizer; false
otherwise.isBpmnEdgeRealizer(EdgeRealizer)
,
createActivity(BpmnTypeEnum)
,
createArtifact(BpmnTypeEnum)
,
createEvent(BpmnTypeEnum, EventCharEnum)
,
createGateway(BpmnTypeEnum)
,
createPool(BpmnTypeEnum)
public static boolean isBpmnEdgeRealizer(EdgeRealizer realizer)
realizer
- the edge realizer to check.
true
if the given edge realizer is a BPMN edge realizer; false
otherwise.isBpmnNodeRealizer(NodeRealizer)
,
createConnection(BpmnTypeEnum)
public static EdgeRealizer createConnection(BpmnTypeEnum connectionType)
connectionType
- a BPMN connection type
IllegalArgumentException
- if the connection type is unknownBpmnTypeEnum.getConnectionTypes()
public static ActivityTypeEnum getActivityType(NodeRealizer nodeRealizer)
Note: If the specified realizer is a
proxy realizer
, the
proxy's delegate realizer
is queried!
public static void setActivityType(NodeRealizer nodeRealizer, ActivityTypeEnum type)
Note: If the specified realizer is a
proxy realizer
, this property
is set for the
proxy's delegate realizer
only!
public static DataObjectTypeEnum getDataObjectType(NodeRealizer nodeRealizer)
Note: If the specified realizer is a
proxy realizer
, the
proxy's delegate realizer
is queried!
public static void setDataObjectType(NodeRealizer nodeRealizer, DataObjectTypeEnum type)
Note: If the specified realizer is a
proxy realizer
, this property
is set for the
proxy's delegate realizer
only!
public static ConversationTypeEnum getConversationType(NodeRealizer nodeRealizer)
Note: If the specified realizer is a
proxy realizer
, the
proxy's delegate realizer
is queried!
public static void setConversationType(NodeRealizer nodeRealizer, ConversationTypeEnum type)
Note: If the specified realizer is a
proxy realizer
, this property
is set for the
proxy's delegate realizer
only!
public static ChoreographyTypeEnum getChoreographyType(NodeRealizer nodeRealizer)
Note: If the specified realizer is a
proxy realizer
, the
proxy's delegate realizer
is queried!
public static void setChoreographyType(NodeRealizer nodeRealizer, ChoreographyTypeEnum type)
Note: If the specified realizer is a
proxy realizer
, this property
is set for the
proxy's delegate realizer
only!
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |