us.zuercher.gpx2map.plotter
Class WayPointPlotter
java.lang.Object
us.zuercher.gpx2map.plotter.AbstractPlotter
us.zuercher.gpx2map.plotter.AbstractTextPlotter
us.zuercher.gpx2map.plotter.WayPointPlotter
- Direct Known Subclasses:
- TrackPlotter
public class WayPointPlotter
- extends AbstractTextPlotter
WayPointPlotter extends AbstractTextPlotter
to draw way-points
with optional labels.
- Author:
- Stephan Zuercher
Method Summary |
void |
add(WayPoint wayPoint,
Color color,
MarkerStyle style,
int styleRadius,
boolean drawLabel)
Adds a WayPoint to the plotter. |
protected void |
add(WayPoint wayPoint,
Color color,
MarkerStyle style,
int styleRadius,
boolean drawLabel,
int initialZOrdering)
Adds a WayPoint to the plotter with a specific initial
Z-ordering. |
protected int |
computeDistance(MarkerStyle style,
int styleRadius)
Computes the distance from the center of the way-point marker to
its label. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
INITIAL_WPT_Z_ORDERING
private static final int INITIAL_WPT_Z_ORDERING
- Initial Z-ordering for way-points. Way-points are drawn above
track- and route- points, but below text. Within the set of all
way-points, earlier way-points are rendered above later ones.
- See Also:
- Constant Field Values
WayPointPlotter
public WayPointPlotter(File netpbmFile,
MapSource mapSource)
- Constructs a new WayPointPlotter for the given Netpbm file and the
MapSource
that generated it.
- Parameters:
netpbmFile
- the Netpbm file to plot onmapSource
- the MapSource
that generated the Netpbm file.
add
public void add(WayPoint wayPoint,
Color color,
MarkerStyle style,
int styleRadius,
boolean drawLabel)
- Adds a
WayPoint
to the plotter.
- Parameters:
wayPoint
- the WayPoint
to plot.color
- color to plot the way-point's markerstyle
- style to plot the way-point's markerstyleRadius
- size of the way-point's marker, if applicabledrawLabel
- if true, the way-points name is rendered beside
its marker.
add
protected void add(WayPoint wayPoint,
Color color,
MarkerStyle style,
int styleRadius,
boolean drawLabel,
int initialZOrdering)
- Adds a
WayPoint
to the plotter with a specific initial
Z-ordering.
- Parameters:
wayPoint
- the WayPoint
to plot.color
- color to plot the way-point's markerstyle
- style to plot the way-point's markerstyleRadius
- size of the way-point's marker, if applicabledrawLabel
- if true, the way-points name is rendered beside
its marker.initialZOrdering
- initial Z-ordering
computeDistance
protected int computeDistance(MarkerStyle style,
int styleRadius)
- Computes the distance from the center of the way-point marker to
its label.
- Parameters:
style
- the marker's stylestyleRadius
- the style's size, if applicable
- Returns:
- the distance away from the way-point's center to render text