Package com.nnamo.view.painter
Class RoutePainter
java.lang.Object
com.nnamo.view.painter.RoutePainter
- All Implemented Interfaces:
org.jxmapviewer.painter.Painter<org.jxmapviewer.JXMapViewer>
public class RoutePainter
extends Object
implements org.jxmapviewer.painter.Painter<org.jxmapviewer.JXMapViewer>
Custom painter to draw route lines connecting consecutive stops on the map.
Extends the
Painter
interface to provide custom rendering logic.- Author:
- Davide Galilei, Samuele Lombardi
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
getStops()
void
paint
(Graphics2D g, org.jxmapviewer.JXMapViewer map, int width, int height) Paints the route lines on the map by connecting consecutive stops.void
setLineColor
(Color lineColor) void
setLineWidth
(int lineWidth) void
-
Constructor Details
-
RoutePainter
public RoutePainter() -
RoutePainter
-
-
Method Details
-
paint
Paints the route lines on the map by connecting consecutive stops.- Specified by:
paint
in interfaceorg.jxmapviewer.painter.Painter<org.jxmapviewer.JXMapViewer>
- Parameters:
g
- the graphics contextmap
- the map viewerwidth
- the width of the drawing areaheight
- the height of the drawing area- See Also:
-
getStops
-
setStops
-
getLineColor
-
setLineColor
-
getLineWidth
public int getLineWidth() -
setLineWidth
public void setLineWidth(int lineWidth)
-