Class TLcdGXYCompositeViewLabelPlacer

java.lang.Object
com.luciad.view.gxy.labeling.TLcdGXYCompositeViewLabelPlacer
All Implemented Interfaces:
ILcdCloneable, ILcdGXYViewLabelPlacer, Cloneable

public class TLcdGXYCompositeViewLabelPlacer extends Object implements ILcdGXYViewLabelPlacer
This composite view label placer creates a number of delegate view label placers based on a group ID. It assigns a group ID to every layer. All layers with the same group ID are grouped together. Per group ID, a label placer is created, and all layers to which this group ID is assigned are labeled using the label placer.

A consequence of this is that there can be overlap between labels from layers of different labeling groups.

Because all delegate label placers place their labels independently, it is possible to avoid label placement computations when only layers of one group are invalidated. This class does this using an ILcdGXYViewLabelPlacer. The delegate label placers are only called when at least one of their layers was invalidated. Otherwise, the delegate label placers is not called, and the previous labeling results are reused during painting.

The advantage of using this class is that groups of layers can be labeled completely independently. This makes it possible for example to place labels for a group of fast layers and for a group of slow layers by two different label placers. In that case, the labeling can be executed on two different threads, so they don't block each other. Because of this, the labels of the fast layers will always be up to date. An other advantage is that this class makes it possible to mix synchronous and asynchronous label placing for different groups of layers.

Note: This class will only work correctly when using one of the following ILcdGXYView implementations :

  • TLcdGXYViewBufferedImage
  • TLcdGXYViewJPanel
  • TLcdGXYViewJPanelLightWeight
Since:
10.1