public class TileImpl extends java.lang.Object implements Tile
| Modifier and Type | Class and Description |
|---|---|
class |
TileImpl.CancelTaskImpl
All tasks which use libRemoteServices need an object that implements ICancellable
to cancel processes.
|
| Modifier and Type | Field and Description |
|---|---|
protected TileImpl.CancelTaskImpl |
cancelDownloading |
| Constructor and Description |
|---|
TileImpl(int level,
int col,
int row) |
TileImpl(int wPx,
int hPx,
int row,
int col,
java.awt.geom.Point2D ul,
java.awt.geom.Point2D lr) |
| Modifier and Type | Method and Description |
|---|---|
void |
cancelTask()
Cancels this current task
|
Tile |
cloneTile() |
int |
compareTo(AtomicTask o) |
boolean |
dataIsLoaded()
Returns true if the buffer data is loaded
|
ICancellable |
getCancelled()
Returns true if downloading has been canceled.
|
int |
getCol()
Gets the column of this tile
|
java.awt.geom.Rectangle2D |
getCoordsPx()
Gets the coordinates in pixels of this tile inside the layer.
|
java.lang.Object |
getCrashARGB()
Gets the image that represent a crash tile
|
java.lang.Object[] |
getCrashImage()
Gets the image that represent a crash tile
|
java.lang.Object[] |
getData()
Gets the data associated to this tile.
|
Downloader |
getDownloader()
Gets the downloader for this tile
|
java.lang.Object |
getDownloaderParams(java.lang.String key)
Gets the Downloader parameters
|
java.lang.Object |
getDownloadingARGB()
Gets the image that represent a tile while is downloading
|
java.lang.Object[] |
getDownloadingImage()
Gets the image that represent a tile while is downloading
|
java.awt.geom.Rectangle2D |
getExtent()
Gets the bounding box
|
java.io.File |
getFile()
Gets the file associated to this tile
|
int |
getHeightPx()
Gets the height in pixels of this tile
|
java.lang.String |
getId()
Gets an unique identifier to this tile
|
int |
getLevel()
Gets the resolution level of this tile
|
java.awt.geom.Point2D |
getLr()
Gets the lower right coordinate of this tile
|
int |
getPriority()
Gets the priority of this task
|
int |
getRow()
Gets the row of this tile
|
TilePipe |
getSharedPipe()
Gets the pipe of tiles
|
java.lang.String |
getTimeInstant()
Gets the time instant that this tile belong to.This is useful when the source
is a multidimensional container.
|
java.awt.geom.Point2D |
getUl()
Gets the upper left coordinate of this tile
|
java.lang.String |
getVariable()
Gets the Variable that this tile belong to.This is useful when the source
is a multidimensional container.
|
int |
getWidthPx()
Gets the width in pixels of this tile
|
java.lang.String |
getZ()
Gets the Z that this tile belong to.
|
boolean |
isCorrupt()
Returns true if the downloaded tile is corrupt, so this can't be sent to the client
|
void |
run()
Actions for download a tile
|
void |
setCol(int col)
Sets the column of this tile in its level
|
void |
setCoordsPx(java.awt.geom.Rectangle2D r)
Sets the coordinates ins pixels of this tile inside the layer.
|
void |
setCorrupt(boolean corrupt)
Sets this flag to true if the data is corrupt
|
void |
setData(java.lang.Object[] data)
Sets the data associated to this tile.
|
void |
setDownloader(Downloader downloader)
Sets the downloader for this tile
|
void |
setDownloaderParams(java.lang.String key,
java.lang.Object value)
Sets the Downloader parameters
|
void |
setFile(java.io.File file)
Sets the file associated to this tile
|
void |
setHeightPx(int heightPx)
Sets the height in pixels of this tile
|
void |
setLevel(int level)
Sets the level of resolution of this tile
|
void |
setLr(java.awt.geom.Point2D lr)
Sets the lower right coordinate of this tile
|
void |
setPriority(int priority)
Sets the priority of this task
|
void |
setRow(int row)
Sets the row of this tile in its level
|
void |
setSharedPipe(TilePipe sharedPipe)
Sets the pipe of tiles
|
void |
setTimeInstant(java.lang.String t)
Sets the time instant that this tile belong to.This is useful when the source
is a multidimensional container.
|
void |
setUl(java.awt.geom.Point2D ul)
Sets the upper left coordinate of this tile
|
void |
setVariable(java.lang.String var)
Sets the Variable that this tile belong to.This is useful when the source
is a multidimensional container.
|
void |
setWidthPx(int widthPx)
Sets the width in pixels of this tile
|
void |
setZ(java.lang.String z)
Sets the Z that this tile belong to.
|
java.awt.geom.Point2D |
worldToRaster(java.awt.geom.Point2D pt)
Convierte un punto desde del mundo a coordenadas pixel.
|
protected TileImpl.CancelTaskImpl cancelDownloading
public TileImpl(int level,
int col,
int row)
public TileImpl(int wPx,
int hPx,
int row,
int col,
java.awt.geom.Point2D ul,
java.awt.geom.Point2D lr)
public java.lang.Object[] getDownloadingImage()
TilegetDownloadingImage in interface Tilepublic java.lang.Object[] getCrashImage()
TilegetCrashImage in interface Tilepublic java.lang.Object getDownloadingARGB()
TilegetDownloadingARGB in interface Tilepublic java.lang.Object getCrashARGB()
TilegetCrashARGB in interface Tilepublic java.awt.geom.Point2D worldToRaster(java.awt.geom.Point2D pt)
pt - Punto a transformarpublic Tile cloneTile()
public java.lang.String getVariable()
TilegetVariable in interface Tilepublic java.lang.String getZ()
Tilepublic java.lang.String getTimeInstant()
TilegetTimeInstant in interface Tilepublic void setVariable(java.lang.String var)
TilesetVariable in interface Tilepublic void setZ(java.lang.String z)
Tilepublic int getLevel()
Tilepublic void setTimeInstant(java.lang.String t)
TilesetTimeInstant in interface Tilepublic int getCol()
Tilepublic int getRow()
Tilepublic void setCol(int col)
Tilepublic void setRow(int row)
Tilepublic void setLevel(int level)
Tilepublic java.awt.geom.Rectangle2D getCoordsPx()
TilegetCoordsPx in interface Tilepublic void setCoordsPx(java.awt.geom.Rectangle2D r)
TilesetCoordsPx in interface Tilepublic int getWidthPx()
TilegetWidthPx in interface Tilepublic void setWidthPx(int widthPx)
TilesetWidthPx in interface Tilepublic int getHeightPx()
TilegetHeightPx in interface Tilepublic void setHeightPx(int heightPx)
TilesetHeightPx in interface Tilepublic java.awt.geom.Rectangle2D getExtent()
Tilepublic java.awt.geom.Point2D getUl()
Tilepublic void setUl(java.awt.geom.Point2D ul)
Tilepublic java.awt.geom.Point2D getLr()
Tilepublic void setLr(java.awt.geom.Point2D lr)
Tilepublic java.io.File getFile()
Tilepublic void setFile(java.io.File file)
Tilepublic Downloader getDownloader()
public void setDownloader(Downloader downloader)
TilesetDownloader in interface Tilepublic java.lang.Object getDownloaderParams(java.lang.String key)
TilegetDownloaderParams in interface Tilepublic void setDownloaderParams(java.lang.String key,
java.lang.Object value)
TilesetDownloaderParams in interface Tilepublic void setCorrupt(boolean corrupt)
TilesetCorrupt in interface Tilepublic boolean isCorrupt()
Tilepublic void run()
run in interface java.lang.Runnablepublic void cancelTask()
AtomicTaskcancelTask in interface AtomicTaskpublic ICancellable getCancelled()
TilegetCancelled in interface Tilepublic TilePipe getSharedPipe()
public void setSharedPipe(TilePipe sharedPipe)
TilesetSharedPipe in interface Tilepublic java.lang.String getId()
Tilepublic int getPriority()
AtomicTaskgetPriority in interface AtomicTaskpublic void setPriority(int priority)
AtomicTasksetPriority in interface AtomicTaskpublic void setData(java.lang.Object[] data)
Tilepublic java.lang.Object[] getData()
Tilepublic int compareTo(AtomicTask o)
compareTo in interface java.lang.Comparable<AtomicTask>public boolean dataIsLoaded()
TiledataIsLoaded in interface Tile