Interface ILcdGXYViewLabelPlacer
- All Superinterfaces:
Cloneable,ILcdCloneable
- All Known Implementing Classes:
TLcdGXYAsynchronousLabelPlacer,TLcdGXYCompositeViewLabelPlacer,TLcdGXYLabelPlacer
ILcdGXYView.
ILcdGXYViewLabelPlacer can manage the free screen space and avoid that the
labels stemming from objects in different ILcdGXYLayers 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:
- The implementations of this class should set the label locations of the placed labels and
mark them as painted in the layers
ALcdLabelLocations. This way the layer knows which labels need to be painted. Therefore the layers passed in this interface should beILcdGXYEditableLabelsLayers. - All methods of this interface should be called on the AWT-thread.
- Since:
- 10.1
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceA callback interface used byILcdGXYViewLabelPlacer. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddStatusListener(ILcdStatusListener aListener) Adds the given status listener to this view label placer.voidplaceLabels(Graphics aGraphics, ILcdGXYView aGXYView, ILcdGXYViewLabelPlacer.ViewLabelPlacerCallback aCallback) The implementation of this method shall define how to place the labels of all objects in the variousILcdGXYLayers of the givenILcdGXYView.voidplaceLabels(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 variousILcdGXYLayers from the givenList.voidremoveStatusListener(ILcdStatusListener aListener) Removes the given status listener from this view label placer.Methods inherited from interface com.luciad.util.ILcdCloneable
clone
-
Method Details
-
placeLabels
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 variousILcdGXYLayers of the givenILcdGXYView. 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
ILcdGXYEditableLabelsLayers. This method should then inform theALcdLabelLocationsassociated 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.
- Parameters:
aGraphics- The currentGraphicsinstance.aGXYView- The view for which to place the labels.aCallback- Will be invoked when labels are updated, and when the label placing has ended.- See Also:
-
placeLabels
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 variousILcdGXYLayers from the givenList. 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
ILcdGXYEditableLabelsLayers. This method should then inform theALcdLabelLocationsassociated 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.
- Parameters:
aGraphics- The currentGraphicsinstance.aGXYLayers- Only the labels for the layers in thisListwill 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.- See Also:
-
addStatusListener
Adds the given status listener to this view label placer. Whenever an event occurs concerning the labeling process, this listener is notified.- Parameters:
aListener- a labeling listener.
-
removeStatusListener
Removes the given status listener from this view label placer. After calling this method, the given listener will not be notified anymore.- Parameters:
aListener- a labeling listener.
-