Eclipse Draw2d
2.1

org.eclipse.draw2d
Class MidpointLocator

java.lang.Object
  |
  +--org.eclipse.draw2d.AbstractLocator
        |
        +--org.eclipse.draw2d.ConnectionLocator
              |
              +--org.eclipse.draw2d.MidpointLocator
All Implemented Interfaces:
Locator

public class MidpointLocator
extends ConnectionLocator


Field Summary
 
Fields inherited from class org.eclipse.draw2d.ConnectionLocator
END, MIDDLE, MIDPOINT, SOURCE, START, TARGET
 
Constructor Summary
MidpointLocator(Connection c, int i)
          Constructs a MidpointLocator object with associated Connection c and index i.
 
Method Summary
protected  int getIndex()
          Returns this MidpointLocator's index This integer represents the position of the start point in this MidpointLocator's associated Connection from where midpoint calculation will be made.
protected  Point getReferencePoint()
          Returns the point of reference associated with this locator.
 
Methods inherited from class org.eclipse.draw2d.ConnectionLocator
getAlignment, getConnection, getLocation, setAlignment, setConnection
 
Methods inherited from class org.eclipse.draw2d.AbstractLocator
getGap, getNewBounds, getRelativePosition, relocate, setGap, setRelativePosition
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MidpointLocator

public MidpointLocator(Connection c,
                       int i)
Constructs a MidpointLocator object with associated Connection c and index i.

Parameters:
c - The Connection associated with the locator
i - The point from where the Connection's midpoint will be calculated. (I.E. The ith point and point i + 1 on the Connection are used to calculate the midpoint of the Connection.
Since:
2.0
Method Detail

getIndex

protected int getIndex()
Returns this MidpointLocator's index This integer represents the position of the start point in this MidpointLocator's associated Connection from where midpoint calculation will be made.

Since:
2.0

getReferencePoint

protected Point getReferencePoint()
Returns the point of reference associated with this locator. This point will be midway between points at 'index' and 'index' + 1.

Overrides:
getReferencePoint in class ConnectionLocator
Returns:
The reference point
Since:
2.0

Eclipse Draw2d
2.1

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