public final class ManhattanConnectionRouter extends AbstractRouter
Connection with an orthogonal route between the
Connection's source and target anchors.ConnectionRouter.NullConnectionRouterNULL| Constructor and Description |
|---|
ManhattanConnectionRouter() |
| Modifier and Type | Method and Description |
|---|---|
protected Ray |
getDirection(Rectangle r,
Point p)
Returns the direction the point p is in relation to the given
rectangle.
|
protected Ray |
getEndDirection(Connection conn) |
protected int |
getRowNear(Connection connection,
int r,
int n,
int x) |
protected Ray |
getStartDirection(Connection conn) |
void |
invalidate(Connection connection)
Causes the router to discard any cached information about the given
Connection.
|
protected void |
processPositions(Ray start,
Ray end,
java.util.List positions,
boolean horizontal,
Connection conn) |
void |
remove(Connection connection)
Removes the given Connection from this routers list of Connections it is
responsible for.
|
protected void |
removeReservedLines(Connection connection) |
protected void |
reserveColumn(Connection connection,
java.lang.Integer column) |
protected void |
reserveRow(Connection connection,
java.lang.Integer row) |
void |
route(Connection conn)
Routes the Connection.
|
getConstraint, getEndPoint, getStartPoint, setConstraintpublic void invalidate(Connection connection)
AbstractRouterinvalidate in interface ConnectionRouterinvalidate in class AbstractRouterconnection - The connection to invalidateConnectionRouter.invalidate(Connection)protected Ray getDirection(Rectangle r, Point p)
r - the rectanglep - the pointprotected Ray getEndDirection(Connection conn)
protected int getRowNear(Connection connection, int r, int n, int x)
protected Ray getStartDirection(Connection conn)
protected void processPositions(Ray start, Ray end, java.util.List positions, boolean horizontal, Connection conn)
public void remove(Connection connection)
AbstractRouterremove in interface ConnectionRouterremove in class AbstractRouterconnection - The connection to removeConnectionRouter.remove(Connection)protected void removeReservedLines(Connection connection)
protected void reserveColumn(Connection connection, java.lang.Integer column)
protected void reserveRow(Connection connection, java.lang.Integer row)
public void route(Connection conn)
ConnectionRouterconn - The Connection to routeConnectionRouter.route(Connection)Copyright (c) IBM Corp. and others 2000, 2011. All Rights Reserved.