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()
Tile
getDownloadingImage
in interface Tile
public java.lang.Object[] getCrashImage()
Tile
getCrashImage
in interface Tile
public java.lang.Object getDownloadingARGB()
Tile
getDownloadingARGB
in interface Tile
public java.lang.Object getCrashARGB()
Tile
getCrashARGB
in interface Tile
public java.awt.geom.Point2D worldToRaster(java.awt.geom.Point2D pt)
pt
- Punto a transformarpublic Tile cloneTile()
public java.lang.String getVariable()
Tile
getVariable
in interface Tile
public java.lang.String getZ()
Tile
public java.lang.String getTimeInstant()
Tile
getTimeInstant
in interface Tile
public void setVariable(java.lang.String var)
Tile
setVariable
in interface Tile
public void setZ(java.lang.String z)
Tile
public int getLevel()
Tile
public void setTimeInstant(java.lang.String t)
Tile
setTimeInstant
in interface Tile
public int getCol()
Tile
public int getRow()
Tile
public void setCol(int col)
Tile
public void setRow(int row)
Tile
public void setLevel(int level)
Tile
public java.awt.geom.Rectangle2D getCoordsPx()
Tile
getCoordsPx
in interface Tile
public void setCoordsPx(java.awt.geom.Rectangle2D r)
Tile
setCoordsPx
in interface Tile
public int getWidthPx()
Tile
getWidthPx
in interface Tile
public void setWidthPx(int widthPx)
Tile
setWidthPx
in interface Tile
public int getHeightPx()
Tile
getHeightPx
in interface Tile
public void setHeightPx(int heightPx)
Tile
setHeightPx
in interface Tile
public java.awt.geom.Rectangle2D getExtent()
Tile
public java.awt.geom.Point2D getUl()
Tile
public void setUl(java.awt.geom.Point2D ul)
Tile
public java.awt.geom.Point2D getLr()
Tile
public void setLr(java.awt.geom.Point2D lr)
Tile
public java.io.File getFile()
Tile
public void setFile(java.io.File file)
Tile
public Downloader getDownloader()
public void setDownloader(Downloader downloader)
Tile
setDownloader
in interface Tile
public java.lang.Object getDownloaderParams(java.lang.String key)
Tile
getDownloaderParams
in interface Tile
public void setDownloaderParams(java.lang.String key, java.lang.Object value)
Tile
setDownloaderParams
in interface Tile
public void setCorrupt(boolean corrupt)
Tile
setCorrupt
in interface Tile
public boolean isCorrupt()
Tile
public void run()
run
in interface java.lang.Runnable
public void cancelTask()
AtomicTask
cancelTask
in interface AtomicTask
public ICancellable getCancelled()
Tile
getCancelled
in interface Tile
public TilePipe getSharedPipe()
public void setSharedPipe(TilePipe sharedPipe)
Tile
setSharedPipe
in interface Tile
public java.lang.String getId()
Tile
public int getPriority()
AtomicTask
getPriority
in interface AtomicTask
public void setPriority(int priority)
AtomicTask
setPriority
in interface AtomicTask
public void setData(java.lang.Object[] data)
Tile
public java.lang.Object[] getData()
Tile
public int compareTo(AtomicTask o)
compareTo
in interface java.lang.Comparable<AtomicTask>
public boolean dataIsLoaded()
Tile
dataIsLoaded
in interface Tile