Package diva.canvas.connector
Class BasicManhattanRouter
- java.lang.Object
-
- diva.canvas.connector.BasicManhattanRouter
-
- All Implemented Interfaces:
ManhattanRouter
,Router
public class BasicManhattanRouter extends java.lang.Object implements ManhattanRouter
A basic manhattan router.- Version:
- $Id$
- Author:
- Steve Neuendorffer, Contributor: Christoph Daniel Schulze
-
-
Constructor Summary
Constructors Constructor Description BasicManhattanRouter()
-
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)
Route the given connector, returning a Shape.Polyline2D
routeManhattan(ManhattanConnector c)
Route the given connector, returning a Polyline2D.
-
-
-
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)
Route the given connector, returning a Shape.
-
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 interfaceManhattanRouter
-
-