Class TLcdGXYLspAsynchronousPaintQueue
java.lang.Object
com.luciad.view.gxy.asynchronous.lightspeed.TLcdGXYLspAsynchronousPaintQueue
- All Implemented Interfaces:
ILcdGXYAsynchronousPaintQueue
public class TLcdGXYLspAsynchronousPaintQueue
extends Object
implements ILcdGXYAsynchronousPaintQueue
Deprecated.
This
Do note that when the used hardware does not support Lightspeed, this paint queue will still be operational and will behave as a TLcdGXYAsynchronousPaintQueue. This implementation only supports a single view. Unless stated otherwise, all methods should be called on the Event Dispatch Thread.
ILcdGXYAsynchronousPaintQueue paints TLcdGXYLspAsynchronousLayerWrapper
instances asynchronously, using off-screen image buffers.
It behaves similarly to TLcdGXYAsynchronousPaintQueue, except that it uses a
TLcdGXYLspAsynchronousLayerWrapper's Lightspeed layer when appropriate (i.e. when painting
the layer's body representation). See TLcdGXYLspAsynchronousLayerWrapper for more
information on using a Lightspeed layer to speed up rendering in an ILcdGXYView.Do note that when the used hardware does not support Lightspeed, this paint queue will still be operational and will behave as a TLcdGXYAsynchronousPaintQueue. This implementation only supports a single view. Unless stated otherwise, all methods should be called on the Event Dispatch Thread.
- Since:
- 2012.0
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDeprecated.Creates a new asynchronous paint queue for the given view. -
Method Summary
Modifier and TypeMethodDescriptionvoidDeprecated.Registers anILcdGXYAsynchronousPaintListenerto be informed of asynchronous painting events.getGXYAsynchronousView(ILcdGXYAsynchronousLayerWrapper aWrapper, int aMode, ILcdGXYView aGXYView) Deprecated.Returns the view on which the asynchronous paint requests are actually executed.Deprecated.Returns the view for which this painter paints asynchronously.intDeprecated.Returns the current thread priority of the internal painting thread.voidinvokeAndWait(Runnable aRunnable) Deprecated.Executes the givenRunnablesynchronously, but without interfering with the paint thread.voidinvokeLater(Runnable aRunnable) Deprecated.Executes the givenRunnablein the paint thread and returns immediately.voidinvokeLaterInEDT(Runnable aRunnable) Deprecated.Executes the givenRunnablein the event dispatch thread and returns immediately.booleanisEmpty()Deprecated.Returns true if the paint queue is not painting and it has no paint requests to finish.voidpaint(Graphics aGraphics, ILcdGXYAsynchronousLayerWrapper aWrapper, int aMode, ILcdGXYView aGXYView) Deprecated.Paints an image of the painted layers using the given graphics.voidDeprecated.Stops informing the givenILcdGXYAsynchronousPaintListenerof asynchronous painting events.voidreset()Deprecated.Clears all cached images and paint requests.voidsetPriority(int aPriority) Deprecated.Sets the thread priority to be used by the internal painting thread.
-
Constructor Details
-
TLcdGXYLspAsynchronousPaintQueue
Deprecated.Creates a new asynchronous paint queue for the given view. The current implementations supports asynchronous painting onTLcdGXYViewJPanel,TLcdGXYViewJPanelLightWeight, andTLcdGXYViewBufferedImageviews. This view must be painted in the event dispatch thread.- Parameters:
aView- the view for which to paint asynchronously
-
-
Method Details
-
getGXYView
Deprecated.Returns the view for which this painter paints asynchronously.- Returns:
- the view for which this painter paints asynchronously
-
paint
public void paint(Graphics aGraphics, ILcdGXYAsynchronousLayerWrapper aWrapper, int aMode, ILcdGXYView aGXYView) Deprecated.Description copied from interface:ILcdGXYAsynchronousPaintQueuePaints an image of the painted layers using the given graphics. If a valid image is not available for the mode, this operation queues an asynchronous paint request, in order to create one. The parent view will then be asked to repaint itself when the asynchronous painting is completed.Note that the paint queue is free to decide if it will execute the paint synchronously or asynchronously (e.g. when confronted with unsupported views).
- Specified by:
paintin interfaceILcdGXYAsynchronousPaintQueue- Parameters:
aGraphics- the graphics to use for paintingaWrapper- the asynchronous layer wrapper that should be paintedaMode- the mode indicating what should be painted, seeILcdGXYLayer.paint(java.awt.Graphics, int, com.luciad.view.gxy.ILcdGXYView).aGXYView- the view for which the layer should be painted.
-
isEmpty
public boolean isEmpty()Deprecated.Description copied from interface:ILcdGXYAsynchronousPaintQueueReturns true if the paint queue is not painting and it has no paint requests to finish. When called on the event dispatch thread, it should guarantee that no painting occurs while the caller holds the thread.- Specified by:
isEmptyin interfaceILcdGXYAsynchronousPaintQueue- Returns:
- true when no painting will occur while the caller holds the thread
-
getGXYAsynchronousView
public ILcdGXYView getGXYAsynchronousView(ILcdGXYAsynchronousLayerWrapper aWrapper, int aMode, ILcdGXYView aGXYView) Deprecated.Description copied from interface:ILcdGXYAsynchronousPaintQueueReturns the view on which the asynchronous paint requests are actually executed. In the painting thread, the asynchronous view replaces the given view when painting the given asynchronous layer with the given painting mode. Its images are then used as image buffers that can be composited in the actual view.- Specified by:
getGXYAsynchronousViewin interfaceILcdGXYAsynchronousPaintQueue- Parameters:
aWrapper- the asynchronous layer wrapper that would be paintedaMode- the mode indicating what should be painted, seeILcdGXYLayer.paint(java.awt.Graphics, int, com.luciad.view.gxy.ILcdGXYView).aGXYView- the original view for which asynchronous paints are meant to be displayed. Paints for unsupported views are executed synchronously.- Returns:
- the view that is used for asynchronous painting
-
invokeAndWait
Deprecated.Description copied from interface:ILcdGXYAsynchronousPaintQueueExecutes the givenRunnablesynchronously, but without interfering with the paint thread. This call blocks until all asynchronous paints and runnables have been processed, and theRunnablereturns. The invocation is executed in the view's paint thread (typically the EDT).- Specified by:
invokeAndWaitin interfaceILcdGXYAsynchronousPaintQueue- Parameters:
aRunnable- theRunnableto execute. Therunmethod should take care when waiting for another thread: if that thread in turn waits for asynchronous painting to complete, a deadlock will occur.- Throws:
InterruptedException- when the thread is interrupted while waiting for the execution to complete
-
invokeLater
Deprecated.Description copied from interface:ILcdGXYAsynchronousPaintQueueExecutes the givenRunnablein the paint thread and returns immediately.- Specified by:
invokeLaterin interfaceILcdGXYAsynchronousPaintQueue- Parameters:
aRunnable- theRunnableto execute. Therunmethod should take care when waiting for another thread: if that thread in turn waits for asynchronous painting to complete, a deadlock will occur.
-
invokeLaterInEDT
Deprecated.Description copied from interface:ILcdGXYAsynchronousPaintQueueExecutes the givenRunnablein the event dispatch thread and returns immediately.- Specified by:
invokeLaterInEDTin interfaceILcdGXYAsynchronousPaintQueue- Parameters:
aRunnable- theRunnableto execute.
-
addGXYAsynchronousPaintListener
Deprecated.Description copied from interface:ILcdGXYAsynchronousPaintQueueRegisters anILcdGXYAsynchronousPaintListenerto be informed of asynchronous painting events. These events will be thrown in the asynchronous painting thread.- Specified by:
addGXYAsynchronousPaintListenerin interfaceILcdGXYAsynchronousPaintQueue- Parameters:
aListener- the listener that should be notified
-
removeGXYAsynchronousPaintListener
Deprecated.Description copied from interface:ILcdGXYAsynchronousPaintQueueStops informing the givenILcdGXYAsynchronousPaintListenerof asynchronous painting events.- Specified by:
removeGXYAsynchronousPaintListenerin interfaceILcdGXYAsynchronousPaintQueue- Parameters:
aListener- the listener that should no longer be notified.
-
getPriority
public int getPriority()Deprecated.Returns the current thread priority of the internal painting thread.- Returns:
- the internal painting thread's priority
-
setPriority
public void setPriority(int aPriority) Deprecated.Sets the thread priority to be used by the internal painting thread.- Parameters:
aPriority- the new priority of the internal painting thread
-
reset
Deprecated.Description copied from interface:ILcdGXYAsynchronousPaintQueueClears all cached images and paint requests. Waits for asynchronous painting to finish.- Specified by:
resetin interfaceILcdGXYAsynchronousPaintQueue- Throws:
InterruptedException- when the thread is interrupted while waiting for the asynchronous paint to complete
-
Lightspeed view.