Package org.eclipse.draw2d
Class MidpointLocator
java.lang.Object
org.eclipse.draw2d.AbstractLocator
org.eclipse.draw2d.ConnectionLocator
org.eclipse.draw2d.MidpointLocator
- All Implemented Interfaces:
- Locator
A ConnectionLocator that is used to place figures at the midpoint between two
 points on a 
Connection.- 
Field Summary
- 
Constructor SummaryConstructorsConstructorDescriptionMidpointLocator(Connection c, int i) Constructs a MidpointLocator with associated Connection c and index i.
- 
Method SummaryMethods inherited from class org.eclipse.draw2d.ConnectionLocatorgetAlignment, getConnection, getLocation, setAlignment, setConnectionMethods inherited from class org.eclipse.draw2d.AbstractLocatorgetGap, getNewBounds, getRelativePosition, relocate, setGap, setRelativePosition
- 
Constructor Details- 
MidpointLocatorConstructs a MidpointLocator with associated Connection c and index i. The points at index i and i+1 on the connection are used to calculate the midpoint of the line segment.- Parameters:
- c- the connection associated with the locator
- i- the point from where the connection's midpoint will be calculated.
- Since:
- 2.0
 
 
- 
- 
Method Details- 
getIndexprotected int getIndex()Returns this MidpointLocator's index. This integer represents the position of the start point in this MidpointLocator's associatedConnectionfrom where midpoint calculation will be made.- Returns:
- the locator's index
- Since:
- 2.0
 
- 
getReferencePointReturns the point of reference associated with this locator. This point will be midway between points at 'index' and 'index' + 1.- Overrides:
- getReferencePointin class- ConnectionLocator
- Returns:
- the reference point
- Since:
- 2.0
 
 
-