Class TLcyCompositeAsynchronousPaintHintProvider

java.lang.Object
com.luciad.lucy.util.TLcyGenericComposite<ILcyAsynchronousPaintHintProvider>
com.luciad.lucy.map.asynchronous.TLcyCompositeAsynchronousPaintHintProvider
All Implemented Interfaces:
ILcyAsynchronousPaintHintProvider, ILcdGXYAsynchronousPaintHintProvider, Iterable<ILcyAsynchronousPaintHintProvider>

Composite (see composite design pattern) implementation of ILcyAsynchronousPaintHintProvider. It keeps a list of associated ILcyAsynchronousPaintHintProviders. When it needs to provide an asynchronous paint hint, it will delegate to the first suitable paint hint provider.

When creating a new TLcyCompositeAsynchronousPaintHintProvider using the default constructor (see TLcyCompositeAsynchronousPaintHintProvider()), the created instance will only work on/with the ILcyAsynchronousPaintHintProviders registered on this composite instance (see addAsynchronousPaintHintProvider(ILcyAsynchronousPaintHintProvider) and removeAsynchronousPaintHintProvider(ILcyAsynchronousPaintHintProvider)).

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

Retrieving the paint hint 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.
 TLcyCompositeAsynchronousPaintHintProvider provider = new TLcyCompositeAsynchronousPaintHintProvider( aLucyEnv );
 TLcyAsynchronousPaintHint paintHint = provider.getAsynchronousPaintHint( 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;