public class PortConstraintConfigurator extends Object
PortConstraintConfigurator provides the possibility to create
PortConstraints according to the initial connecting side of an edge.| Constructor and Description |
|---|
PortConstraintConfigurator()
Creates a new
PortConstraintConfigurator instance. |
| Modifier and Type | Method and Description |
|---|---|
PortConstraint |
createPortConstraintFromSketch(LayoutGraph graph,
Edge edge,
boolean source,
boolean strong)
Creates a
PortConstraint for the given edge. |
void |
createPortConstraintsFromSketch(LayoutGraph graph,
IEdgeCursor ec,
IEdgeMap spcMap,
boolean strongSP,
IEdgeMap tpcMap,
boolean strongTP)
Creates
PortConstraints for some edges of the given graph. |
void |
createPortConstraintsFromSketch(LayoutGraph graph,
IEdgeMap spcMap,
IEdgeMap tpcMap)
Creates weak
PortConstraints for all edges of the given graph. |
public PortConstraintConfigurator()
PortConstraintConfigurator instance.public PortConstraint createPortConstraintFromSketch(LayoutGraph graph, Edge edge, boolean source, boolean strong)
PortConstraint for the given edge.
The side of the constraint is set up according to the current drawing of the edge within the given graph.
graph - the input graphedge - the edgesource - true if a source PortConstraint for the given edge will be created, false for a target
PortConstraintstrong - true if a strong PortConstraint is created, false for a weak PortConstraintPortConstraint for the given edge whose side is retrieved from the initial drawingpublic void createPortConstraintsFromSketch(LayoutGraph graph, IEdgeCursor ec, IEdgeMap spcMap, boolean strongSP, IEdgeMap tpcMap, boolean strongTP)
PortConstraints for some edges of the given graph.graph - the input graphec - the IEdgeCursor that provides access to the edges for which to create PortConstraintsspcMap - the IEdgeMap that will be used for storing the source PortConstraints of the edgesstrongSP - true if strong source PortConstraints should be assigned, false otherwisetpcMap - the IEdgeMap that will be used for storing the target PortConstraints of the edgesstrongTP - true if strong target PortConstraints should be assigned, false otherwisepublic void createPortConstraintsFromSketch(LayoutGraph graph, IEdgeMap spcMap, IEdgeMap tpcMap)
PortConstraints for all edges of the given graph.graph - the input graphspcMap - the IEdgeMap that will be used for storing the source PortConstraints of the edgestpcMap - the IEdgeMap that will be used for storing the target PortConstraints of the edges