@FunctionalInterface public interface LayerPositionStrategy
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.
|
Modifier and Type | Method and Description |
---|---|
static LayerPositionStrategy |
afterLast(java.util.function.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.
|
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(java.util.function.Predicate<Layer> what)
Gets a
LayerPositionStrategy that inserts the layer in front of the first layer that matches a condition. |
static final LayerPositionStrategy IN_FRONT
static final LayerPositionStrategy AFTER_LAST_DATA_LAYER
static final LayerPositionStrategy AFTER_LAST_VALIDATION_LAYER
static final LayerPositionStrategy BEFORE_FIRST_BACKGROUND_LAYER
static LayerPositionStrategy inFrontOf(Layer other)
LayerPositionStrategy
that inserts this layer in front of a given layerother
- The layer before which to insert this layerstatic LayerPositionStrategy inFrontOfFirst(java.util.function.Predicate<Layer> what)
LayerPositionStrategy
that inserts the layer in front of the first layer that matches a condition.what
- The condition to match.static LayerPositionStrategy afterLast(java.util.function.Predicate<Layer> what)
what
- what to search forint getPosition(LayerManager manager)
manager
- The layer manager to insert the layer in.