org.eclipse.gmt.umlx.editor.draw2dfixes
Class ShortestPathConnectionRouter
java.lang.Object
org.eclipse.draw2d.AbstractRouter
org.eclipse.gmt.umlx.editor.draw2dfixes.ShortestPathConnectionRouter
- All Implemented Interfaces:
- org.eclipse.draw2d.ConnectionRouter
public final class ShortestPathConnectionRouter
- extends org.eclipse.draw2d.AbstractRouter
Routes multiple connections around the children of a given container figure.
- Since:
- 3.1
Nested classes/interfaces inherited from interface org.eclipse.draw2d.ConnectionRouter |
org.eclipse.draw2d.ConnectionRouter.NullConnectionRouter |
Fields inherited from interface org.eclipse.draw2d.ConnectionRouter |
NULL |
Constructor Summary |
ShortestPathConnectionRouter(org.eclipse.draw2d.IFigure container)
Creates a new shortest path router with the given container. |
Method Summary |
java.lang.Object |
getConstraint(org.eclipse.draw2d.Connection connection)
Gets the constraint for the given Connection . |
void |
invalidate(org.eclipse.draw2d.Connection connection)
|
void |
remove(org.eclipse.draw2d.Connection connection)
|
void |
route(org.eclipse.draw2d.Connection conn)
|
void |
setConstraint(org.eclipse.draw2d.Connection connection,
java.lang.Object constraint)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ShortestPathConnectionRouter
public ShortestPathConnectionRouter(org.eclipse.draw2d.IFigure container)
- Creates a new shortest path router with the given container. The container
contains all the figure's which will be treated as obstacles for the connections to
avoid. Any time a child of the container moves, one or more connections will be
revalidated to process the new obstacle locations. The connections being routed must
not be contained within the container.
- Parameters:
container
- the container
getConstraint
public java.lang.Object getConstraint(org.eclipse.draw2d.Connection connection)
- Gets the constraint for the given
Connection
. The constraint is the paths
list of bend points for this connection.
- Specified by:
getConstraint
in interface org.eclipse.draw2d.ConnectionRouter
- Overrides:
getConstraint
in class org.eclipse.draw2d.AbstractRouter
- Parameters:
connection
- The connection whose constraint we are retrieving
- Returns:
- The constraint
invalidate
public void invalidate(org.eclipse.draw2d.Connection connection)
- Specified by:
invalidate
in interface org.eclipse.draw2d.ConnectionRouter
- Overrides:
invalidate
in class org.eclipse.draw2d.AbstractRouter
- See Also:
ConnectionRouter.invalidate(org.eclipse.draw2d.Connection)
remove
public void remove(org.eclipse.draw2d.Connection connection)
- Specified by:
remove
in interface org.eclipse.draw2d.ConnectionRouter
- Overrides:
remove
in class org.eclipse.draw2d.AbstractRouter
- See Also:
ConnectionRouter.remove(org.eclipse.draw2d.Connection)
route
public void route(org.eclipse.draw2d.Connection conn)
setConstraint
public void setConstraint(org.eclipse.draw2d.Connection connection,
java.lang.Object constraint)
- Specified by:
setConstraint
in interface org.eclipse.draw2d.ConnectionRouter
- Overrides:
setConstraint
in class org.eclipse.draw2d.AbstractRouter
- See Also:
ConnectionRouter.setConstraint(org.eclipse.draw2d.Connection, java.lang.Object)