public class GFChopboxAnchor extends ChopboxAnchorFixed
Constructor and Description |
---|
GFChopboxAnchor(org.eclipse.draw2d.IFigure figure) |
GFChopboxAnchor(org.eclipse.draw2d.IFigure figure,
AdvancedAnchor advancedAnchor) |
Modifier and Type | Method and Description |
---|---|
static org.eclipse.draw2d.geometry.PrecisionPoint |
getAnchorRelativeLocation(org.eclipse.draw2d.geometry.Point p,
org.eclipse.draw2d.geometry.Rectangle bounds)
Calculates the relative location of the reference point with respect to
the bounds of the figure.
|
org.eclipse.draw2d.geometry.Point |
getLocation(org.eclipse.draw2d.geometry.Point reference)
CHANGED: if the reference is in the center of the figure, the result was
not correct.
|
static org.eclipse.draw2d.geometry.Point |
pickClosestPoint(org.eclipse.draw2d.geometry.PointList points,
org.eclipse.draw2d.geometry.Point p)
Assumption: Points in the
PointList and Point p
lie on the same line. |
public GFChopboxAnchor(org.eclipse.draw2d.IFigure figure)
public GFChopboxAnchor(org.eclipse.draw2d.IFigure figure, AdvancedAnchor advancedAnchor)
public org.eclipse.draw2d.geometry.Point getLocation(org.eclipse.draw2d.geometry.Point reference)
ChopboxAnchorFixed
GefService.getChopboxLocationOnBox(Point, Rectangle)
.getLocation
in interface org.eclipse.draw2d.ConnectionAnchor
getLocation
in class ChopboxAnchorFixed
public static org.eclipse.draw2d.geometry.Point pickClosestPoint(org.eclipse.draw2d.geometry.PointList points, org.eclipse.draw2d.geometry.Point p)
PointList
and Point
p
lie on the same line. Returns the Point
from the
PointList
closest top
- points
- - the list of points to select the result fromp
- - the point to which the closest point must be foundp
- Point
from the PointList
closest topublic static org.eclipse.draw2d.geometry.PrecisionPoint getAnchorRelativeLocation(org.eclipse.draw2d.geometry.Point p, org.eclipse.draw2d.geometry.Rectangle bounds)
p
- the Point
that is relative coordinates of the
pointPrecisionPoint
, i.e. the relative reference for
SlidableAnchor