diva.canvas.connector
Interface Router

All Known Subinterfaces:
ManhattanRouter
All Known Implementing Classes:
BasicManhattanRouter, IncrManhattanRouter

public interface Router

A Router is an object that can be used to help a connector route itself. Specific implementations of Router are used by connectors according to the Shape that they use to draw themselves.

Version:
$Id: Router.java 38798 2005-07-08 20:00:01Z cxh $
Author:
Michael Shilman, John Reekie

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 of the appropriate type that it can used to draw itself with.
 

Method Detail

rerouteHead

void rerouteHead(Connector c,
                 java.awt.Shape s)
Reroute the given Shape, given that the head site moved. The router can assume that the tail site has not moved. The shape is modified by the router.


rerouteTail

void rerouteTail(Connector c,
                 java.awt.Shape s)
Reroute the given Shape, given that the tail site moved. The router can assume that the head site has not moved. The shape is modified by the router.


reroute

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.


route

java.awt.Shape route(Connector c)
Route the given connector, returning a shape of the appropriate type that it can used to draw itself with.