Class TLcyCompositeLayerStyleCodec
- All Implemented Interfaces:
ILcyLayerStyleCodec,Iterable<TLcyLayerStyleCodecHolder>
Composite implementation of ILcyLayerStyleCodec.
Note: the ILcyLayerStyleCodecs are not directly registered as service to
Lucy, but wrapped with a holder object. This holder object
allows to register the ILcyLayerStyleCodec with some extra information like e.g. an
ALcyFileTypeDescriptor. Using a back-end based TLcyCompositeLayerStyleCodec
will only use the registered TLcyLayerStyleCodecHolder objects, and not for example an
ILcyLayerStyleCodec which was directly (=not wrapped) registered as a service.
- Since:
- 2012.0
- See Also:
-
Field Summary
Fields inherited from class com.luciad.lucy.util.TLcyGenericComposite
PRIORITY_DEFAULT, PRIORITY_FALLBACK -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.TLcyCompositeLayerStyleCodec(ILcyLucyEnv aLucyEnv) Construct aTLcyCompositeLayerStyleCodecworking on the Lucy back-end. -
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 decoderMethods inherited from class com.luciad.lucy.util.TLcyGenericComposite
add, add, getList, getPriority, iterator, removeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
TLcyCompositeLayerStyleCodec
public TLcyCompositeLayerStyleCodec()Default constructor. No
ILcyLayerStyleCodecs are associated.The created instance will only work on the
ILcyLayerStyleCodecinstances registered to it. If you want to use all registeredILcyLayerStyleCodecinstances of the Lucy back-end, useTLcyCompositeLayerStyleCodec(com.luciad.lucy.ILcyLucyEnv)instead.- See Also:
-
TLcyCompositeLayerStyleCodec
Construct a
TLcyCompositeLayerStyleCodecworking on the Lucy back-end.If you want to create a
TLcyCompositeLayerStyleCodecwhich does not use the back-end, useTLcyCompositeLayerStyleCodec()instead.- Parameters:
aLucyEnv- The Lucy back-end- See Also:
-
-
Method Details
-
getDisplayName
Description copied from interface:ILcyLayerStyleCodecReturns the display name of this decoder- Specified by:
getDisplayNamein interfaceILcyLayerStyleCodec- Returns:
- the display name of this decoder
-
canDecode
Description copied from interface:ILcyLayerStyleCodecReturnstruewhen this codec is capable of adjusting the state ofaLayerStyleto match the settings stored in some (persistent) storage.- Specified by:
canDecodein interfaceILcyLayerStyleCodec- Parameters:
aLayer- The layer from whichaLayerStyleis retrievedaLayerStyle- The layer style which will be adjusted in theILcyLayerStyleCodec.decode(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
public void decode(ILcdLayer aLayer, ILcyLayerStyle aLayerStyleSFCT, InputStream aInputStream) throws IOException Description copied from interface:ILcyLayerStyleCodecAdjusts the settings of
aLayerStyleSFCTto match those stored inaInputStream.- Specified by:
decodein interfaceILcyLayerStyleCodec- 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 failure- See Also:
-
canEncode
Description copied from interface:ILcyLayerStyleCodecReturnstrueif the givenILcyLayerStyle, retrieved fromaLayer, can be encoded by this codec.- Specified by:
canEncodein interfaceILcyLayerStyleCodec- Parameters:
aLayer- The layer from whichaLayerStyleis retrievedaLayerStyle- The style of theaLayer- Returns:
trueifaLayerStylecan be encoded by this codec- See Also:
-
encode
public void encode(ILcdLayer aLayer, ILcyLayerStyle aLayerStyle, OutputStream aOutputStream) throws IOException Description copied from interface:ILcyLayerStyleCodecEncodes the given
ILcyLayerStyleto the givenOutputStream.- Specified by:
encodein interfaceILcyLayerStyleCodec- 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 failure- See Also:
-