Class TLcdGXYLspAsynchronousLayerWrapper
java.lang.Object
com.luciad.view.gxy.asynchronous.TLcdGXYAsynchronousLayerWrapper
com.luciad.view.gxy.asynchronous.lightspeed.TLcdGXYLspAsynchronousLayerWrapper
- All Implemented Interfaces:
ILcdPropertyChangeSource
,ILcdSelection<Object>
,ILcdGXYAsynchronousLayerWrapper
,ILcdGXYLayer
,ILcdLayer
,Serializable
- Direct Known Subclasses:
TLcdGXYLspAsynchronousLayerTreeNodeWrapper
Deprecated.
Asynchronous layer wrapper that partly delegates to a Lightspeed layer for rendering.
It behaves exactly the same as a
TLcdGXYAsynchronousLayerWrapper
, except that it uses
a Lightspeed layer for the body
representation of the layer's
visualization.
This can be useful when you cannot use a Lightspeed view, but you do want to speed up rendering
in your ILcdGXYView
, for example when painting many objects or complex
visualizations such as density or hypsometry data.
The body's visualization is delegated to the given Lightspeed layer. Hence, the layer should
have the same model as the original layer, and it should have an appropriate painter configured
for rendering the bodies of the model's shapes.
All other visualization (labels, selection) and
interaction is delegated to the original ILcdGXYLayer
.
This wrapper needs a special Lightspeed-capable paint queue: TLcdGXYLspAsynchronousPaintQueue
.
Typically it is used as follows:
ILcdGXYLayer originalLayer = ... // original, slow GXY layer
ILspLayer fastLayer = ... // fast Lightspeed layer, only used for rendering
TLcdGXYLspAsynchronousLayerWrapper wrapper = new TLcdGXYLspAsynchronousLayerWrapper( originalLayer, fastLayer );
wrapper.setGXYAsynchronousPaintQueue( new TLcdGXYLspAsynchronousPaintQueue( map ) );
map.addGXYLayer( wrapper );
- Since:
- 2012.0
- See Also:
-
Field Summary
-
Constructor Summary
ConstructorDescriptionTLcdGXYLspAsynchronousLayerWrapper
(ILcdGXYLayer aDecoratedLayer, ILspLayer aLayer) Deprecated.Creates a layer decorator that delegates painting to an asynchronous paint queue.TLcdGXYLspAsynchronousLayerWrapper
(ILcdGXYLayer aDecoratedLayer, ILspLayer aLayer, ILcdGXYAsynchronousPaintQueue aQueue) Deprecated.Creates a layer decorator that delegates painting to an asynchronous paint queue. -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.Returns a state change synchronizer for the wrapped layer.Deprecated.void
Deprecated.Executes the given layer runnable so that the invocation does not interfere with the asynchronous painting.void
Deprecated.Executes the given layer runnable so that the invocation does not interfere with the asynchronous painting.void
Deprecated.Executes the given layer runnable so that the invocation does not interfere with the asynchronous painting.void
Deprecated.Executes the given layer runnable so that the invocation does not interfere with state synchronization.void
Deprecated.Sets the paint queue to delegate asynchronous paint requests to.Methods inherited from class com.luciad.view.gxy.asynchronous.TLcdGXYAsynchronousLayerWrapper
addPropertyChangeListener, addSelectionListener, applyOnInteract, clearSelection, fireCollectedSelectionChanges, firePropertyChangeEvent, getBounds, getGXYAsynchronousPaintQueue, getGXYEditor, getGXYLabelPainter, getGXYLayer, getGXYPainter, getGXYPen, getIcon, getLabel, getLabelMapScaleRange, getLabelScaleRange, getMapScaleRange, getModel, getModelXYWorldTransfoClass, getScaleRange, getSelectionCount, getSynchronousGXYLayerChangeTracker, invokeAndWaitOnGXYLayer, invokeLaterOnGXYLayer, invokeLaterOnGXYLayerInEDT, invokeNowOnGXYLayer, isAsynchronous, isEditable, isEditableSupported, isLabeled, isLabeledSupported, isSelectable, isSelectableSupported, isSelected, isTraceOn, isVisible, paint, removePropertyChangeListener, removeSelectionListener, selectedObjects, selectObject, setAsynchronous, setEditable, setIcon, setLabel, setLabeled, setSelectable, setTraceOn, setVisible, stopPainting
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.luciad.util.ILcdSelection
getSelectedObjects
-
Constructor Details
-
TLcdGXYLspAsynchronousLayerWrapper
Deprecated.Creates a layer decorator that delegates painting to an asynchronous paint queue. After construction, a paint queue must be set usingsetGXYAsynchronousPaintQueue(com.luciad.view.gxy.asynchronous.ILcdGXYAsynchronousPaintQueue)
For thread safety, the given layers should operate synchronously. Hence, aTLcdGXYLspAsynchronousLayerWrapper
should not wrap anotherILcdGXYAsynchronousLayerWrapper
.- Parameters:
aDecoratedLayer
- a synchronous layer that will be delegated to for everything except body visualization. State changes are propagated to and from the wrapper.aLayer
- a synchronous layer for the visualization of the shape's bodies. Wrapper state changes are propagated to this layer.
-
TLcdGXYLspAsynchronousLayerWrapper
public TLcdGXYLspAsynchronousLayerWrapper(ILcdGXYLayer aDecoratedLayer, ILspLayer aLayer, ILcdGXYAsynchronousPaintQueue aQueue) Deprecated.Creates a layer decorator that delegates painting to an asynchronous paint queue.- Parameters:
aDecoratedLayer
- will be delegated to for everything except body visualization.aLayer
- layer for the visualization of the shape's bodies. Wrapper state changes are propagated to this layer.aQueue
- the paint queue that handles the asynchronous paint calls.
-
-
Method Details
-
setGXYAsynchronousPaintQueue
Deprecated.Description copied from interface:ILcdGXYAsynchronousLayerWrapper
Sets the paint queue to delegate asynchronous paint requests to. Paint queues can be shared between multiple layer wrappers. This is even advised, as each paint queue uses memory for buffering the asynchronously generated images.- Specified by:
setGXYAsynchronousPaintQueue
in interfaceILcdGXYAsynchronousLayerWrapper
- Overrides:
setGXYAsynchronousPaintQueue
in classTLcdGXYAsynchronousLayerWrapper
- Parameters:
aQueue
- the asynchronous paint queue responsible for executing the paint calls.
-
getAsynchronousGXYLayerChangeTracker
Deprecated.Description copied from interface:ILcdGXYAsynchronousLayerWrapper
Returns a state change synchronizer for the wrapped layer. The changes will be applied after each asynchronous paint, using the synchronous tracker.- Specified by:
getAsynchronousGXYLayerChangeTracker
in interfaceILcdGXYAsynchronousLayerWrapper
- Overrides:
getAsynchronousGXYLayerChangeTracker
in classTLcdGXYAsynchronousLayerWrapper
- Returns:
- a synchronizer tracking changes for the wrapped layer. To protect the wrapped layer's state, the tracker should only be used in the asynchronous thread, i.e. the paint thread.
-
getLspLayer
Deprecated.- Returns:
- the Lightspeed layer used for the body visualization
-
invokeLaterOnGXYAndLspLayer
Deprecated.Executes the given layer runnable so that the invocation does not interfere with the asynchronous painting. The invocation is executed in the asynchronous paint thread if the layer is painted asynchronously, and in the event dispatch thread otherwise. The method always returns immediately.
The invocation should take care when waiting for another thread: if that thread in turn waits for asynchronous painting to complete, a deadlock will occur.
To avoid concurrency problems with property change listeners, layer property changes will be fired on the event dispatch thread, not on the asynchronous paint thread.
- Parameters:
aRunnable
- the invocation to run. The invocation will pass the original Lightspeed and GXY layer.
-
invokeAndWaitOnGXYAndLspLayer
public void invokeAndWaitOnGXYAndLspLayer(ILcdGXYLspAsynchronousLayerRunnable aRunnable) throws InterruptedException Deprecated.Executes the given layer runnable so that the invocation does not interfere with the asynchronous painting. The painting is executed in the event dispatch thread. The method waits until the invocation has stopped.- Parameters:
aRunnable
- the invocation to run. The invocation will pass the original Lightspeed and GXY layer.- Throws:
InterruptedException
- when the thread is interrupted while waiting for the asynchronous painting to complete
-
invokeNowOnGXYAndLspLayer
Deprecated.Executes the given layer runnable so that the invocation does not interfere with state synchronization. The invocation is executed in the caller's thread. The method waits until the invocation has stopped. during the invocation, asynchronous painting may occur, so care is advised.- Parameters:
aRunnable
- the invocation to run. The invocation will pass the original Lightspeed and GXY layer.
-
invokeLaterOnGXYAndLspLayerInEDT
Deprecated.Executes the given layer runnable so that the invocation does not interfere with the asynchronous painting. The invocation is executed in the event dispatch thread. The method always returns immediately.- Parameters:
aRunnable
- the invocation to run. The invocation will pass the original Lightspeed and GXY layer.
-
Lightspeed view
.