Draw2D v2.0

org.eclipse.draw2d
Class BendpointConnectionRouter

java.lang.Object
  |
  +--org.eclipse.draw2d.AbstractRouter
        |
        +--org.eclipse.draw2d.BendpointConnectionRouter
All Implemented Interfaces:
ConnectionRouter

public class BendpointConnectionRouter
extends AbstractRouter

A Router that routes a Connection that has manual bendpoints.


Inner classes inherited from class org.eclipse.draw2d.ConnectionRouter
ConnectionRouter.NullConnectionRouter
 
Fields inherited from interface org.eclipse.draw2d.ConnectionRouter
NULL
 
Constructor Summary
BendpointConnectionRouter()
           
 
Method Summary
 Object getConstraint(Connection connection)
          Gets the constraint for the given IFigure.
 void remove(Connection connection)
          Removes the given connection from the map of constraints.
 void route(Connection conn)
          Routes the Connection.
 void setConstraint(Connection connection, Object constraint)
          Sets the constraint for the given IFigure.
 
Methods inherited from class org.eclipse.draw2d.AbstractRouter
getEndPoint, getStartPoint, invalidate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BendpointConnectionRouter

public BendpointConnectionRouter()
Method Detail

getConstraint

public Object getConstraint(Connection connection)
Gets the constraint for the given IFigure.
Overrides:
getConstraint in class AbstractRouter
Parameters:
connection - The Connection whose constraint we are retrieving.
Returns:
The constraint.

remove

public void remove(Connection connection)
Removes the given connection from the map of constraints.
Overrides:
remove in class AbstractRouter
Parameters:
connection - The connection to remove.

route

public void route(Connection conn)
Routes the Connection. Expects the constraint to be a List of Points representing the bend points.
Parameters:
conn - The Connection to route.

setConstraint

public void setConstraint(Connection connection,
                          Object constraint)
Sets the constraint for the given IFigure.
Overrides:
setConstraint in class AbstractRouter
Parameters:
connection - The Connection whose constraint we are setting.
constraint - The constraint.

Draw2D v2.0