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
ConstructorDescriptionDeprecated.Creates a new asynchronous paint queue for the given view. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Deprecated.Registers anILcdGXYAsynchronousPaintListener
to 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.int
Deprecated.Returns the current thread priority of the internal painting thread.void
invokeAndWait
(Runnable aRunnable) Deprecated.Executes the givenRunnable
synchronously, but without interfering with the paint thread.void
invokeLater
(Runnable aRunnable) Deprecated.Executes the givenRunnable
in the paint thread and returns immediately.void
invokeLaterInEDT
(Runnable aRunnable) Deprecated.Executes the givenRunnable
in the event dispatch thread and returns immediately.boolean
isEmpty()
Deprecated.Returns true if the paint queue is not painting and it has no paint requests to finish.void
paint
(Graphics aGraphics, ILcdGXYAsynchronousLayerWrapper aWrapper, int aMode, ILcdGXYView aGXYView) Deprecated.Paints an image of the painted layers using the given graphics.void
Deprecated.Stops informing the givenILcdGXYAsynchronousPaintListener
of asynchronous painting events.void
reset()
Deprecated.Clears all cached images and paint requests.void
setPriority
(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
, andTLcdGXYViewBufferedImage
views. 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:ILcdGXYAsynchronousPaintQueue
Paints 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:
paint
in 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:ILcdGXYAsynchronousPaintQueue
Returns 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:
isEmpty
in 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:ILcdGXYAsynchronousPaintQueue
Returns 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:
getGXYAsynchronousView
in 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:ILcdGXYAsynchronousPaintQueue
Executes the givenRunnable
synchronously, but without interfering with the paint thread. This call blocks until all asynchronous paints and runnables have been processed, and theRunnable
returns. The invocation is executed in the view's paint thread (typically the EDT).- Specified by:
invokeAndWait
in interfaceILcdGXYAsynchronousPaintQueue
- Parameters:
aRunnable
- theRunnable
to execute. Therun
method 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:ILcdGXYAsynchronousPaintQueue
Executes the givenRunnable
in the paint thread and returns immediately.- Specified by:
invokeLater
in interfaceILcdGXYAsynchronousPaintQueue
- Parameters:
aRunnable
- theRunnable
to execute. Therun
method 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:ILcdGXYAsynchronousPaintQueue
Executes the givenRunnable
in the event dispatch thread and returns immediately.- Specified by:
invokeLaterInEDT
in interfaceILcdGXYAsynchronousPaintQueue
- Parameters:
aRunnable
- theRunnable
to execute.
-
addGXYAsynchronousPaintListener
Deprecated.Description copied from interface:ILcdGXYAsynchronousPaintQueue
Registers anILcdGXYAsynchronousPaintListener
to be informed of asynchronous painting events. These events will be thrown in the asynchronous painting thread.- Specified by:
addGXYAsynchronousPaintListener
in interfaceILcdGXYAsynchronousPaintQueue
- Parameters:
aListener
- the listener that should be notified
-
removeGXYAsynchronousPaintListener
Deprecated.Description copied from interface:ILcdGXYAsynchronousPaintQueue
Stops informing the givenILcdGXYAsynchronousPaintListener
of asynchronous painting events.- Specified by:
removeGXYAsynchronousPaintListener
in 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:ILcdGXYAsynchronousPaintQueue
Clears all cached images and paint requests. Waits for asynchronous painting to finish.- Specified by:
reset
in interfaceILcdGXYAsynchronousPaintQueue
- Throws:
InterruptedException
- when the thread is interrupted while waiting for the asynchronous paint to complete
-
Lightspeed view
.