private class AbstractTileSourceLayer.TileSourcePainter extends AbstractMapViewPaintable.CompatibilityModeLayerPainter
Modifier and Type | Field and Description |
---|---|
private MemoryManager.MemoryHandle<?> |
memory
The memory handle that will hold our tile source.
|
Modifier | Constructor and Description |
---|---|
private |
TileSourcePainter() |
Modifier and Type | Method and Description |
---|---|
private void |
allocateCacheMemory() |
void |
detachFromMapView(MapViewPaintable.MapViewEvent event)
Called when the layer is removed from the map view and this painter is not used any more.
|
private void |
doPaint(MapViewGraphics graphics) |
protected long |
getEstimatedCacheSize() |
void |
paint(MapViewGraphics graphics)
Paints the given layer.
|
private MemoryManager.MemoryHandle<?> memory
private TileSourcePainter()
public void paint(MapViewGraphics graphics)
MapViewPaintable.LayerPainter
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.
paint
in interface MapViewPaintable.LayerPainter
paint
in class AbstractMapViewPaintable.CompatibilityModeLayerPainter
graphics
- The graphics object of the map view you should use.
It provides you with a content pane, the bounds and the view state.private void doPaint(MapViewGraphics graphics)
private void allocateCacheMemory()
protected long getEstimatedCacheSize()
public void detachFromMapView(MapViewPaintable.MapViewEvent event)
MapViewPaintable.LayerPainter
This method is called once on the painter returned by AbstractMapViewPaintable.attachToMapView(org.openstreetmap.josm.gui.layer.MapViewPaintable.MapViewEvent)
detachFromMapView
in interface MapViewPaintable.LayerPainter
detachFromMapView
in class AbstractMapViewPaintable.CompatibilityModeLayerPainter
event
- The event.