JGraphLayout
v1.4.0.2


com.jgraph.layout.routing
Class JGraphParallelRouter

java.lang.Object
  extended byorg.jgraph.graph.DefaultEdge.LoopRouting
      extended bycom.jgraph.layout.routing.JGraphParallelRouter
All Implemented Interfaces:
org.jgraph.graph.Edge.Routing, Serializable

public class JGraphParallelRouter
extends org.jgraph.graph.DefaultEdge.LoopRouting

Algorithm which create intermediates points for parallel edges. Note that if you require promotes edge (edges assigned to parents when the connected child cells are invisible) to be shown as parallel on the parents, you must set the graph on this router correct so that it was the view information.

See Also:
Serialized Form

Field Summary
protected static org.jgraph.JGraph graph
          The current graph.
 
Fields inherited from interface org.jgraph.graph.Edge.Routing
NO_PREFERENCE
 
Constructor Summary
JGraphParallelRouter()
           
 
Method Summary
static double getEdgeDeparture()
          Getter to obtain the distance between intermediate and source/target points
static double getEdgeSeparation()
          Getter to obtain the distance between each parallel edge
static JGraphParallelRouter getSharedInstance()
          Getter for singleton managing parallel edges
 List routeEdge(org.jgraph.graph.EdgeView edge)
          Calc of intermediates points
static void setEdgeDeparture(double edgeDeparture)
          Setter to define distance between intermediate and source/target points
static void setEdgeSeparation(double edgeSeparation)
          Setter to define distance between each parallel edge
static void setGraph(org.jgraph.JGraph graph)
           
 
Methods inherited from class org.jgraph.graph.DefaultEdge.LoopRouting
getEdgeStyle, getLoopStyle, getPreferredLineStyle, route, routeLoop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

graph

protected static org.jgraph.JGraph graph
The current graph. The value must be set for global information (like visible state and promoted edge) to be taken into account

Constructor Detail

JGraphParallelRouter

public JGraphParallelRouter()
Method Detail

getSharedInstance

public static JGraphParallelRouter getSharedInstance()
Getter for singleton managing parallel edges

Returns:
JGraphParallelRouter for parallel edges

routeEdge

public List routeEdge(org.jgraph.graph.EdgeView edge)
Calc of intermediates points

Parameters:
edge - Edge for which routing is demanding

getEdgeSeparation

public static double getEdgeSeparation()
Getter to obtain the distance between each parallel edge

Returns:
Distance

setEdgeSeparation

public static void setEdgeSeparation(double edgeSeparation)
Setter to define distance between each parallel edge

Parameters:
edgeSeparation - New distance

getEdgeDeparture

public static double getEdgeDeparture()
Getter to obtain the distance between intermediate and source/target points

Returns:
Distance

setEdgeDeparture

public static void setEdgeDeparture(double edgeDeparture)
Setter to define distance between intermediate and source/target points

Parameters:
edgeDeparture - New distance

setGraph

public static void setGraph(org.jgraph.JGraph graph)
Parameters:
graph - The graph to set.

JGraphLayout
v1.4.0.2


Copyright (C) 2005 JGraph.com. All rights reserved.