|
Eclipse Draw2d 3.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.draw2d.ConnectionAnchorBase
org.eclipse.draw2d.AbstractConnectionAnchor
org.eclipse.draw2d.ChopboxAnchor
The ChopboxAnchor's location is found by calculating the intersection of a line drawn
from the center point of its owner's box to a reference point on that box. Thus
Connections
using the ChopBoxAnchor will be oriented such that they
point to their owner's center.
Nested Class Summary |
Nested classes inherited from class org.eclipse.draw2d.AncestorListener |
AncestorListener.Stub |
Field Summary |
Fields inherited from class org.eclipse.draw2d.ConnectionAnchorBase |
listeners |
Constructor Summary | |
protected |
ChopboxAnchor()
Constructs a new ChopboxAnchor. |
|
ChopboxAnchor(IFigure owner)
Constructs a ChopboxAnchor with the given owner figure. |
Method Summary | |
boolean |
equals(Object obj)
Returns true if the other anchor has the same owner and box. |
protected Rectangle |
getBox()
Returns the bounds of this ChopboxAnchor's owner. |
Point |
getLocation(Point reference)
Gets a Rectangle from getBox() and returns the Point where a line from the
center of the Rectangle to the Point reference intersects the Rectangle. |
Point |
getReferencePoint()
Returns the anchor's reference point. |
int |
hashCode()
The owning figure's hashcode is used since equality is approximately based on the owner. |
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, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
protected ChopboxAnchor()
public ChopboxAnchor(IFigure owner)
owner
- The owner figureMethod Detail |
public Point getLocation(Point reference)
getBox()
and returns the Point where a line from the
center of the Rectangle to the Point reference intersects the Rectangle.
reference
- The reference point
protected Rectangle getBox()
public Point getReferencePoint()
getReferencePoint
in interface ConnectionAnchor
getReferencePoint
in class AbstractConnectionAnchor
ConnectionAnchor.getReferencePoint()
public boolean equals(Object obj)
true
if the other anchor has the same owner and box.
obj
- the other anchor
true
if equalpublic int hashCode()
|
Eclipse Draw2d 3.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |