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
ConstructorsConstructorDescriptionTLcyGXYAsynchronousLayerDecoder(ILcyLucyEnv aLucyEnv, ILcdGXYLayerDecoder aLayerDecoder, ILcdFilter aAsynchronousLayerFilter) Creates a new layer workspace codec. -
Method Summary
Modifier and TypeMethodDescriptionbooleancanDecodeGXYLayer(ILcdModel aModel, String aSourceName) Returns true if anILcdGXYLayercan be decoded from a given source name.decodeGXYLayer(ILcdModel aModel, String aSourceName) This method decodes anILcdGXYLayerfor representing anILcdModelon 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:ILcdGXYLayerDecoderReturns the display name of this encoder.- Specified by:
getDisplayNamein interfaceILcdGXYLayerDecoder- Returns:
- the display name of this encoder.
-
canDecodeGXYLayer
Description copied from interface:ILcdGXYLayerDecoderReturns true if anILcdGXYLayercan be decoded from a given source name. Note that implementations using files should verify if the given aSourceName has the correct extension.- Specified by:
canDecodeGXYLayerin interfaceILcdGXYLayerDecoder- Parameters:
aModel- TheILcdModelof theILcdGXYLayerto decode.aSourceName- The source name of the layer, e.g. a file name or a database name, ...- Returns:
- true if an
ILcdGXYLayercan be decoded from a given source name, false otherwise. - See Also:
-
decodeGXYLayer
This method decodes anILcdGXYLayerfor representing anILcdModelon 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:
decodeGXYLayerin 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:
-