org.openstreetmap.gui.jmapviewer
Class TileController

java.lang.Object
  extended by org.openstreetmap.gui.jmapviewer.TileController

public class TileController
extends java.lang.Object


Field Summary
(package private)  JobDispatcher jobDispatcher
           
protected  TileCache tileCache
           
protected  TileLoader tileLoader
           
protected  TileSource tileSource
           
 
Constructor Summary
TileController(TileSource source, TileCache tileCache, TileLoaderListener listener)
           
 
Method Summary
 void cancelOutstandingJobs()
           
 Tile getTile(int tilex, int tiley, int zoom)
          retrieves a tile from the cache.
 TileCache getTileCache()
           
 TileSource getTileLayerSource()
           
 TileLoader getTileLoader()
           
 TileSource getTileSource()
           
 void setTileCache(TileCache tileCache)
           
 void setTileLoader(TileLoader tileLoader)
           
 void setTileSource(TileSource tileSource)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

tileLoader

protected TileLoader tileLoader

tileCache

protected TileCache tileCache

tileSource

protected TileSource tileSource

jobDispatcher

JobDispatcher jobDispatcher
Constructor Detail

TileController

public TileController(TileSource source,
                      TileCache tileCache,
                      TileLoaderListener listener)
Method Detail

getTile

public Tile getTile(int tilex,
                    int tiley,
                    int zoom)
retrieves a tile from the cache. If the tile is not present in the cache a load job is added to the working queue of JobDispatcher.JobThread.

Parameters:
tilex - the X position of the tile
tiley - the Y position of the tile
zoom - the zoom level of the tile
Returns:
specified tile from the cache or null if the tile was not found in the cache.

getTileCache

public TileCache getTileCache()

setTileCache

public void setTileCache(TileCache tileCache)

getTileLoader

public TileLoader getTileLoader()

setTileLoader

public void setTileLoader(TileLoader tileLoader)

getTileLayerSource

public TileSource getTileLayerSource()

getTileSource

public TileSource getTileSource()

setTileSource

public void setTileSource(TileSource tileSource)

cancelOutstandingJobs

public void cancelOutstandingJobs()


JOSM