Represents a label displayed by a DiagramLink. New labels can be added to a link by calling the DiagramLink.addLabel method.
Namespace: com.mindfusion.diagramming
Package: com.mindfusion.diagramming
Java
![]() |
---|
public class LinkLabel implements Externalizable, InplaceEditable |
Each label can be associated with a specific segment or control point of the link, or it can be placed at a specific position along the link's length. To set a label's position, call one of the setSegmentPosition, setControlPointPosition or setLinkLengthPosition methods.
The alignment of text can be set via setHorizontalAlign and setVerticalAlign. Text can automatically wrap to new line if it exceeds a specified width. To enable that, call setEnableWrap and setMaxWidth.
By default, labels are rendered using the link's text color and font. Call setTextColor and setFont to specify distinct color and font for the label's text.
java.lang.Object
com.mindfusion.diagramming.LinkLabel