Class AbstractLabelConnectionFigure

All Implemented Interfaces:
ConnectableFigure, ConnectingFigure, Figure, FillableFigure, LabelConnectionFigure, PaddableFigure, PathIterableFigure, ShapeableFigure, StrokableFigure, TextFillableFigure, TextFontableFigure, TextLayoutableFigure, TransformableFigure, TransformCachingFigure, PropertyBean, StyleableBean, StyleablePropertyBean, TreeNode<Figure>
Direct Known Subclasses:
SimpleLabelConnectionFigure

public abstract class AbstractLabelConnectionFigure extends AbstractLabelFigure implements ConnectingFigure, TransformableFigure, LabelConnectionFigure
A label that can be attached to another figure by setting LabelConnectionFigure.LABEL_CONNECTOR and LabelConnectionFigure.LABEL_TARGET.

When the label is attached it computes the LABELED_LOCATION using the LabelConnectionFigure.LABEL_CONNECTOR on the target figure. Then it computes the AbstractLabelFigure.ORIGIN and rotation of the label using the properties LABEL_OFFSET and LABEL_AUTOROTATE.

 LABELED_LOCATION:    x,y (has a derivative that can be rotated)
                       |
                       | + LABEL_OFFSET (perpendicular to
                       |                 LABELED_LOCATION)
                       ↓
                   +--------------------+
 ORIGIN:           |  x,y               |
 LABEL_AUTOROTATE: |   ↺                |
                   |                    |
                   |    layout bounds   |
                   +--------------------+

 
Author:
Werner Randelshofer