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

### 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

Constructors
Constructor and Description
`RoundedRectangleAnchor(Figure figure, Dimension corners)` Rounded Rectangle getCornerDimension should be public #302836 then Rounded Rectangle would be sufficient.
`RoundedRectangleAnchor(RoundedRectangle figure)` Rounded Rectangle getCornerDimension should be public #302836 then Rounded Rectangle would be sufficient.

### Method Summary

Methods
`Point` `getLocation(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`

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### 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.

### Method Detail

#### 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