Class TLcyCompositeGXYLayerTypeProvider

java.lang.Object
com.luciad.lucy.util.TLcyGenericComposite<ILcyGXYLayerTypeProvider>
com.luciad.lucy.map.TLcyCompositeGXYLayerTypeProvider
All Implemented Interfaces:
ILcyGXYLayerType, ILcyGXYLayerTypeProvider, Iterable<ILcyGXYLayerTypeProvider>

public class TLcyCompositeGXYLayerTypeProvider extends TLcyGenericComposite<ILcyGXYLayerTypeProvider> implements ILcyGXYLayerTypeProvider

Composite (see composite design pattern) implementation of ILcyGXYLayerTypeProvider. It keeps a list of associated ILcyGXYLayerTypeProviders. When it needs to provide a layer type, it will delegate to the first suitable layer type provider.

When creating a new TLcyCompositeGXYLayerTypeProvider using the default constructor (see TLcyCompositeGXYLayerTypeProvider()), the created instance will only work on/with the ILcyGXYLayerTypeProviders registered on this composite instance (see addGXYLayerTypeProvider(ILcyGXYLayerTypeProvider) and removeGXYLayerTypeProvider(ILcyGXYLayerTypeProvider)).

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

Retrieving the layer type for an ILcdGXYLayer 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.
 TLcyCompositeGXYLayerTypeProvider provider = new TLcyCompositeGXYLayerTypeProvider( aLucyEnv );
 int layerType = provider.getGXYLayerType( aGXYLayer );
 //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;
 
  • Constructor Details

    • TLcyCompositeGXYLayerTypeProvider

      public TLcyCompositeGXYLayerTypeProvider()

      Default constructor. No ILcyGXYLayerTypeProviders are associated.

      The created instance will only work on the ILcyGXYLayerTypeProvider instances registered to it. If you want to use all registered ILcyGXYLayerTypeProvider instances of the Lucy back-end, use TLcyCompositeGXYLayerTypeProvider(com.luciad.lucy.ILcyLucyEnv) instead.

    • TLcyCompositeGXYLayerTypeProvider

      public TLcyCompositeGXYLayerTypeProvider(ILcyLucyEnv aLucyEnv)

      Construct a TLcyCompositeGXYLayerTypeProvider working on the Lucy back-end

      It will use all ILcyGXYLayerTypeProvider instances registered to the back-end, and adding and/or removing ILcyGXYLayerTypeProviders to/from this TLcyCompositeGXYLayerTypeProvider will respectively add/remove it as service from the back-end.

      If you want to create a TLcyCompositeGXYLayerTypeProvider which does not use the back-end, use TLcyCompositeGXYLayerTypeProvider() instead.

      Parameters:
      aLucyEnv - The Lucy back-end.
      See Also:
  • Method Details