Package org.mapsforge.map.layer
Class Layers
- java.lang.Object
-
- org.mapsforge.map.layer.Layers
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(int index, Layer layer)Adds a new layer at the specified position.voidadd(int index, Layer layer, boolean redraw)Adds a new layer at the specified position.voidadd(Layer layer)Adds a new layer on top.voidadd(Layer layer, boolean redraw)Adds a new layer on top.voidadd(Layer layer, int group)Adds a new layer using layer groups.voidadd(Layer layer, int group, boolean redraw)Adds a new layer using layer groups.booleanaddAll(int index, java.util.Collection<Layer> layers)Adds multiple new layers at the specified position.booleanaddAll(int index, java.util.Collection<Layer> layers, boolean redraw)Adds multiple new layers at the specified position.booleanaddAll(java.util.Collection<Layer> layers)Adds multiple new layers on top.booleanaddAll(java.util.Collection<Layer> layers, boolean redraw)Adds multiple new layers on top.booleanaddAll(java.util.Collection<Layer> layers, int group)Adds multiple new layers using layer groups.booleanaddAll(java.util.Collection<Layer> layers, int group, boolean redraw)Adds multiple new layers using layer groups.voidaddGroup(int group)Adds a new layer group.voidclear()Removes all layers.voidclear(boolean redraw)Removes all layers.booleancontains(Layer layer)Layerget(int index)intindexOf(Layer layer)booleanisEmpty()java.util.Iterator<Layer>iterator()Layerremove(int index)Removes a layer.Layerremove(int index, boolean redraw)Removes a layer.booleanremove(Layer layer)Removes a layer.booleanremove(Layer layer, boolean redraw)Removes a layer.booleanremoveAll(java.util.Collection<Layer> layers)Removes multiple layers.booleanremoveAll(java.util.Collection<Layer> layers, boolean redraw)Removes multiple layers.intsize()
-
-
-
Method Detail
-
add
public void add(int index, Layer layer)Adds a new layer at the specified position. Note: By default a redraw will take place afterwards. To avoid this, useadd(int, Layer, boolean).- Parameters:
index- The position at which to add the new layer (the lowest layer has position 0)layer- The new layer to add- See Also:
List.add(int, Object)
-
add
public void add(int index, Layer layer, boolean redraw)Adds a new layer at the specified position.- Parameters:
index- The position at which to add the new layer (the lowest layer has position 0)layer- The new layer to addredraw- Whether the map should be redrawn after adding the layer- See Also:
List.add(int, Object)
-
add
public void add(Layer layer)
Adds a new layer on top. Note: By default a redraw will take place afterwards. To avoid this, useadd(Layer, boolean).- Parameters:
layer- The new layer to add- See Also:
List.add(Object)
-
add
public void add(Layer layer, boolean redraw)
Adds a new layer on top.- Parameters:
layer- The new layer to addredraw- Whether the map should be redrawn after adding the layer- See Also:
List.add(Object)
-
add
public void add(Layer layer, int group)
Adds a new layer using layer groups. Note: By default a redraw will take place afterwards. To avoid this, useadd(Layer, int, boolean).- Parameters:
layer- The new layer to addgroup- The layer group- See Also:
List.add(Object)
-
add
public void add(Layer layer, int group, boolean redraw)
Adds a new layer using layer groups.- Parameters:
layer- The new layer to addgroup- The layer groupredraw- Whether the map should be redrawn after adding the layer- See Also:
List.add(Object)
-
addAll
public boolean addAll(java.util.Collection<Layer> layers)
Adds multiple new layers on top. Note: By default a redraw will take place afterwards. To avoid this, useaddAll(Collection, boolean).- Parameters:
layers- The new layers to add- See Also:
List.addAll(Collection)
-
addAll
public boolean addAll(java.util.Collection<Layer> layers, boolean redraw)
Adds multiple new layers on top.- Parameters:
layers- The new layers to addredraw- Whether the map should be redrawn after adding the layers- See Also:
List.addAll(Collection)
-
addAll
public boolean addAll(int index, java.util.Collection<Layer> layers)Adds multiple new layers at the specified position. Note: By default a redraw will take place afterwards. To avoid this, useaddAll(int, Collection, boolean).- Parameters:
index- The position at which to add the new layers (the lowest layer has position 0)layers- The new layers to add- See Also:
List.addAll(int, Collection)
-
addAll
public boolean addAll(int index, java.util.Collection<Layer> layers, boolean redraw)Adds multiple new layers at the specified position.- Parameters:
index- The position at which to add the new layers (the lowest layer has position 0)layers- The new layers to addredraw- Whether the map should be redrawn after adding the layers- See Also:
List.addAll(int, Collection)
-
addAll
public boolean addAll(java.util.Collection<Layer> layers, int group)
Adds multiple new layers using layer groups. Note: By default a redraw will take place afterwards. To avoid this, useaddAll(Collection, int, boolean).- Parameters:
layers- The new layers to addgroup- The layer group- See Also:
List.addAll(Collection)
-
addAll
public boolean addAll(java.util.Collection<Layer> layers, int group, boolean redraw)
Adds multiple new layers using layer groups.- Parameters:
layers- The new layers to addgroup- The layer groupredraw- Whether the map should be redrawn after adding the layers- See Also:
List.addAll(Collection)
-
addGroup
public void addGroup(int group)
Adds a new layer group.- Parameters:
group- The layer group
-
clear
public void clear()
Removes all layers. Note: By default a redraw will take place afterwards. To avoid this, useclear(boolean).- See Also:
List.clear()
-
clear
public void clear(boolean redraw)
Removes all layers.- Parameters:
redraw- Whether the map should be redrawn after removing the layers- See Also:
List.clear()
-
contains
public boolean contains(Layer layer)
- See Also:
List.contains(Object)
-
get
public Layer get(int index)
- See Also:
List.get(int)
-
indexOf
public int indexOf(Layer layer)
- See Also:
List.indexOf(Object)
-
isEmpty
public boolean isEmpty()
- See Also:
List.isEmpty()
-
iterator
public java.util.Iterator<Layer> iterator()
- Specified by:
iteratorin interfacejava.lang.Iterable<Layer>- See Also:
List.iterator()
-
remove
public Layer remove(int index)
Removes a layer. Note: By default a redraw will take place afterwards. To avoid this, useremove(int, boolean).- Parameters:
index- The index of the layer to remove- See Also:
List.remove(int)
-
remove
public Layer remove(int index, boolean redraw)
Removes a layer.- Parameters:
index- The index of the layer to removeredraw- Whether the map should be redrawn after removing the layer- See Also:
List.remove(int)
-
remove
public boolean remove(Layer layer)
Removes a layer. Note: By default a redraw will take place afterwards. To avoid this, useremove(Layer, boolean).- Parameters:
layer- The layer to remove- See Also:
List.remove(Object)
-
remove
public boolean remove(Layer layer, boolean redraw)
Removes a layer.- Parameters:
layer- The layer to removeredraw- Whether the map should be redrawn after removing the layer- See Also:
List.remove(Object)
-
removeAll
public boolean removeAll(java.util.Collection<Layer> layers)
Removes multiple layers. Note: By default a redraw will take place afterwards. To avoid this, useremoveAll(Collection, boolean).- Parameters:
layers- The layers to remove- See Also:
List.removeAll(Collection)
-
removeAll
public boolean removeAll(java.util.Collection<Layer> layers, boolean redraw)
Removes multiple layers.- Parameters:
layers- The layers to removeredraw- Whether the map should be redrawn after removing the layers- See Also:
List.removeAll(Collection)
-
size
public int size()
- See Also:
List.size()
-
-