org.eclipse.draw2d
Class AutomaticRouter
java.lang.Object
|
+--org.eclipse.draw2d.AbstractRouter
|
+--org.eclipse.draw2d.AutomaticRouter
- All Implemented Interfaces:
- ConnectionRouter
- Direct Known Subclasses:
- FanRouter
- public abstract class AutomaticRouter
- extends AbstractRouter
The AutomaticRouter provides the facility to prevent
Connections from overlapping. Subclasses
implement the abstract method handleCollision(PointList list, int index)
to determine how to handle Connection collisions.
Also provides access to its 'next' router so that manual routing in
subclasses is possible.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AutomaticRouter
public AutomaticRouter()
getConstraint
public Object getConstraint(Connection connection)
- Description copied from class:
AbstractRouter
- Returns the constraint for the given Connection.
- Overrides:
getConstraint in class AbstractRouter
handleCollision
protected abstract void handleCollision(PointList list,
int index)
invalidate
public void invalidate(Connection conn)
- Description copied from class:
AbstractRouter
- Causes the router to discard any cached information
about the given Connection.
- Overrides:
invalidate in class AbstractRouter
next
protected ConnectionRouter next()
- Returns the next router.
- Since:
- 2.0
remove
public void remove(Connection conn)
- Description copied from class:
AbstractRouter
- Removes the given Connection from this routers list
of Connections it is responsible for.
- Overrides:
remove in class AbstractRouter
route
public void route(Connection conn)
- Description copied from interface:
ConnectionRouter
- Routes the Connection.
setConstraint
public void setConstraint(Connection connection,
Object constraint)
- Description copied from class:
AbstractRouter
- Sets the constraint for the given Connection.
- Overrides:
setConstraint in class AbstractRouter
setEndPoints
protected void setEndPoints(Connection conn)
setNextRouter
public void setNextRouter(ConnectionRouter router)
- Sets the next router to the passed value.
- Since:
- 2.0