Class TLcyGXYLayerOrderManager

java.lang.Object
com.luciad.lucy.map.TLcyGXYLayerOrderManager
All Implemented Interfaces:
ILcyGXYLayerOrderManager

public class TLcyGXYLayerOrderManager extends Object implements ILcyGXYLayerOrderManager

Implementation of ILcyGXYLayerOrderManager that orders the layers of a given ILcyMapComponent based on their ILcyGXYLayerType and their ILcyModelContentType.

Layers whose layer type is ILcyGXYLayerType.REALTIME are kept above all other layers. Additionally, to optimize performance, the ILcdGXYView.setNumberOfCachedBackgroundLayers flag is automatically updated to be the total layer count minus the amount of those layers. So the REALTIME layers aren't cached to allow them to refresh often.

The remaining layers are sorted on their ILcyModelContentType (the constant values). Layers having the same model content type, are sorted on the ILcyGXYLayerType (except REALTIME layers, which are kept above all others, as explained above).

Note that this ordering is only approximate when layers are also moved otherwise, for example in a layer control GUI.

This class works actively and passively. It works actively when a layer is added using insertGXYLayer. It works passively in the sense that it listens to the associated ILcdGXYView to detect the addition of new layers. When a new layer is added, it is moved to the correct position.