Class TLcyAsynchronousPaintAddOn

java.lang.Object
com.luciad.lucy.addons.ALcyAddOn
com.luciad.lucy.addons.ALcyPreferencesAddOn
com.luciad.lucy.addons.asynchronouspaint.TLcyAsynchronousPaintAddOn

public class TLcyAsynchronousPaintAddOn extends ALcyPreferencesAddOn

Add-on for asynchronous painting using layer wrappers. This add-on installs a ALcyAsynchronousPaintFacade that creates ILcdGXYAsynchronousLayerWrapper instances. When added to a map component, these wrappers will paint your layers asynchronously. While the created wrappers are safe to use in combination with the default Lucy controllers and controls, installing this add-on has a number of consequences:

  • you must use one of ALcyAsynchronousPaintFacade's invocation methods if you want to access the wrapped layers
  • you must obtain a model write lock before making changes to models of asynchronously painted layers (see TLcdLockUtil)

Override the createAsynchronousPaintFacade() method to customize the behaviour of this add-on, e.g. installing a new paint queue manager can be achieved by wrapping the default ALcyAsynchronousPaintFacade:


  // override the createAsynchronousPaintFacade method
  protected ALcyAsynchronousPaintFacade createAsynchronousPaintFacade(){
    ALcyAsynchronousPaintFacade delegate = super.createAsynchronousPaintFacade();
    return new ALcyAsynchronousPaintFacade{
       // delegate all methods to the delegate.
       ...
       // use a custom paint queue manager
       public void setupGXYAsynchronousPaintQueueManager( ILcdGXYView aView ){
         ALcdGXYAsynchronousPaintQueueManager myManager = ...
         myManager.setGXYView( aView );
       }

    }
  }
 

Please consult the Lucy developer's guide for more information on asynchronous painting in Lucy.