Package com.luciad.view.lightspeed.layer
Class TLspInitialLayerIndexProvider
java.lang.Object
com.luciad.view.lightspeed.layer.TLspInitialLayerIndexProvider
- All Implemented Interfaces:
ILcdInitialLayerIndexProvider
Default implementation of
ILcdInitialLayerIndexProvider for
Lightspeed views. This implementation sorts layers based on their layer
type:
background layers are moved to the bottom and realtime layers are moved to
the top.- Since:
- 2012.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintgetInitialLayerIndex(ILcdLayer aLayer, ILcdLayerTreeNode aLayerNode) Looks at the layer'stypeand determines an initial index as follows: ForBACKGROUNDlayers, this method starts from the bottom up and inserts the new layer just below the first layer which is not also a background layer. ForINTERACTIVElayers, the method starts from the bottom up and inserts the new layer just above the first layer which is not aBACKGROUNDorINTERACTIVElayer. ForEDITABLElayers, the method starts from the top down and inserts the new layer just below the first layer which is not aREALTIMElayer.REALTIMElayers are simply added at the top of the layer list.
-
Constructor Details
-
TLspInitialLayerIndexProvider
public TLspInitialLayerIndexProvider()
-
-
Method Details
-
getInitialLayerIndex
Looks at the layer'stypeand determines an initial index as follows:- For
BACKGROUNDlayers, this method starts from the bottom up and inserts the new layer just below the first layer which is not also a background layer. - For
INTERACTIVElayers, the method starts from the bottom up and inserts the new layer just above the first layer which is not aBACKGROUNDorINTERACTIVElayer. - For
EDITABLElayers, the method starts from the top down and inserts the new layer just below the first layer which is not aREALTIMElayer. REALTIMElayers are simply added at the top of the layer list.
- Specified by:
getInitialLayerIndexin interfaceILcdInitialLayerIndexProvider- Parameters:
aLayer- The layer for which to determine a good initial index.aLayerNode- The layer node in which the layer is about to be inserted. This could be the root node of a view, or any of its sub-nodes.- Returns:
- the index at which the given layer should be inserted into the layer list
- For
-