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 withTileZXYforJCSCacheManager.- Since:
- 19176
-
-
Field Summary
Fields Modifier and Type Field Description private java.awt.Imageimageprivate StyledTiledMapRenderer.TileLoaderimageFutureprivate booleanisDirty
-
Constructor Summary
Constructors Constructor Description ImageCache(java.awt.Image image, StyledTiledMapRenderer.TileLoader imageFuture, boolean isDirty)Create a newImageCacheobject
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ImageCachebecomeDirty()Mark this tile as dirtyjava.awt.Imageimage()Get the image to paint(package private) StyledTiledMapRenderer.TileLoaderimageFuture()Get the image futurebooleanisDirty()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 newImageCacheobject- Parameters:
image- The image to paint (optional; either this orimageFuturemust be specified)imageFuture- The future for the image (optional; either this orimagemust be specified)isDirty-trueif the tile needs to be repainted
-
-
Method Detail
-
isDirty
public boolean isDirty()
Check if this tile is dirty- Returns:
trueif 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)
-
-