com.yworks.yfiles.bpmn.view
Class EventPortSupport

java.lang.Object
  extended bycom.yworks.yfiles.bpmn.view.EventPortSupport

public class EventPortSupport
extends Object

Helper class for event port creation.

 

Constructor Summary
EventPortSupport()
          Initializes a new EventPortSupport instance.
 
Method Summary
 List convertToPort(Graph2D graph, Node event, Node activity)
          Converts the given event node to node ports of the given activity node.
 List convertToPort(NodeRealizer event, NodeRealizer activity, YPoint location)
          Converts the given event realizer to node ports of the given activity realizer.
static NodePort createEventPort(NodeRealizer event)
          Creates a free node port instance that is visualized using the specified node realizer.
 Node getActivityAt(Graph2DView view, double x, double y)
          Retrieves an activity node at the given location in the specified view.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EventPortSupport

public EventPortSupport()
Initializes a new EventPortSupport instance.

Method Detail

getActivityAt

public Node getActivityAt(Graph2DView view,
                          double x,
                          double y)
Retrieves an activity node at the given location in the specified view.

Parameters:
view - the view whose graph is searched for activity nodes.
x - the x-coordinate in the view's world coordinates system.
y - the y-coordinate in the view's world coordinates system.
Returns:
an activity node at the given location in the specified view or null if there is no activity node at the given location.

convertToPort

public List convertToPort(Graph2D graph,
                          Node event,
                          Node activity)
Converts the given event node to node ports of the given activity node. All edges of the event will be attached to the new node ports. The given event node will be removed from the graph.

Parameters:
graph - the graph containing the specified nodes.
event - the node to be converted into node ports.
activity - the node to which the new ports are added.
Returns:
a list of all newly created node ports.
See Also:
convertToPort(y.view.NodeRealizer, y.view.NodeRealizer, y.geom.YPoint)

convertToPort

public List convertToPort(NodeRealizer event,
                          NodeRealizer activity,
                          YPoint location)
Converts the given event realizer to node ports of the given activity realizer. The new node ports will be close to the given coordinates. If the specified activity realizer is a proxy realizer, new node ports will be created recursively for each inner realizer of the proxy

Parameters:
event - the node realizer to be converted into node ports.
activity - the node realizer to which the new ports are added.
location - the location in the world coordinate system that should be matched as best as possible.
Returns:
a list of all newly created node ports.

createEventPort

public static NodePort createEventPort(NodeRealizer event)
Creates a free node port instance that is visualized using the specified node realizer.

Parameters:
event - the visual representation of the new node port.
Returns:
a free node port instance that is visualized using the specified node realizer.


© Copyright 2010-2014,
yWorks GmbH.
All rights reserved.