|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdiva.canvas.connector.BasicManhattanRouter
public class BasicManhattanRouter
A basic manhattan router.
Field Summary | |
---|---|
private double |
MINDIST
|
private double |
TOL
|
Constructor Summary | |
---|---|
BasicManhattanRouter()
|
Method Summary | |
---|---|
private Polyline2D |
_route(java.awt.geom.Point2D head,
int headDir,
java.awt.geom.Point2D tail,
int tailDir)
|
private int |
getManhattanDirection(double xDiff,
double yDiff)
Return the direction between two points who differ by the given amounts. |
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 |
Field Detail |
---|
private double TOL
private double MINDIST
Constructor Detail |
---|
public BasicManhattanRouter()
Method Detail |
---|
public void rerouteHead(Connector c, java.awt.Shape s)
rerouteHead
in interface Router
public void rerouteTail(Connector c, java.awt.Shape s)
rerouteTail
in interface Router
public void reroute(Connector c, java.awt.Shape s)
reroute
in interface Router
public java.awt.Shape route(Connector c)
route
in interface Router
public Polyline2D routeManhattan(ManhattanConnector c)
routeManhattan
in interface ManhattanRouter
private Polyline2D _route(java.awt.geom.Point2D head, int headDir, java.awt.geom.Point2D tail, int tailDir)
private int getManhattanDirection(double xDiff, double yDiff)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |