Class TLcdGXYLspAsynchronousPaintQueue

java.lang.Object
com.luciad.view.gxy.asynchronous.lightspeed.TLcdGXYLspAsynchronousPaintQueue
All Implemented Interfaces:
ILcdGXYAsynchronousPaintQueue

public class TLcdGXYLspAsynchronousPaintQueue extends Object implements ILcdGXYAsynchronousPaintQueue
Deprecated.
Lightspeed integration in GXY views is no longer supported. Instead, either use GXY components only, or switch to a Lightspeed view.
This 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 Details

    • TLcdGXYLspAsynchronousPaintQueue

      public TLcdGXYLspAsynchronousPaintQueue(ILcdGXYView aView)
      Deprecated.
      Creates a new asynchronous paint queue for the given view. The current implementations supports asynchronous painting on TLcdGXYViewJPanel, TLcdGXYViewJPanelLightWeight, and TLcdGXYViewBufferedImage views. This view must be painted in the event dispatch thread.
      Parameters:
      aView - the view for which to paint asynchronously
  • Method Details

    • getGXYView

      public ILcdGXYView 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 interface ILcdGXYAsynchronousPaintQueue
      Parameters:
      aGraphics - the graphics to use for painting
      aWrapper - the asynchronous layer wrapper that should be painted
      aMode - the mode indicating what should be painted, see ILcdGXYLayer.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 interface ILcdGXYAsynchronousPaintQueue
      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 interface ILcdGXYAsynchronousPaintQueue
      Parameters:
      aWrapper - the asynchronous layer wrapper that would be painted
      aMode - the mode indicating what should be painted, see ILcdGXYLayer.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

      public void invokeAndWait(Runnable aRunnable) throws InterruptedException
      Deprecated.
      Description copied from interface: ILcdGXYAsynchronousPaintQueue
      Executes the given Runnable synchronously, but without interfering with the paint thread. This call blocks until all asynchronous paints and runnables have been processed, and the Runnable returns. The invocation is executed in the view's paint thread (typically the EDT).
      Specified by:
      invokeAndWait in interface ILcdGXYAsynchronousPaintQueue
      Parameters:
      aRunnable - the Runnable to execute. The run 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

      public void invokeLater(Runnable aRunnable)
      Deprecated.
      Description copied from interface: ILcdGXYAsynchronousPaintQueue
      Executes the given Runnable in the paint thread and returns immediately.
      Specified by:
      invokeLater in interface ILcdGXYAsynchronousPaintQueue
      Parameters:
      aRunnable - the Runnable to execute. The run 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

      public void invokeLaterInEDT(Runnable aRunnable)
      Deprecated.
      Description copied from interface: ILcdGXYAsynchronousPaintQueue
      Executes the given Runnable in the event dispatch thread and returns immediately.
      Specified by:
      invokeLaterInEDT in interface ILcdGXYAsynchronousPaintQueue
      Parameters:
      aRunnable - the Runnable to execute.
    • addGXYAsynchronousPaintListener

      public void addGXYAsynchronousPaintListener(ILcdGXYAsynchronousPaintListener aListener)
      Deprecated.
      Description copied from interface: ILcdGXYAsynchronousPaintQueue
      Registers an ILcdGXYAsynchronousPaintListener to be informed of asynchronous painting events. These events will be thrown in the asynchronous painting thread.
      Specified by:
      addGXYAsynchronousPaintListener in interface ILcdGXYAsynchronousPaintQueue
      Parameters:
      aListener - the listener that should be notified
    • removeGXYAsynchronousPaintListener

      public void removeGXYAsynchronousPaintListener(ILcdGXYAsynchronousPaintListener aListener)
      Deprecated.
      Description copied from interface: ILcdGXYAsynchronousPaintQueue
      Stops informing the given ILcdGXYAsynchronousPaintListener of asynchronous painting events.
      Specified by:
      removeGXYAsynchronousPaintListener in interface ILcdGXYAsynchronousPaintQueue
      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

      public void reset() throws InterruptedException
      Deprecated.
      Description copied from interface: ILcdGXYAsynchronousPaintQueue
      Clears all cached images and paint requests. Waits for asynchronous painting to finish.
      Specified by:
      reset in interface ILcdGXYAsynchronousPaintQueue
      Throws:
      InterruptedException - when the thread is interrupted while waiting for the asynchronous paint to complete