public class CenteredLabelFactory extends java.lang.Object implements LineLabelFactory
CenteredLabelFactory
class creates labels that
line up along the view edges.Modifier and Type | Method and Description |
---|---|
java.util.List<TextElement> |
create(java.util.List<java.awt.geom.Line2D> segments,
java.lang.String text,
java.awt.Dimension imageDims)
Creates a set of line labels.
|
static CenteredLabelFactory |
getInstance()
Gets the singleton instance of this class.
|
public static CenteredLabelFactory getInstance()
public java.util.List<TextElement> create(java.util.List<java.awt.geom.Line2D> segments, java.lang.String text, java.awt.Dimension imageDims)
LineLabelFactory
create
in interface LineLabelFactory
segments
- the line segments for the line to label.text
- the label for the line.imageDims
- the image dimensions for the box whose edges
contain the entire line and all its segments. This would typically be
the view.