Package com.luciad.lucy.map.asynchronous
Class TLcyGXYAsynchronousLayerEncoder
java.lang.Object
com.luciad.lucy.map.asynchronous.TLcyGXYAsynchronousLayerEncoder
- All Implemented Interfaces:
ILcdGXYLayerEncoder
Asynchronous layer encoder, wrapping around an existing layer encoder.
It allows to easily convert a layer encoder into a layer encoder that supports asynchronous painting.
In particular, it ensures that the encoding does not interfere with asynchronous painting.
-
Constructor Summary
ConstructorDescriptionTLcyGXYAsynchronousLayerEncoder
(ILcyLucyEnv aLucyEnv, ILcdGXYLayerEncoder aLayerEncoder) Creates a new layer workspace codec. -
Method Summary
Modifier and TypeMethodDescriptionboolean
canEncodeGXYLayer
(ILcdGXYLayer aGXYLayer, String aDestinationName) Returns true if the given layer can be encoded to the given destination name.void
encodeGXYLayer
(ILcdGXYLayer aGXYLayer, String aDestinationName) Encodes the given layer to the given destination name.Returns the display name of this encoder.
-
Constructor Details
-
TLcyGXYAsynchronousLayerEncoder
Creates a new layer workspace codec.- Parameters:
aLucyEnv
- Lucy environmentaLayerEncoder
- existing encoder to wrap. Calls pertaining to an asynchronously painted layer will be delegated using a safe layer.
-
-
Method Details
-
getDisplayName
Description copied from interface:ILcdGXYLayerEncoder
Returns the display name of this encoder.- Specified by:
getDisplayName
in interfaceILcdGXYLayerEncoder
- Returns:
- the display name of this encoder.
-
canEncodeGXYLayer
Description copied from interface:ILcdGXYLayerEncoder
Returns true if the given layer can be encoded to the given destination name. Note that implementations using files should verify if the given aDestinationName has the correct extension.- Specified by:
canEncodeGXYLayer
in interfaceILcdGXYLayerEncoder
- Parameters:
aGXYLayer
- The layer to be encoded.aDestinationName
- The destination name to encode the layer to, e.g. a file name, a database name, ...- Returns:
- true if the given layer can be encoded to the given destination name, false otherwise.
- See Also:
-
encodeGXYLayer
Description copied from interface:ILcdGXYLayerEncoder
Encodes the given layer to the given destination name.The method
canEncodeGXYLayer
should returntrue
(for the same arguments) before this method is used.- Specified by:
encodeGXYLayer
in interfaceILcdGXYLayerEncoder
- Parameters:
aGXYLayer
- The layer to encode.aDestinationName
- The destination name to encode the layer to, e.g. a file name, a database name, ...- Throws:
IOException
- In case of io failure.- See Also:
-