Package org.eclipse.draw2d
Class ConnectionEndpointLocator
java.lang.Object
org.eclipse.draw2d.ConnectionEndpointLocator
- All Implemented Interfaces:
- 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 SummaryFieldsModifier and TypeFieldDescriptionprotected TransposerTransposes the location if the connection point is along the top or bottom of its owner figure.
- 
Constructor SummaryConstructorsConstructorDescriptionConnectionEndpointLocator(Connection c, boolean isEnd) Constructs a ConnectionEndpointLocator using the givenConnection.
- 
Method SummaryModifier and TypeMethodDescriptionintReturns the distance in pixels from the anchor's owner.intReturns the distance in pixels from the connectionvoidRelocates the given IFigure at either the source or target end of the Connection, based on thebooleangiven in the constructorConnectionEndpointLocator(Connection, boolean).voidsetUDistance(int distance) Sets the distance in pixels from the Connection's owner.voidsetVDistance(int distance) Sets the distance in pixels from the Connection.
- 
Field Details- 
transposerTransposes the location if the connection point is along the top or bottom of its owner figure.
 
- 
- 
Constructor Details- 
ConnectionEndpointLocatorConstructs a ConnectionEndpointLocator using the givenConnection. If isEnd istrue, the location is relative to the Connection's end (or target) point. If isEnd isfalse, the location is relative to the Connection's start (or source) point.- Parameters:
- c- The Connection
- isEnd-- trueis location is relative to end point
- Since:
- 2.0
 
 
- 
- 
Method Details- 
getUDistancepublic int getUDistance()Returns the distance in pixels from the anchor's owner.- Returns:
- the offset distance from the endpoint figure
 
- 
getVDistancepublic int getVDistance()Returns the distance in pixels from the connection- Returns:
- the offset from the connection itself
 
- 
relocateRelocates the given IFigure at either the source or target end of the Connection, based on thebooleangiven in the constructorConnectionEndpointLocator(Connection, boolean).
- 
setUDistancepublic 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
 
- 
setVDistancepublic 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
 
 
-