public class TileImpl extends 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,
Point2D ul,
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
|
Rectangle2D |
getCoordsPx()
Gets the coordinates in pixels of this tile inside the layer.
|
Object |
getCrashARGB()
Gets the image that represent a crash tile
|
Object[] |
getCrashImage()
Gets the image that represent a crash tile
|
Object[] |
getData()
Gets the data associated to this tile.
|
Downloader |
getDownloader()
Gets the downloader for this tile
|
Object |
getDownloaderParams(String key)
Gets the Downloader parameters
|
Object |
getDownloadingARGB()
Gets the image that represent a tile while is downloading
|
Object[] |
getDownloadingImage()
Gets the image that represent a tile while is downloading
|
Rectangle2D |
getExtent()
Gets the bounding box
|
File |
getFile()
Gets the file associated to this tile
|
int |
getHeightPx()
Gets the height in pixels of this tile
|
String |
getId()
Gets an unique identifier to this tile
|
int |
getLevel()
Gets the resolution level of this tile
|
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
|
String |
getTimeInstant()
Gets the time instant that this tile belong to.This is useful when the source
is a multidimensional container.
|
Point2D |
getUl()
Gets the upper left coordinate of this tile
|
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
|
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(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(Object[] data)
Sets the data associated to this tile.
|
void |
setDownloader(Downloader downloader)
Sets the downloader for this tile
|
void |
setDownloaderParams(String key,
Object value)
Sets the Downloader parameters
|
void |
setFile(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(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(String t)
Sets the time instant that this tile belong to.This is useful when the source
is a multidimensional container.
|
void |
setUl(Point2D ul)
Sets the upper left coordinate of this tile
|
void |
setVariable(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(String z)
Sets the Z that this tile belong to.
|
Point2D |
worldToRaster(Point2D pt)
Convierte un punto desde del mundo a coordenadas pixel.
|
protected TileImpl.CancelTaskImpl cancelDownloading
public Object[] getDownloadingImage()
Tile
getDownloadingImage
in interface Tile
public Object[] getCrashImage()
Tile
getCrashImage
in interface Tile
public Object getDownloadingARGB()
Tile
getDownloadingARGB
in interface Tile
public Object getCrashARGB()
Tile
getCrashARGB
in interface Tile
public Point2D worldToRaster(Point2D pt)
pt
- Punto a transformarpublic Tile cloneTile()
public String getVariable()
Tile
getVariable
in interface Tile
public String getZ()
Tile
public String getTimeInstant()
Tile
getTimeInstant
in interface Tile
public void setVariable(String var)
Tile
setVariable
in interface Tile
public void setZ(String z)
Tile
public int getLevel()
Tile
public void setTimeInstant(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 Rectangle2D getCoordsPx()
Tile
getCoordsPx
in interface Tile
public void setCoordsPx(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 Rectangle2D getExtent()
Tile
public Point2D getUl()
Tile
public void setUl(Point2D ul)
Tile
public Point2D getLr()
Tile
public void setLr(Point2D lr)
Tile
public File getFile()
Tile
public void setFile(File file)
Tile
public Downloader getDownloader()
public void setDownloader(Downloader downloader)
Tile
setDownloader
in interface Tile
public Object getDownloaderParams(String key)
Tile
getDownloaderParams
in interface Tile
public void setDownloaderParams(String key, Object value)
Tile
setDownloaderParams
in interface Tile
public void setCorrupt(boolean corrupt)
Tile
setCorrupt
in interface Tile
public boolean isCorrupt()
Tile
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 String getId()
Tile
public int getPriority()
AtomicTask
getPriority
in interface AtomicTask
public void setPriority(int priority)
AtomicTask
setPriority
in interface AtomicTask
public void setData(Object[] data)
Tile
public Object[] getData()
Tile
public int compareTo(AtomicTask o)
compareTo
in interface Comparable<AtomicTask>
public boolean dataIsLoaded()
Tile
dataIsLoaded
in interface Tile