diva.canvas.connector
Class BasicManhattanRouter

java.lang.Object
  extended bydiva.canvas.connector.BasicManhattanRouter
All Implemented Interfaces:
ManhattanRouter, Router

public class BasicManhattanRouter
extends java.lang.Object
implements ManhattanRouter

A basic manhattan router.

Version:
$Id: BasicManhattanRouter.java,v 1.8 2004/04/13 18:44:22 cxh Exp $
Author:
Steve Neuendorffer

Constructor Summary
BasicManhattanRouter()
           
 
Method Summary
 void reroute(Connector c, java.awt.Shape s)
          Reroute the given shape, given that both the head the tail sites moved.
 void rerouteHead(Connector c, java.awt.Shape s)
          Reroute the given Shape, given that the head site moved.
 void rerouteTail(Connector c, java.awt.Shape s)
          Reroute the given Shape, given that the tail site moved.
 java.awt.Shape route(Connector c)
          Route the given connector, returning a Shape.
 Polyline2D routeManhattan(ManhattanConnector c)
          Route the given connector, returning a Polyline2D.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicManhattanRouter

public BasicManhattanRouter()
Method Detail

rerouteHead

public void rerouteHead(Connector c,
                        java.awt.Shape s)
Reroute the given Shape, given that the head site moved.

Specified by:
rerouteHead in interface Router

rerouteTail

public void rerouteTail(Connector c,
                        java.awt.Shape s)
Reroute the given Shape, given that the tail site moved.

Specified by:
rerouteTail in interface Router

reroute

public void reroute(Connector c,
                    java.awt.Shape s)
Reroute the given shape, given that both the head the tail sites moved. The shape is modified by the router.

Specified by:
reroute in interface Router

route

public java.awt.Shape route(Connector c)
Route the given connector, returning a Shape.

Specified by:
route in interface Router

routeManhattan

public Polyline2D routeManhattan(ManhattanConnector c)
Route the given connector, returning a Polyline2D. This method is the same as route(), except that the return type is tighter.

Specified by:
routeManhattan in interface ManhattanRouter