public class TLcdGXYAsynchronousLayerMonitor extends Object
isGXYLayerPainting(com.luciad.view.gxy.ILcdGXYLayer)
: check if a specific layer is being painted asynchronously
isGXYLayerBusy(com.luciad.view.gxy.ILcdGXYLayer)
: check if a specific layer is involved in an paint queue-related operation
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.
Constructor and Description |
---|
TLcdGXYAsynchronousLayerMonitor(ILcdGXYView aView)
Creates a new monitor for the asynchronous paint state of all the view's layers.
|
Modifier and Type | Method and Description |
---|---|
void |
addGXYAsynchronousPaintListener(ILcdGXYAsynchronousPaintListener aListener)
Starts informing the given listener of all asynchronous painting events of the view's layers.
|
ILcdGXYView |
getGXYView() |
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.
|
boolean |
isGXYLayerPainting(ILcdGXYLayer aGXYLayer)
Returns true when the given layer is being painted.
|
void |
removeGXYAsynchronousPaintListener(ILcdGXYAsynchronousPaintListener aListener)
Stops informing the given listener of all asynchronous painting events of the view's layers.
|
public TLcdGXYAsynchronousLayerMonitor(ILcdGXYView aView)
aView
- the view whose layers to monitorpublic ILcdGXYView getGXYView()
public boolean isGXYLayerPainting(ILcdGXYLayer aGXYLayer)
aGXYLayer
- the layer for which to check if it is being painted asynchronouslypublic boolean isGXYLayerBusy(ILcdGXYLayer aGXYLayer)
aGXYLayer
- the layer for which to check if it is busypublic void addGXYAsynchronousPaintListener(ILcdGXYAsynchronousPaintListener aListener)
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.public void removeGXYAsynchronousPaintListener(ILcdGXYAsynchronousPaintListener aListener)
aListener
- listener to unsubscribe. The listener is no longer informed of paint events.