Package com.luciad.lucy.map.asynchronous
Class TLcyGXYAsynchronousLayerDecoder
java.lang.Object
com.luciad.lucy.map.asynchronous.TLcyGXYAsynchronousLayerDecoder
- All Implemented Interfaces:
ILcdGXYLayerDecoder
Asynchronous layer decoder, wrapping around an existing layer decoder.
It allows to easily convert a layer decoder into a layer decoder that supports asynchronous painting:
the wrapper enables asynchronous painting for the wrapped decoder's created layers.
-
Constructor Summary
ConstructorDescriptionTLcyGXYAsynchronousLayerDecoder
(ILcyLucyEnv aLucyEnv, ILcdGXYLayerDecoder aLayerDecoder, ILcdFilter aAsynchronousLayerFilter) Creates a new layer workspace codec. -
Method Summary
Modifier and TypeMethodDescriptionboolean
canDecodeGXYLayer
(ILcdModel aModel, String aSourceName) Returns true if anILcdGXYLayer
can be decoded from a given source name.decodeGXYLayer
(ILcdModel aModel, String aSourceName) This method decodes anILcdGXYLayer
for representing anILcdModel
on anILcdGXYView
.Returns the display name of this encoder.
-
Constructor Details
-
TLcyGXYAsynchronousLayerDecoder
public TLcyGXYAsynchronousLayerDecoder(ILcyLucyEnv aLucyEnv, ILcdGXYLayerDecoder aLayerDecoder, ILcdFilter aAsynchronousLayerFilter) Creates a new layer workspace codec.- Parameters:
aLucyEnv
- Lucy environmentaLayerDecoder
- existing decoder to wrap. Created layers will be made asynchronous.aAsynchronousLayerFilter
- the filter to use to determine if a created layer should be painted asynchronously. If null, all created layers are painted asynchronously.
-
-
Method Details
-
getDisplayName
Description copied from interface:ILcdGXYLayerDecoder
Returns the display name of this encoder.- Specified by:
getDisplayName
in interfaceILcdGXYLayerDecoder
- Returns:
- the display name of this encoder.
-
canDecodeGXYLayer
Description copied from interface:ILcdGXYLayerDecoder
Returns true if anILcdGXYLayer
can be decoded from a given source name. Note that implementations using files should verify if the given aSourceName has the correct extension.- Specified by:
canDecodeGXYLayer
in interfaceILcdGXYLayerDecoder
- Parameters:
aModel
- TheILcdModel
of theILcdGXYLayer
to decode.aSourceName
- The source name of the layer, e.g. a file name or a database name, ...- Returns:
- true if an
ILcdGXYLayer
can be decoded from a given source name, false otherwise. - See Also:
-
decodeGXYLayer
This method decodes anILcdGXYLayer
for representing anILcdModel
on anILcdGXYView
. It creates a layer using the wrapped decoder and makes it asynchronous if it is accepted by the asynchronous layer filter, usingALcyAsynchronousPaintFacade.createGXYAsynchronousLayer(com.luciad.view.gxy.ILcdGXYLayer)
- Specified by:
decodeGXYLayer
in interfaceILcdGXYLayerDecoder
- Parameters:
aModel
- the model for which to create a layeraSourceName
- The source name of the layer, e.g. a file name or a database name, ...- Returns:
- a synchronously or asynchronously painted
ILcdGXYLayer
- Throws:
IOException
- In case of an io failure.- See Also:
-