Class TLcyCompositeLayerStyleProvider

java.lang.Object
com.luciad.lucy.util.TLcyGenericComposite<ILcyLayerStyleProvider>
com.luciad.lucy.map.TLcyCompositeLayerStyleProvider
All Implemented Interfaces:
ILcyLayerStyleProvider, Iterable<ILcyLayerStyleProvider>

public class TLcyCompositeLayerStyleProvider extends TLcyGenericComposite<ILcyLayerStyleProvider> implements ILcyLayerStyleProvider

A composite implementation of ILcyModelContentTypeProvider according to the composite design pattern.

When creating a new TLcyCompositeLayerStyleProvider using the default constructor (see TLcyCompositeLayerStyleProvider()), the created instance will only work on/with the ILcyLayerStyleProviders registered on this composite instance (see addLayerStyleProvider(ILcyLayerStyleProvider) and removeLayerStyleProvider(ILcyLayerStyleProvider)).

When creating a new TLcyCompositeLayerStyleProvider using the constructor specifying an ILcyLucyEnv instance (see TLcyCompositeLayerStyleProvider(com.luciad.lucy.ILcyLucyEnv), the created instance will work on the Lucy back-end services. It will use all registered ILcyLayerStyleProvider instances of the Lucy back-end, adding and/or removing an ILcyLayerStyleProvider will add/remove the ILcyLayerStyleProvider as service from Lucy, ... .

Retrieving the style for an ILcdLayer using the back-end based implementation can be done by creating a new instance of this class:


 //Create a new instance whenever you need it.
 TLcyCompositeLayerStyleProvider provider = new TLcyCompositeLayerStyleProvider( aLucyEnv );
 if( provider.canGetStyle( aLayer ) ){
   ILcyLayerStyle layerStyle = provider.getStyle( aLayer );
 }
 //There is no need to keep a reference to the composite instance, you can create a new one
 //the next time you would need it
 provider = null;
 
Since:
10.0