Class TLcdGXYAsynchronousViewLabelPainterWrapper
- All Implemented Interfaces:
ILcdGXYViewLabelPainter,Serializable,Cloneable
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:
-
Field Summary
Fields inherited from interface com.luciad.view.gxy.ILcdGXYViewLabelPainter
ALL, SELECTION -
Constructor Summary
ConstructorsConstructorDescriptionTLcdGXYAsynchronousViewLabelPainterWrapper(ILcdGXYView aView, ILcdGXYViewLabelPainter aViewLabelPainterDelegate, int aSkipDelay) Deprecated.Constructs a new view label painter, wrapping around the given delegate. -
Method Summary
Modifier and TypeMethodDescriptionclone()Deprecated.RedefinesObject.cloneto make it public.voidpaintLabel(Graphics aGraphics, ILcdGXYView aGXYView, int aViewLabelPainterMode) Deprecated.The implementation of this method shall define how to paint the labels of all the objects in the variousILcdGXYLayerof the givenILcdGXYView, in the given mode.voidpaintLabel(Graphics aGraphics, Enumeration aEnumeration, ILcdGXYView aGXYView, int aViewLabelPainterMode) Deprecated.The implementation of this method shall define how to paint the labels of all the objects in the variousILcdGXYLayerof the given Enumeration, on the givenILcdGXYView, in the given mode.
-
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 labelsaViewLabelPainterDelegate- to painter to wrap aroundaSkipDelay- how many milliseconds to wait before re-painting skipped labels
-
-
Method Details
-
paintLabel
Deprecated.Description copied from interface:ILcdGXYViewLabelPainterThe implementation of this method shall define how to paint the labels of all the objects in the variousILcdGXYLayerof the givenILcdGXYView, 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 theALcdLabelLocationsassociated with that layer which labels have been drawn and which haven't been.- Specified by:
paintLabelin interfaceILcdGXYViewLabelPainter- Parameters:
aGraphics- TheGraphicsinstance 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 ofILcdGXYEditableLabelsLayer, 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 ofILcdGXYViewLabelPainter.ALLorILcdGXYViewLabelPainter.SELECTION- See Also:
-
paintLabel
public void paintLabel(Graphics aGraphics, Enumeration aEnumeration, ILcdGXYView aGXYView, int aViewLabelPainterMode) Deprecated.Description copied from interface:ILcdGXYViewLabelPainterThe implementation of this method shall define how to paint the labels of all the objects in the variousILcdGXYLayerof the given Enumeration, on the givenILcdGXYView, 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 theALcdLabelLocationsassociated with that layer which labels have been drawn and which haven't been.- Specified by:
paintLabelin interfaceILcdGXYViewLabelPainter- Parameters:
aGraphics- TheGraphicsinstance on which to paint the labels.aEnumeration- Only the labels for the layers contained in thisEnumerationwill be drawn.aGXYView- The ILcdGXYView instance for which to paint the layers.aViewLabelPainterMode- Determines which labels should be drawn. Should be one ofILcdGXYViewLabelPainter.ALLorILcdGXYViewLabelPainter.SELECTION- See Also:
-
clone
Deprecated.Description copied from interface:ILcdGXYViewLabelPainterRedefinesObject.cloneto make it public.- Specified by:
clonein interfaceILcdGXYViewLabelPainter- Overrides:
clonein classObject
-