Package org.openstreetmap.josm.gui
Class MapView.WarningLayerPainter
- java.lang.Object
-
- org.openstreetmap.josm.gui.MapView.WarningLayerPainter
-
- All Implemented Interfaces:
MapViewPaintable.LayerPainter
- Enclosing class:
- MapView
private static class MapView.WarningLayerPainter extends java.lang.Object implements MapViewPaintable.LayerPainter
A layer painter that issues a warning when being called.- Since:
- 10474
-
-
Field Summary
Fields Modifier and Type Field Description private Layer
layer
(package private) boolean
warningPrinted
-
Constructor Summary
Constructors Constructor Description WarningLayerPainter(Layer layer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
detachFromMapView(MapViewPaintable.MapViewEvent event)
Called when the layer is removed from the map view and this painter is not used any more.void
paint(MapViewGraphics graphics)
Paints the given layer.
-
-
-
Field Detail
-
warningPrinted
boolean warningPrinted
-
-
Constructor Detail
-
WarningLayerPainter
WarningLayerPainter(Layer layer)
-
-
Method Detail
-
paint
public void paint(MapViewGraphics graphics)
Description copied from interface:MapViewPaintable.LayerPainter
Paints the given layer.This can be called in any thread at any time. You will not receive parallel calls for the same map view but you can receive parallel calls if you use the same
MapViewPaintable.LayerPainter
for different map views.- Specified by:
paint
in interfaceMapViewPaintable.LayerPainter
- Parameters:
graphics
- The graphics object of the map view you should use. It provides you with a content pane, the bounds and the view state.
-
detachFromMapView
public void detachFromMapView(MapViewPaintable.MapViewEvent event)
Description copied from interface:MapViewPaintable.LayerPainter
Called when the layer is removed from the map view and this painter is not used any more.This method is called once on the painter returned by
AbstractMapViewPaintable.attachToMapView(org.openstreetmap.josm.gui.layer.MapViewPaintable.MapViewEvent)
- Specified by:
detachFromMapView
in interfaceMapViewPaintable.LayerPainter
- Parameters:
event
- The event.
-
-