Package com.luciad.view.gxy.asynchronous
Class TLcdGXYAsynchronousLayerMonitor
java.lang.Object
com.luciad.view.gxy.asynchronous.TLcdGXYAsynchronousLayerMonitor
This class monitors the asynchronous painting of a view's layers, allowing to query it for the following purposes:
isGXYLayerPainting(com.luciad.view.gxy.ILcdGXYLayer)
: check if a specific layer is being painted asynchronouslyisGXYLayerBusy(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.
- Since:
- 9.0
-
Constructor Summary
ConstructorDescriptionCreates a new monitor for the asynchronous paint state of all the view's layers. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Starts informing the given listener of all asynchronous painting events of the view's layers.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
Stops informing the given listener of all asynchronous painting events of the view's layers.
-
Constructor Details
-
TLcdGXYAsynchronousLayerMonitor
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
-
isGXYLayerPainting
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
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
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
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.
-