Package org.openstreetmap.josm.gui.layer
Class AbstractTileSourceLayer.TileSourcePainter
- java.lang.Object
-
- org.openstreetmap.josm.gui.layer.AbstractMapViewPaintable.CompatibilityModeLayerPainter
-
- org.openstreetmap.josm.gui.layer.AbstractTileSourceLayer.TileSourcePainter
-
- All Implemented Interfaces:
MapViewPaintable.LayerPainter
- Enclosing class:
- AbstractTileSourceLayer<T extends org.openstreetmap.gui.jmapviewer.tilesources.AbstractTMSTileSource>
private final class AbstractTileSourceLayer.TileSourcePainter extends AbstractMapViewPaintable.CompatibilityModeLayerPainter
-
-
Field Summary
Fields Modifier and Type Field Description private MemoryManager.MemoryHandle<?>memoryThe memory handle that will hold our tile source.
-
Constructor Summary
Constructors Modifier Constructor Description privateTileSourcePainter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private voidallocateCacheMemory()voiddetachFromMapView(MapViewPaintable.MapViewEvent event)Called when the layer is removed from the map view and this painter is not used any more.private voiddoPaint(MapViewGraphics graphics)private longgetEstimatedCacheSize()voidpaint(MapViewGraphics graphics)Paints the given layer.
-
-
-
Field Detail
-
memory
private MemoryManager.MemoryHandle<?> memory
The memory handle that will hold our tile source.
-
-
Constructor Detail
-
TileSourcePainter
private TileSourcePainter()
-
-
Method Detail
-
paint
public void paint(MapViewGraphics graphics)
Description copied from interface:MapViewPaintable.LayerPainterPaints 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.LayerPainterfor different map views.- Specified by:
paintin interfaceMapViewPaintable.LayerPainter- Overrides:
paintin classAbstractMapViewPaintable.CompatibilityModeLayerPainter- 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.
-
doPaint
private void doPaint(MapViewGraphics graphics)
-
allocateCacheMemory
private void allocateCacheMemory()
-
getEstimatedCacheSize
private long getEstimatedCacheSize()
-
detachFromMapView
public void detachFromMapView(MapViewPaintable.MapViewEvent event)
Description copied from interface:MapViewPaintable.LayerPainterCalled 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:
detachFromMapViewin interfaceMapViewPaintable.LayerPainter- Overrides:
detachFromMapViewin classAbstractMapViewPaintable.CompatibilityModeLayerPainter- Parameters:
event- The event.
-
-