Package org.jxmapviewer.viewer
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.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.jxmapviewer.painter.AbstractPainter
AbstractPainter.Interpolation -
Constructor Summary
Constructors Constructor Description WaypointPainter()Creates a new instance of WaypointPainter -
Method Summary
Modifier and Type Method Description protected voiddoPaint(java.awt.Graphics2D g, JXMapViewer map, int width, int height)Subclasses must implement this method and perform custom painting operations here.java.util.Set<W>getWaypoints()Gets the current set of waypoints to paintvoidsetRenderer(WaypointRenderer<W> r)Sets the waypoint renderer to use when painting waypointsvoidsetWaypoints(java.util.Set<? extends W> waypoints)Sets the current set of waypoints to paintMethods inherited from class org.jxmapviewer.painter.AbstractPainter
clearCache, configureGraphics, getFilters, getInterpolation, isAntialiasing, isCacheable, isDirty, isVisible, paint, setAntialiasing, setCacheable, setDirty, setFilters, setInterpolation, setVisible, shouldUseCache, validateMethods inherited from class org.jxmapviewer.beans.AbstractBean
addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, addVetoableChangeListener, clone, fireIndexedPropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, fireVetoableChange, getPropertyChangeListeners, getPropertyChangeListeners, getVetoableChangeListeners, getVetoableChangeListeners, hasPropertyChangeListeners, hasVetoableChangeListeners, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, removeVetoableChangeListener
-
Constructor Details
-
WaypointPainter
public WaypointPainter()Creates a new instance of WaypointPainter
-
-
Method Details
-
setRenderer
Sets the waypoint renderer to use when painting waypoints- Parameters:
r- the new WaypointRenderer to use
-
getWaypoints
Gets the current set of waypoints to paint- Returns:
- a typed Set of Waypoints
-
setWaypoints
Sets the current set of waypoints to paint- Parameters:
waypoints- the new Set of Waypoints to use
-
doPaint
Description copied from class:AbstractPainterSubclasses must implement this method and perform custom painting operations here.- Specified by:
doPaintin classAbstractPainter<JXMapViewer>- Parameters:
g- The Graphics2D object in which to paintmap- an optional configuration parameterwidth- the widthheight- the height
-