Class WaypointPainter<W extends Waypoint>

java.lang.Object
Type Parameters:
W - the waypoint type
All Implemented Interfaces:
Painter<JXMapViewer>

public class WaypointPainter<W extends Waypoint>
extends AbstractPainter<JXMapViewer>
Paints waypoints on the JXMapViewer. This is an instance of Painter that only can draw on to JXMapViewers.
  • Constructor Details

    • WaypointPainter

      public WaypointPainter()
      Creates a new instance of WaypointPainter
  • Method Details

    • setRenderer

      public void setRenderer​(WaypointRenderer<W> r)
      Sets the waypoint renderer to use when painting waypoints
      Parameters:
      r - the new WaypointRenderer to use
    • getWaypoints

      public java.util.Set<W> getWaypoints()
      Gets the current set of waypoints to paint
      Returns:
      a typed Set of Waypoints
    • setWaypoints

      public void setWaypoints​(java.util.Set<? extends W> waypoints)
      Sets the current set of waypoints to paint
      Parameters:
      waypoints - the new Set of Waypoints to use
    • doPaint

      protected void doPaint​(java.awt.Graphics2D g, JXMapViewer map, int width, int height)
      Description copied from class: AbstractPainter
      Subclasses must implement this method and perform custom painting operations here.
      Specified by:
      doPaint in class AbstractPainter<JXMapViewer>
      Parameters:
      g - The Graphics2D object in which to paint
      map - an optional configuration parameter
      width - the width
      height - the height