Package com.luciad.lucy.map
Interface ILcyLayerStyleCodec
- All Known Implementing Classes:
TLcyCompositeLayerStyleCodec
public interface ILcyLayerStyleCodec
This interface models a codec (encoder/decoder) for ILcyLayerStyle objects. The
codec is responsible for storing ILcyLayerStyle objects to some (persistent)
storage, and to restore the ILcyLayerStyle objects later on from that (persistent)
storage.
This functionality is currently only supported for Lightspeed layers.
- Since:
- 2012.0
-
Method Summary
Modifier and TypeMethodDescriptionbooleancanDecode(ILcdLayer aLayer, ILcyLayerStyle aLayerStyle) Returnstruewhen this codec is capable of adjusting the state ofaLayerStyleto match the settings stored in some (persistent) storage.booleancanEncode(ILcdLayer aLayer, ILcyLayerStyle aLayerStyle) Returnstrueif the givenILcyLayerStyle, retrieved fromaLayer, can be encoded by this codec.voiddecode(ILcdLayer aLayer, ILcyLayerStyle aLayerStyleSFCT, InputStream aInputStream) Adjusts the settings ofaLayerStyleSFCTto match those stored inaInputStream.voidencode(ILcdLayer aLayer, ILcyLayerStyle aLayerStyle, OutputStream aOutputStream) Encodes the givenILcyLayerStyleto the givenOutputStream.Returns the display name of this decoder
-
Method Details
-
getDisplayName
String getDisplayName()Returns the display name of this decoder- Returns:
- the display name of this decoder
-
canDecode
Returnstruewhen this codec is capable of adjusting the state ofaLayerStyleto match the settings stored in some (persistent) storage.- Parameters:
aLayer- The layer from whichaLayerStyleis retrievedaLayerStyle- The layer style which will be adjusted in thedecode(com.luciad.view.ILcdLayer, ILcyLayerStyle, java.io.InputStream)method with the stored settings- Returns:
truewhen this decoder is capable of adjusting the state ofaLayerStyleto match the settings stored in some (persistent) storage- See Also:
-
decode
void decode(ILcdLayer aLayer, ILcyLayerStyle aLayerStyleSFCT, InputStream aInputStream) throws IOException, UnsupportedOperationException Adjusts the settings of
aLayerStyleSFCTto match those stored inaInputStream.- Parameters:
aLayer- The layer from whichaLayerStyleSFCTis retrievedaLayerStyleSFCT- The layer style of which the settings must be adjusted to match those stored inaInputStreamaInputStream- The input stream from which the settings can be read- Throws:
IOException- in case of IO failureUnsupportedOperationException- whencanDecodereturnsfalsefor the same layer and layer style- See Also:
-
canEncode
Returnstrueif the givenILcyLayerStyle, retrieved fromaLayer, can be encoded by this codec.- Parameters:
aLayer- The layer from whichaLayerStyleis retrievedaLayerStyle- The style of theaLayer- Returns:
trueifaLayerStylecan be encoded by this codec- See Also:
-
encode
void encode(ILcdLayer aLayer, ILcyLayerStyle aLayerStyle, OutputStream aOutputStream) throws IOException, UnsupportedOperationException Encodes the given
ILcyLayerStyleto the givenOutputStream.- Parameters:
aLayer- The layer from whichaLayerStyleis retrievedaLayerStyle- The style of theaLayeraOutputStream- The output stream to which the style must be encoded.- Throws:
IOException- in case of IO failureUnsupportedOperationException- whencanEncodereturnsfalsefor the same layer and layer style- See Also:
-