Represents a label displayed by a DiagramNode. New labels can be added to a node by calling the addLabel method.
Namespace: com.mindfusion.diagramming
Package: com.mindfusion.diagramming
Java
![]() |
---|
public class NodeLabel extends ItemLabel implements Externalizable |
The position of a label is determined by where it is pinned relative to node's bounding box, and offset from the pin point, as set using setCornerPosition, setEdgePosition and setCenterPosition methods. In addition, the HorizontalAlign and VerticalAlign properties specify whether the label is centered on its pin point or aligned to it.
Apart from Text, a label can also display java.awt.Image bitmap assigned to the Image property. This lets you draw multiple icons inside a node. If a label contains both image and text, their relative position can be set using the ImageAlign property.
You can let users arrange labels manually by setting the Behavior property of DiagramView to MoveLabels.
java.lang.Object
com.mindfusion.diagramming.ItemLabel
com.mindfusion.diagramming.NodeLabel