|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.fhpotsdam.unfolding.tiles.TileLoader
public class TileLoader
Loads tiles from the MapProvider. Will be used in a background thread. Two kinds of MapProviders are supported:
AbstractMapDisplay
(caching) and
Java2DMapDisplay
(rendering).
Field Summary | |
---|---|
protected Coordinate |
coordinate
The actual coordinates of the tile to load. |
protected TileLoaderListener |
listener
The listener to call method after tile has been loaded. |
protected processing.core.PApplet |
p
The parent applet. |
protected AbstractMapProvider |
provider
The tile provider. |
boolean |
showDebugBorder
Shows coordinate information for tile, i.e. |
boolean |
showTileCoordinates
|
Constructor Summary | |
---|---|
TileLoader(processing.core.PApplet p,
AbstractMapProvider provider,
TileLoaderListener listener,
Coordinate coordinate)
|
Method Summary | |
---|---|
protected processing.core.PImage |
getTileFromUrl(java.lang.String[] urls)
Loads tile from URL(s) by using Processing's loadImage function. |
void |
run()
Gets tile from provider, and calls TileLoaderListener.tileLoaded(Coordinate, Object)
afterwards. |
void |
showDebugBorder()
|
void |
showTileCoordinates()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public boolean showDebugBorder
public boolean showTileCoordinates
protected processing.core.PApplet p
protected AbstractMapProvider provider
protected TileLoaderListener listener
protected Coordinate coordinate
Constructor Detail |
---|
public TileLoader(processing.core.PApplet p, AbstractMapProvider provider, TileLoaderListener listener, Coordinate coordinate)
Method Detail |
---|
public void run()
TileLoaderListener.tileLoaded(Coordinate, Object)
afterwards.
run
in interface java.lang.Runnable
protected processing.core.PImage getTileFromUrl(java.lang.String[] urls)
urls
- The URLs (local or remote) to load the tiles from.
public void showDebugBorder()
public void showTileCoordinates()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |