Package org.eclipse.draw2d
Class AbstractRouter
java.lang.Object
org.eclipse.draw2d.AbstractRouter
- All Implemented Interfaces:
- ConnectionRouter
- Direct Known Subclasses:
- AutomaticRouter,- BendpointConnectionRouter,- ConnectionRouter.NullConnectionRouter,- ManhattanConnectionRouter,- ShortestPathConnectionRouter
Base class for implementing a connection router. This class provides stubs
 for constraint usage, and some utility methods.
- 
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 TypeMethodDescriptiongetConstraint(Connection connection) Returns the constraint for the given Connection.protected PointgetEndPoint(Connection connection) A convenience method for obtaining a connection's endpoint.protected PointgetStartPoint(Connection conn) A convenience method for obtaining a connection's start point.voidinvalidate(Connection connection) Causes the router to discard any cached information about the given Connection.voidremove(Connection connection) Removes the given Connection from this routers list of Connections it is responsible for.voidsetConstraint(Connection connection, Object constraint) Sets the constraint for the given Connection.Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.eclipse.draw2d.ConnectionRouterroute
- 
Constructor Details- 
AbstractRouterpublic AbstractRouter()
 
- 
- 
Method Details- 
getConstraintReturns the constraint for the given Connection.- Specified by:
- getConstraintin interface- ConnectionRouter
- Parameters:
- connection- The connection
- Returns:
- The constraint
- Since:
- 2.0
 
- 
getEndPointA convenience method for obtaining a connection's endpoint. The connection's endpoint is a point in absolute coordinates obtained by using its source and targetConnectionAnchor. The returned Point is a static singleton that is reused to reduce garbage collection. The caller may modify this point in any way. However, the point will be reused and its values overwritten during the next call to this method.- Parameters:
- connection- The connection
- Returns:
- The endpoint
- Since:
- 2.0
 
- 
getStartPointA convenience method for obtaining a connection's start point. The connection's startpoint is a point in absolute coordinates obtained by using its source and targetConnectionAnchor. The returned Point is a static singleton that is reused to reduce garbage collection. The caller may modify this point in any way. However, the point will be reused and its values overwritten during the next call to this method.- Parameters:
- conn- The connection
- Returns:
- The start point
- Since:
- 2.0
 
- 
invalidateCauses the router to discard any cached information about the given Connection.- Specified by:
- invalidatein interface- ConnectionRouter
- Parameters:
- connection- The connection to invalidate
- Since:
- 2.0
 
- 
removeRemoves the given Connection from this routers list of Connections it is responsible for.- Specified by:
- removein interface- ConnectionRouter
- Parameters:
- connection- The connection to remove
- Since:
- 2.0
 
- 
setConstraintSets the constraint for the given Connection.- Specified by:
- setConstraintin interface- ConnectionRouter
- Parameters:
- connection- The connection
- constraint- The constraint
- Since:
- 2.0
 
 
-