Class TLcdGXYAsynchronousViewLabelPainterWrapper

java.lang.Object
com.luciad.view.gxy.asynchronous.TLcdGXYAsynchronousViewLabelPainterWrapper
All Implemented Interfaces:
ILcdGXYViewLabelPainter, Serializable, Cloneable

@Deprecated public class TLcdGXYAsynchronousViewLabelPainterWrapper extends Object implements ILcdGXYViewLabelPainter
Deprecated.
ILcdGXYViewLabelPlacer offers more powerful and flexible decluttering functionality
An implementation of ILcdGXYViewLabelPainter that acts as a wrapper for another ILcdGXYViewLabelPainter, but only delegates paint calls when there are no busy layers in the view.

A busy layer is a layer that is still being painted asynchronously. Painting labels of busy layers locks the Event Dispatch Thread until the painting is complete. This class removes this unwanted behavior by skipping asynchronous layers until they are idle. A consequence of this is that labels and selections will temporarily not be displayed. To reduce the flickering this causes, one can specify a minimum delay before re-displaying skipped content.

Since:
8.0
See Also:
  • Constructor Details

    • TLcdGXYAsynchronousViewLabelPainterWrapper

      public TLcdGXYAsynchronousViewLabelPainterWrapper(ILcdGXYView aView, ILcdGXYViewLabelPainter aViewLabelPainterDelegate, int aSkipDelay)
      Deprecated.
      Constructs a new view label painter, wrapping around the given delegate. Paint requests are only delegated for synchronous and idle asynchronous labels.
      Parameters:
      aView - the view for which to paint labels
      aViewLabelPainterDelegate - to painter to wrap around
      aSkipDelay - how many milliseconds to wait before re-painting skipped labels
  • Method Details

    • paintLabel

      public void paintLabel(Graphics aGraphics, ILcdGXYView aGXYView, int aViewLabelPainterMode)
      Deprecated.
      Description copied from interface: ILcdGXYViewLabelPainter
      The implementation of this method shall define how to paint the labels of all the objects in the various ILcdGXYLayer of the given ILcdGXYView, in the given mode. Here one can implement various smart algorithms to check whether or not to paint a label at a certain location.

      If any layer for which labels are painted is an ILcdGXYEditableLabelsLayer, this method should inform the ALcdLabelLocations associated with that layer which labels have been drawn and which haven't been.

      Specified by:
      paintLabel in interface ILcdGXYViewLabelPainter
      Parameters:
      aGraphics - The Graphics instance on which to paint the labels.
      aGXYView - The view for which to paint the labels. If labels are drawn for a layer that is an instance of ILcdGXYEditableLabelsLayer, its ALcdLabelLocations instance should be informed of which labels have been drawn and which haven't been.
      aViewLabelPainterMode - Determines which labels should be drawn. Should be one of ILcdGXYViewLabelPainter.ALL or ILcdGXYViewLabelPainter.SELECTION
      See Also:
    • paintLabel

      public void paintLabel(Graphics aGraphics, Enumeration aEnumeration, ILcdGXYView aGXYView, int aViewLabelPainterMode)
      Deprecated.
      Description copied from interface: ILcdGXYViewLabelPainter
      The implementation of this method shall define how to paint the labels of all the objects in the various ILcdGXYLayer of the given Enumeration, on the given ILcdGXYView, in the given mode. Here one can implement various smart algorithms to check whether or not to paint a label at a certain location.

      If any layer for which labels are painted is an ILcdGXYEditableLabelsLayer, this method should inform the ALcdLabelLocations associated with that layer which labels have been drawn and which haven't been.

      Specified by:
      paintLabel in interface ILcdGXYViewLabelPainter
      Parameters:
      aGraphics - The Graphics instance on which to paint the labels.
      aEnumeration - Only the labels for the layers contained in this Enumeration will be drawn.
      aGXYView - The ILcdGXYView instance for which to paint the layers.
      aViewLabelPainterMode - Determines which labels should be drawn. Should be one of ILcdGXYViewLabelPainter.ALL or ILcdGXYViewLabelPainter.SELECTION
      See Also:
    • clone

      public Object clone()
      Deprecated.
      Description copied from interface: ILcdGXYViewLabelPainter
      Redefines Object.clone to make it public.
      Specified by:
      clone in interface ILcdGXYViewLabelPainter
      Overrides:
      clone in class Object