public class PortConstraintConfigurator extends Object
PortConstraintConfigurator
provides the possibility to create
PortConstraint
s 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
PortConstraint s for some edges of the given graph. |
void |
createPortConstraintsFromSketch(LayoutGraph graph,
IEdgeMap spcMap,
IEdgeMap tpcMap)
Creates weak
PortConstraint s 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
PortConstraint
strong
- true
if a strong PortConstraint
is created, false
for a weak PortConstraint
PortConstraint
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)
PortConstraint
s for some edges of the given graph.graph
- the input graphec
- the IEdgeCursor
that provides access to the edges for which to create PortConstraint
sspcMap
- the IEdgeMap
that will be used for storing the source PortConstraint
s of the edgesstrongSP
- true
if strong source PortConstraint
s should be assigned, false
otherwisetpcMap
- the IEdgeMap
that will be used for storing the target PortConstraint
s of the edgesstrongTP
- true
if strong target PortConstraint
s should be assigned, false
otherwisepublic void createPortConstraintsFromSketch(LayoutGraph graph, IEdgeMap spcMap, IEdgeMap tpcMap)
PortConstraint
s for all edges of the given graph.graph
- the input graphspcMap
- the IEdgeMap
that will be used for storing the source PortConstraint
s of the edgestpcMap
- the IEdgeMap
that will be used for storing the target PortConstraint
s of the edges