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 Details

    • RoutePainter

      public RoutePainter()
    • RoutePainter

      public RoutePainter(Color lineColor, int lineWidth)
  • Method Details

    • paint

      public void paint(Graphics2D g, org.jxmapviewer.JXMapViewer map, int width, int height)
      Paints the route lines on the map by connecting consecutive stops.
      Specified by:
      paint in interface org.jxmapviewer.painter.Painter<org.jxmapviewer.JXMapViewer>
      Parameters:
      g - the graphics context
      map - the map viewer
      width - the width of the drawing area
      height - the height of the drawing area
      See Also:
    • getStops

      public List<StopModel> getStops()
    • setStops

      public void setStops(List<StopModel> stops)
    • getLineColor

      public Color getLineColor()
    • setLineColor

      public void setLineColor(Color lineColor)
    • getLineWidth

      public int getLineWidth()
    • setLineWidth

      public void setLineWidth(int lineWidth)