Package org.eclipse.draw2d
Class ManhattanConnectionRouter
java.lang.Object
org.eclipse.draw2d.AbstractRouter
org.eclipse.draw2d.ManhattanConnectionRouter
- All Implemented Interfaces:
- ConnectionRouter
Provides a 
Connection with an orthogonal route between the
 Connection's source and target anchors.- 
Nested Class SummaryNested classes/interfaces inherited from interface org.eclipse.draw2d.ConnectionRouterConnectionRouter.NullConnectionRouter
- 
Field SummaryFields inherited from interface org.eclipse.draw2d.ConnectionRouterNULL
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected VectorgetDirection(Rectangle r, Point p) Returns the direction the point p is in relation to the given rectangle.protected VectorgetEndDirection(Connection conn) protected intgetRowNear(Connection connection, int r, int n, int x) protected VectorgetStartDirection(Connection conn) voidinvalidate(Connection connection) Causes the router to discard any cached information about the given Connection.protected voidprocessPositions(Vector start, Vector end, List<Double> positions, boolean horizontal, Connection conn) voidremove(Connection connection) Removes the given Connection from this routers list of Connections it is responsible for.protected voidremoveReservedLines(Connection connection) protected voidreserveColumn(Connection connection, Integer column) protected voidreserveRow(Connection connection, Integer row) voidroute(Connection conn) Routes the Connection.Methods inherited from class org.eclipse.draw2d.AbstractRoutergetConstraint, getEndPoint, getStartPoint, setConstraint
- 
Constructor Details- 
ManhattanConnectionRouterpublic ManhattanConnectionRouter()
 
- 
- 
Method Details- 
invalidateDescription copied from class:AbstractRouterCauses the router to discard any cached information about the given Connection.- Specified by:
- invalidatein interface- ConnectionRouter
- Overrides:
- invalidatein class- AbstractRouter
- Parameters:
- connection- The connection to invalidate
- See Also:
 
- 
getDirectionReturns the direction the point p is in relation to the given rectangle. Possible values are LEFT (-1,0), RIGHT (1,0), UP (0,-1) and DOWN (0,1).- Parameters:
- r- the rectangle
- p- the point
- Returns:
- the direction from r to p
 
- 
getEndDirection
- 
getRowNear
- 
getStartDirection
- 
processPositionsprotected void processPositions(Vector start, Vector end, List<Double> positions, boolean horizontal, Connection conn) 
- 
removeDescription copied from class:AbstractRouterRemoves the given Connection from this routers list of Connections it is responsible for.- Specified by:
- removein interface- ConnectionRouter
- Overrides:
- removein class- AbstractRouter
- Parameters:
- connection- The connection to remove
- See Also:
 
- 
removeReservedLines
- 
reserveColumn
- 
reserveRow
- 
routeDescription copied from interface:ConnectionRouterRoutes the Connection.- Parameters:
- conn- The Connection to route
- See Also:
 
 
-