org.eclipse.draw2d
Class ManhattanConnectionRouter
java.lang.Object
|
+--org.eclipse.draw2d.AbstractRouter
|
+--org.eclipse.draw2d.ManhattanConnectionRouter
- All Implemented Interfaces:
- ConnectionRouter
- public final class ManhattanConnectionRouter
- extends AbstractRouter
Provides a Connection
with an orthogonal route
between the Connection's source and target anchors.
Method Summary |
protected Ray |
getDirection(Rectangle r,
Point p)
|
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,
List positions,
boolean horizontal,
Connection conn)
|
void |
remove(Connection connection)
Removes the given connection from the map of constraints. |
protected void |
removeReservedLines(Connection connection)
|
protected void |
reserveColumn(Connection connection,
Integer column)
|
protected void |
reserveRow(Connection connection,
Integer row)
|
void |
route(Connection conn)
Routes the Connection . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ManhattanConnectionRouter
public ManhattanConnectionRouter()
invalidate
public void invalidate(Connection connection)
- Description copied from class:
AbstractRouter
- Causes the router to discard any cached information about the given Connection.
- Specified by:
invalidate
in interface ConnectionRouter
- Overrides:
invalidate
in class AbstractRouter
- Parameters:
connection
- The connection to invalidate
getDirection
protected Ray getDirection(Rectangle r,
Point p)
getEndDirection
protected Ray getEndDirection(Connection conn)
getRowNear
protected int getRowNear(Connection connection,
int r,
int n,
int x)
getStartDirection
protected Ray getStartDirection(Connection conn)
processPositions
protected void processPositions(Ray start,
Ray end,
List positions,
boolean horizontal,
Connection conn)
remove
public void remove(Connection connection)
- Removes the given connection from the map of constraints.
- Specified by:
remove
in interface ConnectionRouter
- Overrides:
remove
in class AbstractRouter
- Parameters:
connection
- The connection to remove.
removeReservedLines
protected void removeReservedLines(Connection connection)
reserveColumn
protected void reserveColumn(Connection connection,
Integer column)
reserveRow
protected void reserveRow(Connection connection,
Integer row)
route
public void route(Connection conn)
- Routes the
Connection
.
- Parameters:
conn
- The Connection
to route.
Copyright (c) IBM Corp. and others 2000, 2003. All Rights Reserved.