Eclipse Draw2d
2.1

org.eclipse.draw2d
Class AbstractRouter

java.lang.Object
  |
  +--org.eclipse.draw2d.AbstractRouter
All Implemented Interfaces:
ConnectionRouter
Direct Known Subclasses:
AutomaticRouter, BendpointConnectionRouter, ConnectionRouter.NullConnectionRouter, ManhattanConnectionRouter

public abstract class AbstractRouter
extends Object
implements ConnectionRouter

Generic support for ConnectionRouters.


Nested Class Summary
 
Nested classes inherited from class org.eclipse.draw2d.ConnectionRouter
ConnectionRouter.NullConnectionRouter
 
Field Summary
 
Fields inherited from interface org.eclipse.draw2d.ConnectionRouter
NULL
 
Constructor Summary
AbstractRouter()
           
 
Method Summary
 Object getConstraint(Connection connection)
          Returns the constraint for the given Connection.
protected  Point getEndPoint(Connection conn)
          Returns a Point representing the end of the given Connection.
protected  Point getStartPoint(Connection conn)
          Returns a Point representing the start of the given Connection.
 void invalidate(Connection connection)
          Causes the router to discard any cached information about the given Connection.
 void remove(Connection connection)
          Removes the given Connection from this routers list of Connections it is responsible for.
 void setConstraint(Connection connection, Object constraint)
          Sets the constraint for the given Connection.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.draw2d.ConnectionRouter
route
 

Constructor Detail

AbstractRouter

public AbstractRouter()
Method Detail

getConstraint

public Object getConstraint(Connection connection)
Returns the constraint for the given Connection.

Specified by:
getConstraint in interface ConnectionRouter
Parameters:
connection - The connection
Returns:
The constraint
Since:
2.0

getEndPoint

protected Point getEndPoint(Connection conn)
Returns a Point representing the end of the given Connection.

Parameters:
conn - The connection
Returns:
The end point
Since:
2.0

getStartPoint

protected Point getStartPoint(Connection conn)
Returns a Point representing the start of the given Connection.

Parameters:
conn - The connection
Returns:
The start point
Since:
2.0

invalidate

public void invalidate(Connection connection)
Causes the router to discard any cached information about the given Connection.

Specified by:
invalidate in interface ConnectionRouter
Parameters:
connection - The connection to invalidate
Since:
2.0

remove

public void remove(Connection connection)
Removes the given Connection from this routers list of Connections it is responsible for.

Specified by:
remove in interface ConnectionRouter
Parameters:
connection - The connection to remove
Since:
2.0

setConstraint

public void setConstraint(Connection connection,
                          Object constraint)
Sets the constraint for the given Connection.

Specified by:
setConstraint in interface ConnectionRouter
Parameters:
connection - The connection
constraint - The constraint
Since:
2.0

Eclipse Draw2d
2.1

Copyright (c) IBM Corp. and others 2000, 2003. All Rights Reserved.