public class TLcdEarthGXYRasterPainter extends ALcdEarthGXYPainter implements ILcdStatusSource
ILcdGXYPainter
can paint the raster data of ILcdEarthTileSet
instances in a 2D view.
This painter has been replaced by TLcdGXYImagePainter
. Please consider using it
instead of this one.
ILcdEarthTileSet
that can
produce tiles with raster data. The tile data should however be supported by the createRasterTile(com.luciad.earth.tileset.ALcdEarthTile)
implementation. The default
implementation only supports RenderedImage
s as tile data. The first
coverage in the tile set that can produce tiles with a RenderedImage
will be used
(see chooseTileSetCoverage(com.luciad.earth.tileset.ILcdEarthTileSet)
).
pixel
density
than the view. This behavior can be changed by either setting the quality
or by overriding the chooseTileSetLevel(java.awt.Graphics, int, com.luciad.view.gxy.ILcdGXYContext, com.luciad.shape.ILcdBounds)
method.
If some tiles are not available, the tiles at lower levels will be used automatically to avoid
gaps.
If required this painter will warp the raster data between different coordinate systems,
otherwise it will just paint their linearly scaled images.
The bounds of the tile set will be painted instead of the tiles if the pixel density of the least
detailed level is too high
. There is no limit on the pixel
density by default so the bounds of a tile set will never be painted unless the start resolution
factor is set to a lower value. Typically this is fine for tile sets that cover the entire world
but it may be necessary to lower the start resolution factor if there are multiple smaller tile
sets in a view.
ALcdEarthGXYPainter.isAsynchronousTileRequestAllowed()
and ALcdEarthGXYPainter.isRepaintViewWhenTileAvailable()
should be
set to true
(default).
setCacheSize(int)
). Other tiles will also be cached if there is enough
memory (see isSoftCachingEnabled()
). Tiles that reside in either of these caches will
be updated automatically every minute (see getUpdateInterval()
). You can use the
updateTiles(com.luciad.view.gxy.ILcdGXYView)
method to update all tiles that are
currently cached immediately.
TLcdGXYAsynchronousPaintQueue.setInterruptPainting(boolean)
)defaultCreationFillStyle, defaultCreationLineStyle, defaultFillStyle, defaultLineStyle, fWorkBounds
BODY, CREATING, DEFAULT, HANDLES, RESHAPING, SELECTED, SNAPS, TRANSLATING
Constructor and Description |
---|
TLcdEarthGXYRasterPainter()
Creates a new earth 2D raster painter with the default cache size.
|
TLcdEarthGXYRasterPainter(int aCacheSize)
Creates a new earth 2D raster painter with the given cache size.
|
Modifier and Type | Method and Description |
---|---|
void |
addStatusListener(ILcdStatusListener aStatusListener)
Registers the given listener so it will receive status events from this source.
|
protected TLcdEarthTileFormat |
chooseTileFormat(ILcdEarthTileSet aTileSet,
ILcdEarthTileSetCoverage aCoverage)
Chooses a tile format from the given tile set and coverage to be used for producing tiles.
|
protected ILcdEarthTileSetCoverage |
chooseTileSetCoverage(ILcdEarthTileSet aTileSet)
Chooses a coverage from the given tile set to be drawn by this painter.
|
protected int |
chooseTileSetLevel(Graphics aGraphics,
int aMode,
ILcdGXYContext aContext,
ILcdBounds aViewModelBounds)
Called by
paint(java.awt.Graphics, int, com.luciad.view.gxy.ILcdGXYContext) to choose the level in the tile set that should be painted. |
void |
clearCache()
Clears both the fixed cached cache and the soft cache if it is enabled.
|
void |
clearCache(Object aObject)
Clears both the fixed cached cache and the soft cache, if it is enabled, for an object.
|
Object |
clone()
Makes
Object.clone() public. |
protected ILcdEarthTileSet |
configureBaseTileSet(Object aObject,
ILcdEarthTileSet aTileSet)
Configures the base tile set.
|
protected ILcdEarthTileSet |
createAsynchronousTileSet(Object aObject,
ILcdEarthTileSet aTileSet)
Creates a tile set that can produce tiles asynchronously.
|
protected ILcdTile |
createRasterTile(ALcdEarthTile aTile)
Creates an
ILcdTile corresponding to the specified ALcdEarthTile . |
ILcdGXYPainterStyle |
getBoundsFillStyle()
Returns the style that is used when painting the fill of the bounds of tile set.
|
ILcdGXYPainterStyle |
getBoundsLineStyle()
Returns the style that is used when painting the outline of the bounds of tile set.
|
float |
getBrightness() |
int |
getCacheSize()
Returns the size of the fixed cache which uses hard references (in #tiles).
|
ColorModel |
getColorModel() |
float |
getContrast() |
String |
getDisplayName()
Returns the display name of this
ILcdGXYPainter . |
protected ILcdTile |
getEmptyTile()
Returns a representative empty tile for this painter.
|
int |
getOversamplingRate()
Returns the sampling rate used when transforming the raster.
|
boolean |
getPaintCache()
Returns whether this painter caches the warped raster images it has painted.
|
protected double |
getPixelDensity(int aLevel)
Returns the pixel density of the data (in the tile set reference) at the given level.
|
double |
getQuality()
Returns the current painting quality.
|
protected TLcdEarthTileFormat |
getRequestFormat()
Returns the tile format used to request tiles.
|
RGBImageFilter |
getRGBImageFilter() |
double |
getStartResolutionFactor()
Returns the highest pixel density (number of raster pixels per screen pixel) at which a tile
set is painted.
|
TLcdEarthTileContext |
getTileContext(Object aObject)
Returns the tile context for the most recent paint of an object.
|
protected ILcdEarthTileSet |
getTileSet(Object aObject)
The first time the tile set for an object is retrieved this base tile set is
configured and then wrapped with an
asynchronous tile set to ensure smooth painting. |
float |
getTransparency() |
long |
getUpdateInterval()
Returns the time between two updates for a tile.
|
int |
getWarpBlockSize()
Returns the width and height of the block in which the raster transformation is approximated
using bilinear interpolation.
|
boolean |
isAllowOutdatedTiles()
Returns whether outdated tiles may be returned if an exception occurs while retrieving a tile.
|
boolean |
isAutoIncreaseCacheSize()
Returns whether the size of the fixed cache will be increased automatically if it is too small
to contain all visible tiles at the optimal level of detail.
|
boolean |
isPaintBoundsFill()
Returns whether the fill of the bounds of a tile set is painted.
|
boolean |
isPaintBoundsOutline()
Returns whether the outline of the bounds of a tile set is painted.
|
boolean |
isParentTileRequestAllowed()
Returns whether a request for parent tiles may be made when tiles are requested.
|
boolean |
isSoftCachingEnabled()
Returns whether the soft cache is enabled or not.
|
protected boolean |
isValidCoverage(ILcdEarthTileSetCoverage aCoverage)
Returns whether the given coverage can be drawn by this painter.
|
void |
paint(Graphics aGraphics,
int aMode,
ILcdGXYContext aContext)
Displays the representation of the object in the given mode on the Graphics passed, taking into account the
supplied context.
|
void |
releaseHardReferencedCache()
Releases the hard references to all tiles of all objects painted by this painter.
|
void |
releaseHardReferencedCache(Object aObject)
Releases the hard references to all tiles for a particular object
Normally the painter keeps a hard reference to the set of tiles needed in the last paint.
|
void |
removeStatusListener(ILcdStatusListener aStatusListener)
Removes the specified listener so it is no longer notified.
|
void |
setAllowOutdatedTiles(boolean aAllowOutdatedTiles)
Sets whether outdated tiles may be returned if an exception occurs while retrieving a tile.
|
void |
setAsynchronousTileRequestAllowed(boolean aAsynchronousTileRequestAllowed)
Sets whether the tiles can be requested asynchronously.
|
void |
setAutoIncreaseCacheSize(boolean aAutoIncreaseCacheSize)
Sets whether the size of the fixed cache should be increased automatically if it is too small
to contain all visible tiles at the optimal level of detail.
|
void |
setBoundsFillStyle(ILcdGXYPainterStyle aFillStyle)
Sets the style that is used when painting the fill of the bounds of tile set.
|
void |
setBoundsLineStyle(ILcdGXYPainterStyle aLineStyle)
Sets the style that is used when painting the outline of the bounds of tile set.
|
void |
setBrightness(float aBrightness)
Sets the brightness factor that is applied to painted tiles.
|
void |
setCacheSize(int aCacheSize)
Sets the size of the fixed cache which uses hard references (in #tiles).
|
void |
setColorModel(ColorModel aColorModel)
Sets the ColorModel that determines how a tile pixel is transformed into color components for a
screen pixel.
|
void |
setContrast(float aContrast)
Sets the gamma correction that is applied to painted rasters.
|
void |
setExceptionHandler(ILcdExceptionHandler aExceptionHandler)
Sets the exception handler that is used to handle exceptions that occur during tile retrieval.
|
void |
setObject(Object aObject)
|
void |
setOversamplingRate(int aOverSamplingRate)
Sets the number of samples used per pixel when transforming a raster.
|
void |
setPaintBoundsFill(boolean aPaint)
Sets whether the fill of the bounds of a tile set is painted when the
pixel density is too high . |
void |
setPaintBoundsOutline(boolean aPaint)
Sets whether the outline of the bounds of a tile set is painted when the
pixel density is too high . |
void |
setPaintCache(boolean aCache)
Specifies whether this painter should cache the warped raster images it has painted.
|
void |
setParentTileRequestAllowed(boolean aParentTileRequestAllowed)
Sets whether parent tiles of the visible tiles may be requested.
|
void |
setQuality(double aQuality)
Sets the quality of the painted result.
|
void |
setRepaintViewWhenTileAvailable(boolean aRepaintViewWhenTileAvailable)
Sets whether the view is repainted when a tile becomes available.
|
void |
setRGBImageFilter(RGBImageFilter aRGBImageFilter)
Sets the optional filter that is applied to painted tiles.
|
void |
setSoftCachingEnabled(boolean aSoftCachingEnabled)
Enables or disables the soft cache.
|
void |
setStartResolutionFactor(double aStartResolutionFactor)
Sets the highest pixel density (number of raster pixels per screen pixel) at which a tile set
is painted.
|
void |
setTransparency(float aTransparency)
Sets the transparency factor that is applied to painted tiles.
|
void |
setUpdateInterval(long aTime)
Sets the time between two updates for a tile.
|
void |
setWarpBlockSize(int aWarpBlockSize)
Sets the width and height of the block in which the raster transformation is approximated using
bilinear interpolation.
|
void |
updateTiles(ILcdGXYView aGXYView)
Updates all tiles that are cached in both the fixed cache and the soft cache.
|
void |
updateTiles(Object aObject,
ILcdGXYView aGXYView)
Updates all tiles that are cached in both the fixed cache and the soft cache for an object.
|
boundsSFCT, getExceptionHandler, getObject, getTileSet, getTileSetCoverage, isAsynchronousTileRequestAllowed, isRepaintViewWhenTileAvailable, isTouched
addPropertyChangeListener, anchorPointSFCT, firePropertyChangeEvent, firePropertyChangeEvent, getCursor, getGXYPainter, isTraceOn, removePropertyChangeListener, setClassTraceOn, setDisplayName, setTraceOn, snapTarget, supportSnap
public TLcdEarthGXYRasterPainter(int aCacheSize)
aCacheSize
- the maximum number of entries in the cachegetCacheSize()
public TLcdEarthGXYRasterPainter()
public ColorModel getColorModel()
setColorModel(java.awt.image.ColorModel)
public void setColorModel(ColorModel aColorModel)
createRasterTile(com.luciad.earth.tileset.ALcdEarthTile)
determine the ColorModel.aColorModel
- the color modelpublic RGBImageFilter getRGBImageFilter()
setRGBImageFilter(java.awt.image.RGBImageFilter)
public void setRGBImageFilter(RGBImageFilter aRGBImageFilter)
aRGBImageFilter
- the new image filter or null
public float getTransparency()
setTransparency(float)
public void setTransparency(float aTransparency)
aTransparency
- the transparencypublic float getBrightness()
setBrightness(float)
public void setBrightness(float aBrightness)
aBrightness
- the brightnesspublic float getContrast()
setContrast(float)
public void setContrast(float aContrast)
aContrast
- the contrastpublic void setWarpBlockSize(int aWarpBlockSize)
aWarpBlockSize
- the width and height, expressed in pixels.public int getWarpBlockSize()
setWarpBlockSize(int)
public void setOversamplingRate(int aOverSamplingRate)
(aOverSamplingRate * aOverSamplingRate)
. For instance,
if the oversampling rate is set to 2, the painter will take 4 samples
per pixel and average their values. This increases the image quality,
especially if the raster contains sharp edges, but it also increases
the computational cost.
This property is only relevant for rasters that have to be warped, that
is, when the model reference of the raster is different from the world
reference of the view.aOverSamplingRate
- the number of samples used per pixel in one direction.public int getOversamplingRate()
setOversamplingRate(int)
public int getCacheSize()
setAutoIncreaseCacheSize(boolean)
property.
Next to this cache there is also an optional cache that uses soft references (see isSoftCachingEnabled()
).getCacheSize
in class ALcdEarthGXYPainter
public void setCacheSize(int aCacheSize)
setCacheSize
in class ALcdEarthGXYPainter
aCacheSize
- the new cache sizegetCacheSize()
public void clearCache()
clearCache
in class ALcdEarthGXYPainter
setCacheSize(int)
,
isSoftCachingEnabled()
public void clearCache(Object aObject)
aObject
- the object whose cache should be clearedsetCacheSize(int)
,
isSoftCachingEnabled()
public void releaseHardReferencedCache()
releaseHardReferencedCache(Object)
public void releaseHardReferencedCache(Object aObject)
incremental visualization
, otherwise data might
disappear. However this cache is not cleaned up automatically when the data is not painted anymore (ex. the layer
is set to invisible). In this case you can use this method to allow garbage collection of this data when the memory
is needed for other purposes. So calling this indicates the data may be garbage collected but usually this will
only happen if there is memory pressure.
Typically this method should only be invoked when the object no longer needs to be painted. For example when the
layer is set to invisible.aObject
- the object whose tiles should not be hard-referenced anymorepublic void setAsynchronousTileRequestAllowed(boolean aAsynchronousTileRequestAllowed)
ALcdEarthGXYPainter
setAsynchronousTileRequestAllowed
in class ALcdEarthGXYPainter
aAsynchronousTileRequestAllowed
- True if the tiles can be requested asynchronouslyALcdEarthGXYPainter.isAsynchronousTileRequestAllowed()
public void setRepaintViewWhenTileAvailable(boolean aRepaintViewWhenTileAvailable)
ALcdEarthGXYPainter
setRepaintViewWhenTileAvailable
in class ALcdEarthGXYPainter
aRepaintViewWhenTileAvailable
- whether the view should repainted when a tile becomes
availablepublic void updateTiles(ILcdGXYView aGXYView)
aGXYView
- the view that this painter is painting insetCacheSize(int)
,
isSoftCachingEnabled()
public void updateTiles(Object aObject, ILcdGXYView aGXYView)
aObject
- the object whose tiles should be updatedaGXYView
- the view that this painter is painting insetCacheSize(int)
,
isSoftCachingEnabled()
public boolean isAutoIncreaseCacheSize()
true
if the size of the fixed cache will be increased automatically if it
is too small to containsetCacheSize(int)
public void setAutoIncreaseCacheSize(boolean aAutoIncreaseCacheSize)
aAutoIncreaseCacheSize
- whether if the size of the fixed cache should be increased
automatically if it is too small to containsetCacheSize(int)
public boolean isSoftCachingEnabled()
true
if the soft cache is enabledsetCacheSize(int)
public void setSoftCachingEnabled(boolean aSoftCachingEnabled)
aSoftCachingEnabled
- whether the soft cache should be enabledisSoftCachingEnabled()
public void setPaintCache(boolean aCache)
false
.
This property is only relevant for rasters that have to be warped, that is, when the model reference of the raster is different from the world reference of the view.
public boolean getPaintCache()
setPaintCache(boolean)
public void setUpdateInterval(long aTime)
aTime
- the time in millisecondsgetUpdateInterval()
public long getUpdateInterval()
ILcdEarthTileSet.updateTile(com.luciad.earth.tileset.ALcdEarthTile, com.luciad.earth.tileset.TLcdEarthTileOperationMode, com.luciad.earth.tileset.ILcdEarthTileSetCallback, java.lang.Object)
if they are older than this
time. The tiles will never be updated automatically if Long.MAX_VALUE
is set as
the time. The tiles will be updated continuously if 0
is set as the time.
The default time is 1 minute.public boolean isAllowOutdatedTiles()
true
.true
if outdated tiles may be returned if an exception occurs while
retrieving a tilepublic void setAllowOutdatedTiles(boolean aAllowOutdatedTiles)
aAllowOutdatedTiles
- true
if outdated tiles may be returned if an exception
occurs while retrieving a tileisAllowOutdatedTiles()
public double getQuality()
setQuality(double)
public void setQuality(double aQuality)
0.25
means that 4 pixels in the view will map to one raster value on average. A value of 0 means
that you only the least detailed level will be painted.
The default value is 1.0
.aQuality
- the new qualitypublic void setExceptionHandler(ILcdExceptionHandler aExceptionHandler)
ALcdEarthGXYPainter
setExceptionHandler
in class ALcdEarthGXYPainter
aExceptionHandler
- the exception handlerpublic void setStartResolutionFactor(double aStartResolutionFactor)
Double.POSITIVE_INFINITY
which result in always painting
the tiles.aStartResolutionFactor
- the start resolution factorsetPaintBoundsOutline(boolean)
,
setPaintBoundsFill(boolean)
public double getStartResolutionFactor()
setStartResolutionFactor(double)
public boolean isParentTileRequestAllowed()
setParentTileRequestAllowed(boolean)
public void setParentTileRequestAllowed(boolean aParentTileRequestAllowed)
true
by default, because it benefits user experience (e.g. data is immediately
available when zooming out). Disabling this might be required to support stringent operation conditions
that require the minimum possible amount of tile requests; in this case, only the visible tiles will be
requested.aParentTileRequestAllowed
- whether the parent tiles of the visible tiles may be requestedpublic void setPaintBoundsOutline(boolean aPaint)
pixel density is too high
.
Note that if this flag is set to true
then the bounds line style must be valid.
The default value is true
.aPaint
- true
if the outline of the bounds of a tile set should be painted.setBoundsLineStyle(com.luciad.view.gxy.ILcdGXYPainterStyle)
,
setStartResolutionFactor(double)
public void setPaintBoundsFill(boolean aPaint)
pixel density is too high
.
Note that if this flag is set to true
then the bounds fill style must be valid.
The default value is true
.aPaint
- true
if the fill of the bounds of a tile set should be painted.setBoundsFillStyle(com.luciad.view.gxy.ILcdGXYPainterStyle)
,
setStartResolutionFactor(double)
public boolean isPaintBoundsOutline()
setPaintBoundsOutline(boolean)
public boolean isPaintBoundsFill()
setPaintBoundsFill(boolean)
public void setBoundsLineStyle(ILcdGXYPainterStyle aLineStyle)
null
and paint bounds outline
is enabled the result visual result on screen is undefined.
The default value is a red line style.aLineStyle
- the line style to usesetPaintBoundsOutline(boolean)
public void setBoundsFillStyle(ILcdGXYPainterStyle aFillStyle)
null
and paint bounds fill
is enabled the result visual result on screen is undefined.
The default value is a red hatched fill style.aFillStyle
- the fill style to usesetPaintBoundsFill(boolean)
public ILcdGXYPainterStyle getBoundsLineStyle()
setBoundsLineStyle(com.luciad.view.gxy.ILcdGXYPainterStyle)
public ILcdGXYPainterStyle getBoundsFillStyle()
setBoundsFillStyle(com.luciad.view.gxy.ILcdGXYPainterStyle)
public TLcdEarthTileContext getTileContext(Object aObject)
null
if the specified object has never been painted, if
its cache as been cleared
.
The set of painted tiles may or may not contain some painted tiles if they are no longer available
(for example due to garbage collection).
The returned map will never change and is thread-safe for reading.aObject
- the objectnull
public void setObject(Object aObject)
setObject
in interface ILcdGXYPainter
setObject
in class ALcdEarthGXYPainter
aObject
- the object for which the representation shall be handled by this painter.ILcdGXYPainter.getObject()
protected ILcdEarthTileSet getTileSet(Object aObject)
configured
and then wrapped
with an
asynchronous tile set to ensure smooth painting.getTileSet
in class ALcdEarthGXYPainter
aObject
- the object being paintedprotected ILcdEarthTileSet configureBaseTileSet(Object aObject, ILcdEarthTileSet aTileSet)
aObject
- the object being paintedaTileSet
- the base tile setchooseTileSetCoverage(com.luciad.earth.tileset.ILcdEarthTileSet)
,
getTileSet(Object)
protected ILcdEarthTileSet createAsynchronousTileSet(Object aObject, ILcdEarthTileSet aTileSet)
aObject
- the object being paintedaTileSet
- the tile setTLcdEarthAsynchronousTileSet
,
getTileSet(Object)
protected TLcdEarthTileFormat getRequestFormat()
protected ILcdEarthTileSetCoverage chooseTileSetCoverage(ILcdEarthTileSet aTileSet)
chooseTileSetCoverage
in class ALcdEarthGXYPainter
aTileSet
- the tile set whose tiles are being paintedisValidCoverage(com.luciad.earth.tileset.ILcdEarthTileSetCoverage)
protected boolean isValidCoverage(ILcdEarthTileSetCoverage aCoverage)
createRasterTile(com.luciad.earth.tileset.ALcdEarthTile)
.
The default implementation returns true
if the coverage is a raster coverage
and the tiles set supports a format with RenderedImage
as format class
and no format name with the specified coverage.aCoverage
- the candidate coveragetrue
if the given coverage can be paintedILcdEarthRasterTileSetCoverage
,
ILcdEarthTileSet.isFormatSupported(com.luciad.earth.tileset.ILcdEarthTileSetCoverage,
com.luciad.earth.tileset.TLcdEarthTileFormat)
protected TLcdEarthTileFormat chooseTileFormat(ILcdEarthTileSet aTileSet, ILcdEarthTileSetCoverage aCoverage)
createRasterTile(com.luciad.earth.tileset.ALcdEarthTile)
.
The default implementation returns a format with RenderedImage
as format
class and no format name.aTileSet
- the tile set whose tiles are being paintedaCoverage
- the coverage whose tiles are being painted.public void paint(Graphics aGraphics, int aMode, ILcdGXYContext aContext)
ILcdGXYPainter
The visual representation of an object depends on the context. Depending on the context (e.g. is the location covered by the view), an object may or may not have a representation. The context contains:
The mode passed in this method indicates what part of the object must be painted, whether it should be painted as selected or not, and whether user interaction (via mouse movements) must be taken into account.
When the mode passed contains either TRANSLATING, RESHAPING or CREATING, this method is also responsible for
interpreting interaction on the representation of an object and modifying the representation of the object
accordingly. The painter is not responsible for modifying the object itself, this is done by
a corresponding ILcdGXYEditor
.
Implementations of ILcdGXYPainter
and ILcdGXYEditor
interfaces must be consistent for
an object: the painter must display the result of the user interaction on the object, while the editor is
responsible for modifying the object as a result of the user interaction.
A good practice to ensure a consistent implementation is to implement both the ILcdGXYPainter
and ILcdGXYEditor
interfaces in a single class.
When the mode passed includes SNAPS, the part of the representation which corresponds to the object returned as
snap target by the method snapTarget
must be painted in order to provide the user with a visual indication of the snap target.
The Graphics passed in this method can be different from the Graphics returned by a view due to techniques such as double buffering (as applied in Swing). Basic drawing operations must always be performed on the Graphics passed as an argument in this method.
paint
in interface ILcdGXYPainter
aGraphics
- the Graphics on which the representation of the object is paintedaMode
- the mode the object is represented in (see class documentation).aContext
- the ILcdGXYContext
the drawing depends on.protected int chooseTileSetLevel(Graphics aGraphics, int aMode, ILcdGXYContext aContext, ILcdBounds aViewModelBounds)
paint(java.awt.Graphics, int, com.luciad.view.gxy.ILcdGXYContext)
to choose the level in the tile set that should be painted. Note that
tiles at lower levels may still be painted (ex. if some tiles at the desired level are not
available).
The default implementation chooses a level such that each pixel in the view maps to at least
one raster value, if possible. If the pixel density of the least detailed level
is too high
then -1
is returned.aGraphics
- the graphicsaMode
- the modeaContext
- the contextaViewModelBounds
- the bounds of the view in model coordinates-1
if the bounds should be painted insteadprotected ILcdTile getEmptyTile()
protected ILcdTile createRasterTile(ALcdEarthTile aTile)
ILcdTile
corresponding to the specified ALcdEarthTile
. The resulting raster tile is used in order to draw the
output of a tile set using TLcdRasterPainter
.
The default implementation can only create a tile for tiles with a RenderedImage
as tile data.aTile
- the tile to convert into a raster tileprotected double getPixelDensity(int aLevel)
ILcdEarthRasterTileSetCoverage
and returns its pixel density at the
specified level.aLevel
- a levelILcdEarthRasterTileSetCoverage.getPixelDensity(int)
public String getDisplayName()
ALcdGXYPainter
ILcdGXYPainter
.getDisplayName
in interface ILcdGXYPainter
getDisplayName
in class ALcdGXYPainter
setDisplayName()
, or
this.toString()
if no name has been set.public Object clone()
ILcdCloneable
Makes Object.clone()
public.
java.lang.Object
, it can be implemented like this:
public Object clone() {
try {
return super.clone();
} catch ( CloneNotSupportedException e ) {
// Cannot happen: extends from Object and implements Cloneable (see also Object.clone)
throw new RuntimeException( e );
}
}
clone
in interface ILcdCloneable
clone
in interface ILcdGXYPainterProvider
clone
in class ALcdEarthGXYPainter
Object.clone()
public void addStatusListener(ILcdStatusListener aStatusListener)
ILcdStatusSource
Registers the given listener so it will receive status events from this source.
In case you need to register a listener which keeps a reference to an object with a shorter life-time than this status source,
you can use a ALcdWeakStatusListener
instance as status listener.
addStatusListener
in interface ILcdStatusSource
aStatusListener
- The listener to be notified when the status has changed.public void removeStatusListener(ILcdStatusListener aStatusListener)
ILcdStatusSource
removeStatusListener
in interface ILcdStatusSource
aStatusListener
- The listener to remove.