Search this API

y.layout
Class PortConstraintConfigurator

java.lang.Object
  extended by y.layout.PortConstraintConfigurator

public class PortConstraintConfigurator
extends java.lang.Object

The PortConstraintConfigurator provides the possibility to create PortConstraints according to the initial connecting side of an edge.

 

Constructor Summary
PortConstraintConfigurator()
          Creates a new PortConstraintConfigurator instance.
 
Method Summary
 PortConstraint createPortConstraintFromSketch(LayoutGraph graph, Edge edge, boolean source, boolean strong)
          Creates a PortConstraint for the given edge.
 void createPortConstraintsFromSketch(LayoutGraph graph, EdgeCursor ec, EdgeMap spcMap, boolean strongSP, EdgeMap tpcMap, boolean strongTP)
          Creates PortConstraints for some edges of the given graph.
 void createPortConstraintsFromSketch(LayoutGraph graph, EdgeMap spcMap, EdgeMap tpcMap)
          Creates weak PortConstraints for all edges of the given graph.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PortConstraintConfigurator

public PortConstraintConfigurator()
Creates a new PortConstraintConfigurator instance.

Method Detail

createPortConstraintFromSketch

public PortConstraint createPortConstraintFromSketch(LayoutGraph graph,
                                                     Edge edge,
                                                     boolean source,
                                                     boolean strong)
Creates a 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.

Parameters:
graph - the input graph
edge - the edge
source - 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
Returns:
the PortConstraint for the given edge whose side is retrieved from the initial drawing

createPortConstraintsFromSketch

public void createPortConstraintsFromSketch(LayoutGraph graph,
                                            EdgeMap spcMap,
                                            EdgeMap tpcMap)
Creates weak PortConstraints for all edges of the given graph.

Parameters:
graph - the input graph
spcMap - the EdgeMap that will be used for storing the source PortConstraints of the edges
tpcMap - the EdgeMap that will be used for storing the target PortConstraints of the edges

createPortConstraintsFromSketch

public void createPortConstraintsFromSketch(LayoutGraph graph,
                                            EdgeCursor ec,
                                            EdgeMap spcMap,
                                            boolean strongSP,
                                            EdgeMap tpcMap,
                                            boolean strongTP)
Creates PortConstraints for some edges of the given graph.

Parameters:
graph - the input graph
ec - the EdgeCursor that provides access to the edges for which to create PortConstraints
spcMap - the EdgeMap that will be used for storing the source PortConstraints of the edges
strongSP - true if strong source PortConstraints should be assigned, false otherwise
tpcMap - the EdgeMap that will be used for storing the target PortConstraints of the edges
strongTP - true if strong target PortConstraints should be assigned, false otherwise

© Copyright 2000-2021,
yWorks GmbH.
All rights reserved.