Package diva.canvas.connector
Class IncrManhattanRouter
- java.lang.Object
-
- diva.canvas.connector.IncrManhattanRouter
-
- All Implemented Interfaces:
ManhattanRouter
,Router
public class IncrManhattanRouter extends java.lang.Object implements ManhattanRouter
A manhattan router which does only incremental routing and delegates static routing to another manhattan router implementation.- Version:
- $Id$
- Author:
- Michael Shilman, John Reekie
- Pt.AcceptedRating:
- Red
-
-
Constructor Summary
Constructors Constructor Description IncrManhattanRouter(ManhattanRouter staticRouter)
Construct a new incremental router which delegates static routing to the given manhattan router, but does incremental routing (the reroute*() methods) on its own.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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)
Delegate the static routing to the static router.Polyline2D
routeManhattan(ManhattanConnector c)
Delegate the static routing to the static router.
-
-
-
Constructor Detail
-
IncrManhattanRouter
public IncrManhattanRouter(ManhattanRouter staticRouter)
Construct a new incremental router which delegates static routing to the given manhattan router, but does incremental routing (the reroute*() methods) on its own.
-
-
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 interfaceRouter
-
rerouteTail
public void rerouteTail(Connector c, java.awt.Shape s)
Reroute the given Shape, given that the tail site moved.- Specified by:
rerouteTail
in interfaceRouter
-
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.
-
route
public java.awt.Shape route(Connector c)
Delegate the static routing to the static router.
-
routeManhattan
public Polyline2D routeManhattan(ManhattanConnector c)
Delegate the static routing to the static router.- Specified by:
routeManhattan
in interfaceManhattanRouter
-
-