Groovy Documentation

org.jdesktop.swingx.mapviewer
[Java] Class AbstractTileFactory

java.lang.Object
  org.jdesktop.swingx.mapviewer.TileFactory
      org.jdesktop.swingx.mapviewer.AbstractTileFactory

public abstract class AbstractTileFactory
extends TileFactory

The AbstractTileFactory provides a basic implementation for the TileFactory.


Nested Class Summary
private class AbstractTileFactory.TileRunner

Gets the full URI of a tile.

 
Field Summary
private static Logger LOG

private TileCache cache

private ExecutorService service

private int threadPoolSize

private Map tileMap

private static BlockingQueue tileQueue

 
Fields inherited from class TileFactory
info
 
Constructor Summary
AbstractTileFactory(TileFactoryInfo info)

Creates a new instance of DefaultTileFactory using the spcified TileFactoryInfo

 
Method Summary
protected Runnable createTileRunner(Tile tile)

Increase the priority of this tile so it will be loaded sooner.

protected ExecutorService getService()

Tile getTile(int x, int y, int zoom)

Returns the tile that is located at the given tilePoint for this zoom.

private Tile getTile(int tpx, int tpy, int zoom, boolean eagerLoad)

TileCache getTileCache()

==== threaded tile loading stuff ===

void promote(Tile tile)

void setThreadPoolSize(int size)

void setTileCache(TileCache cache)

protected void startLoading(Tile tile)

Subclasses can override this if they need custom TileRunners for some reason @return

 
Methods inherited from class TileFactory
geoToPixel, getInfo, getMapSize, getTile, getTileSize, pixelToGeo, startLoading
 
Methods inherited from class Object
wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll
 

Field Detail

LOG

private static final Logger LOG


cache

private TileCache cache


service

private ExecutorService service


threadPoolSize

private int threadPoolSize


tileMap

private Map tileMap


tileQueue

private static BlockingQueue tileQueue


 
Constructor Detail

AbstractTileFactory

public AbstractTileFactory(TileFactoryInfo info)
Creates a new instance of DefaultTileFactory using the spcified TileFactoryInfo
Parameters:
info - a TileFactoryInfo to configure this TileFactory


 
Method Detail

createTileRunner

protected Runnable createTileRunner(Tile tile)
Increase the priority of this tile so it will be loaded sooner.


getService

protected ExecutorService getService()


getTile

public Tile getTile(int x, int y, int zoom)
Returns the tile that is located at the given tilePoint for this zoom. For example, if getMapSize() returns 10x20 for this zoom, and the tilePoint is (3,5), then the appropriate tile will be located and returned.
Parameters:
tilePoint
zoom
Returns:


getTile

private Tile getTile(int tpx, int tpy, int zoom, boolean eagerLoad)


getTileCache

public TileCache getTileCache()
==== threaded tile loading stuff ===


promote

public void promote(Tile tile)


setThreadPoolSize

public void setThreadPoolSize(int size)


setTileCache

public void setTileCache(TileCache cache)


startLoading

protected void startLoading(Tile tile)
Subclasses can override this if they need custom TileRunners for some reason
Returns:


 

Groovy Documentation