y.layout
Class PortConstraintConfigurator

java.lang.Object
  |
  +--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 weak portcontraint for the given edge.
 void createPortConstraintsFromSketch(LayoutGraph graph, EdgeCursor ec, EdgeMap spcMap, boolean strongSP, EdgeMap tpcMap, boolean strongTP)
          Creates weak portcontraints for some edges of the given graph.
 void createPortConstraintsFromSketch(LayoutGraph graph, EdgeMap spcMap, EdgeMap tpcMap)
          Creates weak portcontraints 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 weak portcontraint 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.

createPortConstraintsFromSketch

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

Parameters:
spcMap - an edgemap that will be used to store the source port constraints of the edges.
tpcMap - an edgemap 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 weak portcontraints for some edges of the given graph.

Parameters:
ec - EdgeCursor that provides access to the edges for which to set portconstraints.
spcMap - an edgemap 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 edgemap 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-2003,
yWorks GmbH.
All rights reserved.

2003