public abstract class AbstractCachedTileSourceLayer extends AbstractTileSourceLayer
AbstractTileSourceLayer.PrecacheTask
ImageryLayer.ApplyOffsetAction, ImageryLayer.GammaImageProcessor, ImageryLayer.OffsetAction
Layer.LayerAction, Layer.LayerGpxExportAction, Layer.LayerSaveAction, Layer.LayerSaveAsAction, Layer.MultiLayerAction, Layer.SeparatorLayerAction
Modifier and Type | Field and Description |
---|---|
private org.apache.commons.jcs.access.behavior.ICacheAccess<String,BufferedImageCacheEntry> |
cache |
private static Map<String,TileLoaderFactory> |
loaderFactories
loader factory responsible for loading tiles for all layers
|
private TileLoaderFactory |
loaderFactory |
private static TileLoaderFactory |
loaderFactoryOverride |
static IntegerProperty |
MAX_DISK_CACHE_SIZE
how many object on disk should be stored for TMS region in MB.
|
private static String |
PREFERENCE_PREFIX |
autoLoad, autoZoom, currentZoomLevel, MAX_ZOOM, MIN_ZOOM, PROP_DEFAULT_AUTOLOAD, PROP_DEFAULT_AUTOZOOM, PROP_DEFAULT_SHOWERRORS, PROP_MAX_ZOOM_LVL, PROP_MIN_ZOOM_LVL, showErrors, tileCache, tileLoader, tileSource, ZOOM_OFFSET
dx, dy, gammaImageProcessor, icon, info, PROP_FADE_AMOUNT, PROP_FADE_COLOR, PROP_SHARPEN_LEVEL
FILTER_STATE_PROP, ICON_SIZE, NAME_PROP, OPACITY_PROP, propertyChangeSupport, VISIBLE_PROP
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor and Description |
---|
AbstractCachedTileSourceLayer(ImageryInfo info)
Creates an instance of class based on InageryInfo
|
Modifier and Type | Method and Description |
---|---|
private org.apache.commons.jcs.access.behavior.ICacheAccess<String,BufferedImageCacheEntry> |
getCache() |
static org.apache.commons.jcs.access.CacheAccess<String,BufferedImageCacheEntry> |
getCache(String name) |
protected abstract String |
getCacheName() |
protected int |
getDiskCacheSize() |
protected abstract Class<? extends TileLoader> |
getTileLoaderClass() |
protected TileLoaderFactory |
getTileLoaderFactory() |
static TileLoaderFactory |
getTileLoaderFactory(String name,
Class<? extends TileLoader> klazz)
Returns tile loader factory for cache region and specified TileLoader class
|
static void |
setTileLoaderFactory(TileLoaderFactory newLoaderFactory)
Plugins that wish to set custom tile loader should call this method
|
checkMaxZoomLvl, checkMinZoomLvl, clearTileCache, createAndOpenSaveFileChooser, decreaseZoomLevel, downloadAreaToCache, estimateMemoryUsage, estimateTileCacheSize, getBestZoom, getHeaders, getMaxZoomLvl, getMaxZoomLvl, getMenuEntries, getMinZoomLvl, getMinZoomLvl, getTileSource, getToolTipText, hookUpMapView, imageUpdate, increaseZoomLevel, initTileSource, isChanged, isSavable, loadAllErrorTiles, loadAllTiles, paint, redraw, setGamma, setMaxZoomLvl, setMinZoomLvl, setOffset, setZoomLevel, tileLoadingFinished, visitBoundingBox, zoomChanged, zoomDecreaseAllowed, zoomIncreaseAllowed
addImageProcessor, applyImageProcessors, create, createImageProcessor, createSharpener, destroy, displace, drawErrorTile, getDx, getDy, getFadeColor, getFadeColorWithAlpha, getGamma, getIcon, getImageProcessors, getInfo, getInfoComponent, getOffsetMenuItem, getOffsetMenuItem, getPPD, isMergable, mergeFrom, removeImageProcessor
addPropertyChangeListener, checkSaveConditions, fireFilterStateChanged, fireOpacityChanged, fireVisibleChanged, getAssociatedFile, getColor, getName, getOpacity, isBackgroundLayer, isInfoResizable, isProjectionSupported, isVisible, nameSupportedProjections, onPostLoadFromFile, projectionChanged, removePropertyChangeListener, setAssociatedFile, setBackgroundLayer, setFilterStateChanged, setName, setOpacity, setVisible, toggleVisible
private static Map<String,TileLoaderFactory> loaderFactories
private static final String PREFERENCE_PREFIX
private static volatile TileLoaderFactory loaderFactoryOverride
public static final IntegerProperty MAX_DISK_CACHE_SIZE
private org.apache.commons.jcs.access.behavior.ICacheAccess<String,BufferedImageCacheEntry> cache
private volatile TileLoaderFactory loaderFactory
public AbstractCachedTileSourceLayer(ImageryInfo info)
info
- ImageryInfo describing the layerprotected TileLoaderFactory getTileLoaderFactory()
getTileLoaderFactory
in class AbstractTileSourceLayer
private org.apache.commons.jcs.access.behavior.ICacheAccess<String,BufferedImageCacheEntry> getCache()
public static void setTileLoaderFactory(TileLoaderFactory newLoaderFactory)
newLoaderFactory
- that will be used to load tilespublic static TileLoaderFactory getTileLoaderFactory(String name, Class<? extends TileLoader> klazz)
name
- of the cache regionklazz
- type of the TileLoaderpublic static org.apache.commons.jcs.access.CacheAccess<String,BufferedImageCacheEntry> getCache(String name)
name
- of cache regionprotected abstract Class<? extends TileLoader> getTileLoaderClass()
protected int getDiskCacheSize()
protected abstract String getCacheName()