Package 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
Anchor for rounded rectangles which is always on a line between the center
and the reference point.
- Since:
- 3.8
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.eclipse.draw2d.AncestorListener
AncestorListener.Stub
-
Field Summary
Fields inherited from class org.eclipse.draw2d.ConnectionAnchorBase
listeners
-
Constructor Summary
ConstructorsConstructorDescriptionRoundedRectangleAnchor
(Figure figure, Dimension corners) Rounded Rectangle getCornerDimension should be public #302836 then Rounded Rectangle would be sufficient.Rounded Rectangle getCornerDimension should be public #302836 then Rounded Rectangle would be sufficient. -
Method Summary
Modifier and TypeMethodDescriptiongetLocation
(Point ref) Calculates the position with ChopboxAnchor#getLocation() and if the anchor is not at the rounded corners, the result is returned.Methods inherited from class org.eclipse.draw2d.ChopboxAnchor
equals, getBox, getReferencePoint, hashCode
Methods inherited from class org.eclipse.draw2d.AbstractConnectionAnchor
addAnchorListener, ancestorAdded, ancestorMoved, ancestorRemoved, getOwner, removeAnchorListener, setOwner
Methods inherited from class org.eclipse.draw2d.ConnectionAnchorBase
fireAnchorMoved
-
Constructor Details
-
RoundedRectangleAnchor
Rounded Rectangle getCornerDimension should be public #302836 then Rounded Rectangle would be sufficient. -
RoundedRectangleAnchor
Rounded Rectangle getCornerDimension should be public #302836 then Rounded Rectangle would be sufficient.
-
-
Method Details
-
getLocation
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 interfaceConnectionAnchor
- Overrides:
getLocation
in classChopboxAnchor
- Parameters:
ref
- The reference point- Returns:
- The anchor location
-