Draw2D v2.0

org.eclipse.draw2d
Class ConnectionEndpointLocator

java.lang.Object
  |
  +--org.eclipse.draw2d.ConnectionEndpointLocator
All Implemented Interfaces:
Locator

public class ConnectionEndpointLocator
extends Object
implements Locator

Used to place IFigures along the endpoint or starting point of a Connection. uDistance represents the distance from the Connection's owner to the IFigure. vDistance represents the distance from the IFigure to the Connection itself.


Field Summary
protected  Transposer transposer
           
 
Constructor Summary
ConnectionEndpointLocator(Connection c, boolean isEnd)
          Constructs an ConnectionEndpointLocator
 
Method Summary
 void relocate(IFigure figure)
          Relocates the given IFigure.
 void setUDistance(int distance)
          Sets the distance in pixels from the Connection's owner.
 void setVDistance(int distance)
          Sets the distance in pixels from the Connection.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

transposer

protected Transposer transposer
Constructor Detail

ConnectionEndpointLocator

public ConnectionEndpointLocator(Connection c,
                                 boolean isEnd)
Constructs an ConnectionEndpointLocator
Parameters:
c - Connection used to calculate location.
isEnd - If true, location is based from the Connection's endpoint. If false, location is based from the connection's starting point.
Since:
2.0
Method Detail

relocate

public void relocate(IFigure figure)
Description copied from interface: Locator
Relocates the given IFigure.
Specified by:
relocate in interface Locator

setUDistance

public void setUDistance(int distance)
Sets the distance in pixels from the Connection's owner.
Parameters:
distance - Number of pixels to place the ConnectionEndpointLocator from its owner.
Since:
2.0

setVDistance

public void setVDistance(int distance)
Sets the distance in pixels from the Connection.
Parameters:
distance - Number of pixels to place the ConnectionEndpointLocator from its Connection.
Since:
2.0

Draw2D v2.0