Draw2D v2.0

org.eclipse.draw2d
Class XYAnchor

java.lang.Object
  |
  +--org.eclipse.draw2d.ConnectionAnchorBase
        |
        +--org.eclipse.draw2d.XYAnchor
All Implemented Interfaces:
ConnectionAnchor

public class XYAnchor
extends ConnectionAnchorBase

Supports an anchor in the XY layout. This anchor exists independently without an owner.


Fields inherited from class org.eclipse.draw2d.ConnectionAnchorBase
listeners
 
Constructor Summary
XYAnchor(Point p)
          Constructs an XYAnchor at the Point p.
 
Method Summary
 Point getLocation(Point reference)
          Returns the location where the Connection should be anchored.
 IFigure getOwner()
          Returns the IFigure that contains this ConnectionAnchor.
 Point getReferencePoint()
          Returns the reference point for this anchor.
 void setLocation(Point p)
          Sets the location of this anchor, and notifies all the listeners of the update.
 
Methods inherited from class org.eclipse.draw2d.ConnectionAnchorBase
addAnchorListener, fireAnchorMoved, removeAnchorListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XYAnchor

public XYAnchor(Point p)
Constructs an XYAnchor at the Point p.
Since:
2.0
Method Detail

getLocation

public Point getLocation(Point reference)
Description copied from interface: ConnectionAnchor
Returns the location where the Connection should be anchored.

getOwner

public IFigure getOwner()
Description copied from interface: ConnectionAnchor
Returns the IFigure that contains this ConnectionAnchor.

getReferencePoint

public Point getReferencePoint()
Description copied from interface: ConnectionAnchor
Returns the reference point for this anchor. This might be used by another anchor to determine its own location (i.e. ChopboxAnchor).

setLocation

public void setLocation(Point p)
Sets the location of this anchor, and notifies all the listeners of the update.
Parameters:
p - The new location of this anchor.
Since:
2.0
See Also:
getLocation(Point)

Draw2D v2.0