Class TLcdGXYAsynchronousLayerMonitor

java.lang.Object
com.luciad.view.gxy.asynchronous.TLcdGXYAsynchronousLayerMonitor

public class TLcdGXYAsynchronousLayerMonitor extends Object
This class monitors the asynchronous painting of a view's layers, allowing to query it for the following purposes: All interaction and event throwing is on the Event Dispatch Thread (EDT).

Note: the monitor subscribes itself to paint queues; hence it will not be garbage collected during the paint queues lifetime. The monitor holds references to all the view's current layers.

Since:
9.0
  • Constructor Details

    • TLcdGXYAsynchronousLayerMonitor

      public TLcdGXYAsynchronousLayerMonitor(ILcdGXYView aView)
      Creates a new monitor for the asynchronous paint state of all the view's layers. The monitor detects layer removals, additions and paint queue changes.
      Parameters:
      aView - the view whose layers to monitor
  • Method Details

    • getGXYView

      public ILcdGXYView getGXYView()
    • isGXYLayerPainting

      public boolean isGXYLayerPainting(ILcdGXYLayer aGXYLayer)
      Returns true when the given layer is being painted.
      Parameters:
      aGXYLayer - the layer for which to check if it is being painted asynchronously
      Returns:
      true when it is being painted
    • isGXYLayerBusy

      public boolean isGXYLayerBusy(ILcdGXYLayer aGXYLayer)
      Returns true when the given layer is involved in an asynchronous operation, e.g. being painted or part of a busy paint queue.
      Parameters:
      aGXYLayer - the layer for which to check if it is busy
      Returns:
      true when the layer is busy.
    • addGXYAsynchronousPaintListener

      public void addGXYAsynchronousPaintListener(ILcdGXYAsynchronousPaintListener aListener)
      Starts informing the given listener of all asynchronous painting events of the view's layers.
      Parameters:
      aListener - listener to subscribe. Note that, since a layer can belong to multiple views, the listener is also informed of asynchronous paint events that don't apply to this view.
    • removeGXYAsynchronousPaintListener

      public void removeGXYAsynchronousPaintListener(ILcdGXYAsynchronousPaintListener aListener)
      Stops informing the given listener of all asynchronous painting events of the view's layers.
      Parameters:
      aListener - listener to unsubscribe. The listener is no longer informed of paint events.