Class ImageCache
- java.lang.Object
-
- org.openstreetmap.josm.data.osm.visitor.paint.ImageCache
-
public final class ImageCache extends java.lang.Object
A record for keeping the image information for a tile. Used in conjunction withTileZXY
forJCSCacheManager
.- Since:
- 19176
-
-
Field Summary
Fields Modifier and Type Field Description private java.awt.Image
image
private StyledTiledMapRenderer.TileLoader
imageFuture
private boolean
isDirty
-
Constructor Summary
Constructors Constructor Description ImageCache(java.awt.Image image, StyledTiledMapRenderer.TileLoader imageFuture, boolean isDirty)
Create a newImageCache
object
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ImageCache
becomeDirty()
Mark this tile as dirtyjava.awt.Image
image()
Get the image to paint(package private) StyledTiledMapRenderer.TileLoader
imageFuture()
Get the image futureboolean
isDirty()
Check if this tile is dirty
-
-
-
Field Detail
-
isDirty
private final boolean isDirty
-
imageFuture
private final StyledTiledMapRenderer.TileLoader imageFuture
-
image
private final java.awt.Image image
-
-
Constructor Detail
-
ImageCache
ImageCache(java.awt.Image image, StyledTiledMapRenderer.TileLoader imageFuture, boolean isDirty)
Create a newImageCache
object- Parameters:
image
- The image to paint (optional; either this orimageFuture
must be specified)imageFuture
- The future for the image (optional; either this orimage
must be specified)isDirty
-true
if the tile needs to be repainted
-
-
Method Detail
-
isDirty
public boolean isDirty()
Check if this tile is dirty- Returns:
true
if this is a dirty tile
-
becomeDirty
public ImageCache becomeDirty()
Mark this tile as dirty- Returns:
- The tile to put in the cache
-
image
@Nullable public java.awt.Image image()
Get the image to paint- Returns:
- The image (may be
null
)
-
imageFuture
@Nullable StyledTiledMapRenderer.TileLoader imageFuture()
Get the image future- Returns:
- The image future (may be
null
)
-
-