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
-
Method Summary
Modifier and TypeMethodDescriptionint
getInitialLayerIndex
(ILcdLayer aLayer, ILcdLayerTreeNode aLayerNode) Looks at the layer'stype
and determines an initial index as follows: ForBACKGROUND
layers, this method starts from the bottom up and inserts the new layer just below the first layer which is not also a background layer. ForINTERACTIVE
layers, the method starts from the bottom up and inserts the new layer just above the first layer which is not aBACKGROUND
orINTERACTIVE
layer. ForEDITABLE
layers, the method starts from the top down and inserts the new layer just below the first layer which is not aREALTIME
layer.REALTIME
layers are simply added at the top of the layer list.
-
Constructor Details
-
TLspInitialLayerIndexProvider
public TLspInitialLayerIndexProvider()
-
-
Method Details
-
getInitialLayerIndex
Looks at the layer'stype
and determines an initial index as follows:- For
BACKGROUND
layers, 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
INTERACTIVE
layers, the method starts from the bottom up and inserts the new layer just above the first layer which is not aBACKGROUND
orINTERACTIVE
layer. - For
EDITABLE
layers, the method starts from the top down and inserts the new layer just below the first layer which is not aREALTIME
layer. REALTIME
layers are simply added at the top of the layer list.
- Specified by:
getInitialLayerIndex
in 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
-