Search this API

y.layout
Class PortConstraintConfigurator

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

public class PortConstraintConfigurator
extends Object

Provides configuration services for the port constraints of a graph.


Constructor Summary
PortConstraintConfigurator()
          Creates a new instance of PortConstraintConfigurator
 
Method Summary
 PortConstraint createPortConstraintFromSketch(LayoutGraph graph, Edge e, boolean source, boolean strong)
          Creates and returns a port constraint for the given edge.
 void createPortConstraintsFromSketch(LayoutGraph graph, EdgeCursor ec, EdgeMap spcMap, boolean strongSP, EdgeMap tpcMap, boolean strongTP)
          Creates port constraints for some edges of the given graph.
 void createPortConstraintsFromSketch(LayoutGraph graph, EdgeMap spcMap, EdgeMap tpcMap)
          Creates weak port constraints 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 instance of PortConstraintConfigurator

Method Detail

createPortConstraintFromSketch

public PortConstraint createPortConstraintFromSketch(LayoutGraph graph,
                                                     Edge e,
                                                     boolean source,
                                                     boolean strong)
Creates and returns a port constraint for the given edge. The side constraint is setup according to the current drawing of the edge.

Parameters:
source - if true a source port constraint for the given edge will be created, otherwise a target port constraint.
strong - if true a strong port constraint is created, otherwise a weak port constraint is created.

createPortConstraintsFromSketch

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

Parameters:
spcMap - an edge map that will be used to store the source port constraints of the edges.
tpcMap - an edge map that will be used to store the target port constraints of the edges.

createPortConstraintsFromSketch

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

Parameters:
ec - EdgeCursor that provides access to the edges for which to set port constraints.
spcMap - an edge map that will be used to store the source port constraints of the edges.
strongSP - whether or not to assign strong source port constraints
tpcMap - an edge map that will be used to store the target port constraints of the edges.
strongTP - whether or not to assign strong target port constraints

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