public abstract class LayerPositionStrategy extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static LayerPositionStrategy |
AFTER_LAST_DATA_LAYER
A GPX layer is added below the lowest data layer.
|
static LayerPositionStrategy |
AFTER_LAST_VALIDATION_LAYER
A normal layer is added after all validation layers.
|
static LayerPositionStrategy |
BEFORE_FIRST_BACKGROUND_LAYER
The default for background layers: They are added before the first background layer in the list.
|
static LayerPositionStrategy |
IN_FRONT
always inserts at the front of the stack.
|
Constructor and Description |
---|
LayerPositionStrategy() |
Modifier and Type | Method and Description |
---|---|
static LayerPositionStrategy |
afterLast(Predicate<Layer> what)
Creates a strategy that places the layer after the last layer of a given kind or at the beginning of the list if no such layer exists.
|
abstract int |
getPosition(LayerManager manager)
Gets the position where the layer should be inserted
|
static LayerPositionStrategy |
inFrontOf(Layer other)
Gets a
LayerPositionStrategy that inserts this layer in front of a given layer |
static LayerPositionStrategy |
inFrontOfFirst(Predicate<Layer> what)
Gets a
LayerPositionStrategy that inserts the layer in front of the first layer that matches a condition. |
public static final LayerPositionStrategy IN_FRONT
public static final LayerPositionStrategy AFTER_LAST_DATA_LAYER
public static final LayerPositionStrategy AFTER_LAST_VALIDATION_LAYER
public static final LayerPositionStrategy BEFORE_FIRST_BACKGROUND_LAYER
public LayerPositionStrategy()
public static LayerPositionStrategy inFrontOf(Layer other)
LayerPositionStrategy
that inserts this layer in front of a given layerother
- The layer before which to insert this layerpublic static LayerPositionStrategy inFrontOfFirst(Predicate<Layer> what)
LayerPositionStrategy
that inserts the layer in front of the first layer that matches a condition.what
- The condition to match.public static LayerPositionStrategy afterLast(Predicate<Layer> what)
what
- what to search forpublic abstract int getPosition(LayerManager manager)
manager
- The layer manager to insert the layer in.