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 voidreroute(Connector c, java.awt.Shape s)Reroute the given shape, given that both the head the tail sites moved.voidrerouteHead(Connector c, java.awt.Shape s)Reroute the given Shape, given that the head site moved.voidrerouteTail(Connector c, java.awt.Shape s)Reroute the given Shape, given that the tail site moved.java.awt.Shaperoute(Connector c)Route the given connector, returning a Shape.Polyline2DrouteManhattan(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:
rerouteHeadin interfaceRouter
-
rerouteTail
public void rerouteTail(Connector c, java.awt.Shape s)
Reroute the given Shape, given that the tail site moved.- Specified by:
rerouteTailin 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:
routeManhattanin interfaceManhattanRouter
-
-