public class StraightRouter extends AbstractRouter
StraightRouter is an IConnectionRouter that leaves the
Connection's control points untouched and only provides reference
points for the Connection's anchors.| Constructor and Description |
|---|
StraightRouter() |
| Modifier and Type | Method and Description |
|---|---|
protected Point |
getAnchoredReferencePoint(Connection connection,
int index)
Returns the reference point for the anchor at the given index.
|
void |
route(Connection connection)
Adjusts the
connection's anchors (if necessary) to
satisfy certain routing constraints. |
boolean |
wasInserted(IAnchor anchor)
Returns
true if the given IAnchor was added by this
IConnectionRouter during IConnectionRouter.route(Connection). |
getComputationParameter, updateComputationParametersprotected Point getAnchoredReferencePoint(Connection connection, int index)
getAnchoredReferencePoint in class AbstractRouterconnection - The Connection that is currently routed.index - The index specifying the anchor for which to provide a
reference point.public void route(Connection connection)
IConnectionRouterconnection's anchors (if necessary) to
satisfy certain routing constraints. This includes insertion of
'implicit' anchors, as well as updating the positions of existing anchors
(which includes manipulating the
computation parameters of dynamic anchors.connection - The Connection to route.public boolean wasInserted(IAnchor anchor)
IConnectionRoutertrue if the given IAnchor was added by this
IConnectionRouter during IConnectionRouter.route(Connection). Otherwise
returns false.Copyright (c) 2014 itemis AG and others. All rights reserved.