public class TLspInitialLayerIndexProvider extends Object implements ILcdInitialLayerIndexProvider
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.Constructor and Description |
---|
TLspInitialLayerIndexProvider() |
Modifier and Type | Method and Description |
---|---|
int |
getInitialLayerIndex(ILcdLayer aLayer,
ILcdLayerTreeNode aLayerNode)
Looks at the layer's
type
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 a
BACKGROUND or INTERACTIVE layer.
For EDITABLE layers, the method starts from the top down and
inserts the new layer just below the first layer which is not a
REALTIME layer.
REALTIME layers are simply added at the top of the layer
list.
|
public int getInitialLayerIndex(ILcdLayer aLayer, ILcdLayerTreeNode aLayerNode)
type
and determines an initial index as follows:
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.INTERACTIVE
layers, the method starts from the bottom up and
inserts the new layer just above the first layer which is not a
BACKGROUND
or INTERACTIVE
layer.EDITABLE
layers, the method starts from the top down and
inserts the new layer just below the first layer which is not a
REALTIME
layer.REALTIME
layers are simply added at the top of the layer
list.getInitialLayerIndex
in interface ILcdInitialLayerIndexProvider
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.