public class ChopboxAnchor extends AbstractConnectionAnchor
Connections
using the ChopBoxAnchor will be
oriented such that they point to their owner's center.AncestorListener.Stub
listeners
Modifier | Constructor and Description |
---|---|
protected |
ChopboxAnchor()
Constructs a new ChopboxAnchor.
|
|
ChopboxAnchor(IFigure owner)
Constructs a ChopboxAnchor with the given owner figure.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.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.
|
addAnchorListener, ancestorAdded, ancestorMoved, ancestorRemoved, getOwner, removeAnchorListener, setOwner
fireAnchorMoved
protected ChopboxAnchor()
public ChopboxAnchor(IFigure owner)
owner
- The owner figurepublic 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 pointprotected Rectangle getBox()
public Point getReferencePoint()
getReferencePoint
in interface ConnectionAnchor
getReferencePoint
in class AbstractConnectionAnchor
ConnectionAnchor.getReferencePoint()
public boolean equals(java.lang.Object obj)
true
if the other anchor has the same owner and box.equals
in class java.lang.Object
obj
- the other anchortrue
if equalpublic int hashCode()
hashCode
in class java.lang.Object
Copyright (c) IBM Corp. and others 2000, 2011. All Rights Reserved.