public interface ILcdGXYViewLabelPlacer extends ILcdCloneable
ILcdGXYView
.
ILcdGXYViewLabelPlacer
can manage the free screen space and avoid that the
labels stemming from objects in different ILcdGXYLayer
s overlap. The label painters
of the objects have the knowledge regarding painting the label(s)
of a given object.
The ILcdGXYViewLabelPlacer
has knowledge about the free space in the view.
Notes:
ALcdLabelLocations
. This way the
layer knows which labels need to be painted. Therefore the layers passed in this interface
should be ILcdGXYEditableLabelsLayer
s.Modifier and Type | Interface and Description |
---|---|
static interface |
ILcdGXYViewLabelPlacer.ViewLabelPlacerCallback
A callback interface used by
ILcdGXYViewLabelPlacer . |
Modifier and Type | Method and Description |
---|---|
void |
addStatusListener(ILcdStatusListener aListener)
Adds the given status listener to this view label placer.
|
void |
placeLabels(Graphics aGraphics,
ILcdGXYView aGXYView,
ILcdGXYViewLabelPlacer.ViewLabelPlacerCallback aCallback)
The implementation of this method shall define how to place the labels of all objects in
the various
ILcdGXYLayer s of the given ILcdGXYView . |
void |
placeLabels(Graphics aGraphics,
List<ILcdGXYLayer> aGXYLayers,
ILcdGXYView aGXYView,
ILcdGXYViewLabelPlacer.ViewLabelPlacerCallback aCallback)
The implementation of this method shall define how to place the labels of all objects in
the various
ILcdGXYLayer s from the given List . |
void |
removeStatusListener(ILcdStatusListener aListener)
Removes the given status listener from this view label placer.
|
clone
void placeLabels(Graphics aGraphics, ILcdGXYView aGXYView, ILcdGXYViewLabelPlacer.ViewLabelPlacerCallback aCallback)
ILcdGXYLayer
s of the given ILcdGXYView
. Here one can
implement or use various smart algorithms to check whether or not to place a label at a
certain location.
Layers for which labels are placed should be ILcdGXYEditableLabelsLayer
s. This
method should then inform the ALcdLabelLocations
associated with that layer
which labels were placed, and where they were placed.
This method should only be called once every time the view is invalidated.
aGraphics
- The current Graphics
instance.aGXYView
- The view for which to place the labels.aCallback
- Will be invoked when labels are updated, and when the label placing has ended.ILcdGXYEditableLabelsLayer
,
ALcdLabelLocations.putLabelLocation(java.lang.Object, int, int, com.luciad.view.ILcdView, com.luciad.view.TLcdLabelLocation, int)
,
ALcdLabelLocations.setPainted(java.lang.Object, int, int, com.luciad.view.ILcdView, boolean, int)
void placeLabels(Graphics aGraphics, List<ILcdGXYLayer> aGXYLayers, ILcdGXYView aGXYView, ILcdGXYViewLabelPlacer.ViewLabelPlacerCallback aCallback)
ILcdGXYLayer
s from the given List
. Here one can
implement or use various smart algorithms to check whether or not to place a label at a certain
location.
Layers for which labels are placed should be ILcdGXYEditableLabelsLayer
s. This
method should then inform the ALcdLabelLocations
associated with that layer
which labels were placed, and where they were placed.
This method should only be called once every time the view is invalidated.
aGraphics
- The current Graphics
instance.aGXYLayers
- Only the labels for the layers in this List
will be placed.aGXYView
- The view for which to place the labels.aCallback
- Will be invoked when labels are updated, and when the label placing has ended.ILcdGXYEditableLabelsLayer
,
ALcdLabelLocations.putLabelLocation(java.lang.Object, int, int, com.luciad.view.ILcdView, com.luciad.view.TLcdLabelLocation, int)
,
ALcdLabelLocations.setPainted(java.lang.Object, int, int, com.luciad.view.ILcdView, boolean, int)
void addStatusListener(ILcdStatusListener aListener)
aListener
- a labeling listener.void removeStatusListener(ILcdStatusListener aListener)
aListener
- a labeling listener.