@Deprecated public class TLcdGXYAsynchronousViewLabelPainterWrapper extends Object implementsILcdGXYViewLabelPainter
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.
ALL, SELECTION
Constructor and Description |
---|
TLcdGXYAsynchronousViewLabelPainterWrapper(ILcdGXYView aView,
ILcdGXYViewLabelPainter aViewLabelPainterDelegate,
int aSkipDelay)
Deprecated.
Constructs a new view label painter, wrapping around the given delegate.
|
Modifier and Type | Method and Description |
---|---|
Object |
clone()
Deprecated.
Redefines
Object.clone to make it public. |
void |
paintLabel(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 various
ILcdGXYLayer of the given Enumeration, on the given
ILcdGXYView , in the given mode. |
void |
paintLabel(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 various
ILcdGXYLayer of the given ILcdGXYView , in the given mode. |
public TLcdGXYAsynchronousViewLabelPainterWrapper(ILcdGXYView aView, ILcdGXYViewLabelPainter aViewLabelPainterDelegate, int aSkipDelay)
aView
- the view for which to paint labelsaViewLabelPainterDelegate
- to painter to wrap aroundaSkipDelay
- how many milliseconds to wait before re-painting skipped labelspublic void paintLabel(Graphics aGraphics, ILcdGXYView aGXYView, int aViewLabelPainterMode)
ILcdGXYViewLabelPainter
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.
paintLabel
in interface ILcdGXYViewLabelPainter
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
ILcdGXYEditableLabelsLayer
,
ALcdLabelLocations.setPainted(java.lang.Object, int, int, com.luciad.view.ILcdView, boolean, int)
public void paintLabel(Graphics aGraphics, Enumeration aEnumeration, ILcdGXYView aGXYView, int aViewLabelPainterMode)
ILcdGXYViewLabelPainter
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.
paintLabel
in interface ILcdGXYViewLabelPainter
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
ILcdGXYEditableLabelsLayer
,
ALcdLabelLocations.setPainted(java.lang.Object, int, int, com.luciad.view.ILcdView, boolean, int)
public Object clone()
ILcdGXYViewLabelPainter
Object.clone
to make it public.clone
in interface ILcdGXYViewLabelPainter
clone
in class Object