simulation
Class BYOChopboxAnchor

java.lang.Object
  extended byorg.eclipse.draw2d.ConnectionAnchorBase
      extended byorg.eclipse.draw2d.AbstractConnectionAnchor
          extended byorg.eclipse.draw2d.ChopboxAnchor
              extended bysimulation.BYOChopboxAnchor
All Implemented Interfaces:
org.eclipse.draw2d.AncestorListener, org.eclipse.draw2d.ConnectionAnchor

public class BYOChopboxAnchor
extends org.eclipse.draw2d.ChopboxAnchor

A new take on the ChopboxAnchor included with Draw2D itself. This version works better for the C2ConnLinkFigure as an anchor. The only thing changed is the getLocation method, and within this method only 2 lines were changed from the original ChopboxAnchor.

Author:
Nels Started Jan 10, 2004

Nested Class Summary
 
Nested classes inherited from class org.eclipse.draw2d.AncestorListener
org.eclipse.draw2d.AncestorListener.Stub
 
Field Summary
 
Fields inherited from class org.eclipse.draw2d.AbstractConnectionAnchor
 
Fields inherited from class org.eclipse.draw2d.ConnectionAnchorBase
listeners
 
Constructor Summary
protected BYOChopboxAnchor()
           
  BYOChopboxAnchor(org.eclipse.draw2d.IFigure owner)
           
 
Method Summary
 org.eclipse.draw2d.geometry.Point getLocation(org.eclipse.draw2d.geometry.Point reference)
          Gets a Rectangle from ChopboxAnchor.getBox() and returns the Point where a line from the center of the Rectangle to the Point reference intersects the Rectangle.
 
Methods inherited from class org.eclipse.draw2d.ChopboxAnchor
getBox, getReferencePoint
 
Methods inherited from class org.eclipse.draw2d.AbstractConnectionAnchor
addAnchorListener, ancestorAdded, ancestorMoved, ancestorRemoved, getOwner, removeAnchorListener, setOwner
 
Methods inherited from class org.eclipse.draw2d.ConnectionAnchorBase
fireAnchorMoved
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BYOChopboxAnchor

protected BYOChopboxAnchor()

BYOChopboxAnchor

public BYOChopboxAnchor(org.eclipse.draw2d.IFigure owner)
Method Detail

getLocation

public org.eclipse.draw2d.geometry.Point getLocation(org.eclipse.draw2d.geometry.Point reference)
Gets a Rectangle from ChopboxAnchor.getBox() and returns the Point where a line from the center of the Rectangle to the Point reference intersects the Rectangle.

Parameters:
reference - The reference point
Returns:
The anchor location