public class LabeledLine extends java.lang.Object implements java.lang.Comparable<LabeledLine>
LabeledLine
class holds the line label text
and segment information for one labeled line on the earth.Constructor and Description |
---|
LabeledLine(java.lang.String labelText)
Creates an empty line with the specified label text.
|
Modifier and Type | Method and Description |
---|---|
void |
addSegment(DataLocation start,
DataLocation end,
EarthImageTransform trans)
Adds a segment to the line.
|
void |
addSegment(EarthLocation start,
EarthLocation end,
EarthImageTransform trans)
Adds a segment to the line.
|
int |
compareTo(LabeledLine line) |
java.util.List<TextElement> |
getLabels(java.awt.Dimension imageDims,
LineLabelFactory labelFactory)
Gets the line labels.
|
int |
getSegmentCount()
Gets the number of segments in this line.
|
void |
render(java.awt.Graphics2D g)
Renders this line.
|
public LabeledLine(java.lang.String labelText)
labelText
- the text for labeling the line.public void addSegment(DataLocation start, DataLocation end, EarthImageTransform trans)
start
- the starting data location.end
- the ending data location.trans
- the transform for converting from data location to
image location.public void addSegment(EarthLocation start, EarthLocation end, EarthImageTransform trans)
start
- the starting earth location.end
- the ending earth location.trans
- the transform for converting from earth
location to image location.public int getSegmentCount()
public int compareTo(LabeledLine line)
compareTo
in interface java.lang.Comparable<LabeledLine>
public void render(java.awt.Graphics2D g)
g
- the graphics device for rendering.public java.util.List<TextElement> getLabels(java.awt.Dimension imageDims, LineLabelFactory labelFactory)
imageDims
- the image dimensions.labelFactory
- the label factory to use for creating labels.