org.eclipse.draw2d
Class RoundedRectangleAnchor
java.lang.Object
org.eclipse.draw2d.ConnectionAnchorBase
org.eclipse.draw2d.AbstractConnectionAnchor
org.eclipse.draw2d.ChopboxAnchor
org.eclipse.draw2d.RoundedRectangleAnchor
- All Implemented Interfaces:
- AncestorListener, ConnectionAnchor
public class RoundedRectangleAnchor
- extends ChopboxAnchor
Anchor for rounded rectangles which is always on a line between the center
and the reference point.
- Since:
- 3.8
Method Summary |
Point |
getLocation(Point ref)
Calculates the position with ChopboxAnchor#getLocation() and if the
anchor is not at the rounded corners, the result is returned. |
RoundedRectangleAnchor
public RoundedRectangleAnchor(RoundedRectangle figure)
- Rounded Rectangle getCornerDimension should be public #302836 then
Rounded Rectangle would be sufficient.
RoundedRectangleAnchor
public RoundedRectangleAnchor(Figure figure,
Dimension corners)
- Rounded Rectangle getCornerDimension should be public #302836 then
Rounded Rectangle would be sufficient.
getLocation
public Point getLocation(Point ref)
- Calculates the position with ChopboxAnchor#getLocation() and if the
anchor is not at the rounded corners, the result is returned. If the
anchor point should be at a corner, the rectangle for the ellipse is
determined and ellipseAnchorGetLocation returns the two intersection
points between the line from calculated anchor point and the center of
the rounded rectangle.
- Specified by:
getLocation
in interface ConnectionAnchor
- Overrides:
getLocation
in class ChopboxAnchor
- Parameters:
ref
- The reference point
- Returns:
- The anchor location
Copyright (c) IBM Corp. and others 2000, 2011. All Rights Reserved.