- All Implemented Interfaces:
ListenableList<Layer>
,Iterable<Layer>
,Collection<Layer>
,List<Layer>
,SequencedCollection<Layer>
,Observable
,ObservableList<Layer>
This class is not creatable but layers can be added and removed. Changes to the list can be observed by adding a listener.
If the layers in the list are rendered in a MapView, changes to the list will have an immediate effect on how these layers are rendered in that MapView. If a layer is removed from the list it will disappear from the MapView and vice versa if a layer is added to the list it will be rendered in the MapView.
The order in which layers are rendered in the MapView corresponds with the order of the layers in the list. The layer at index 0 is rendered as the bottom most layer, followed by the layer at index 1 being drawn above 0, and so on.
- Since:
- 100.0.0
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoid
boolean
boolean
addAll
(int index, Collection<? extends Layer> layers) boolean
boolean
addAll
(Collection<? extends Layer> layers) void
addListChangedListener
(ListChangedListener<Layer> listener) Adds a listener for added and removed events.void
addListener
(InvalidationListener listener) void
addListener
(ListChangeListener<? super Layer> listener) void
clear()
boolean
boolean
containsAll
(Collection<?> collection) get
(int index) int
boolean
isEmpty()
iterator()
int
lastIndexOf
(Object object) listIterator
(int index) remove
(int index) void
remove
(int from, int to) boolean
boolean
boolean
removeAll
(Collection<?> collection) boolean
removeListChangedListener
(ListChangedListener<Layer> listener) Removes the given listener from this class instance.void
removeListener
(InvalidationListener listener) void
removeListener
(ListChangeListener<? super Layer> listener) boolean
boolean
retainAll
(Collection<?> collection) boolean
boolean
setAll
(Collection<? extends Layer> col) int
size()
subList
(int start, int end) Object[]
toArray()
<T> T[]
toArray
(T[] array) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
Methods inherited from interface java.util.List
addFirst, addLast, equals, getFirst, getLast, hashCode, removeFirst, removeLast, replaceAll, reversed, sort, spliterator
Methods inherited from interface javafx.collections.ObservableList
filtered, sorted, sorted
-
Method Details
-
add
-
add
-
addAll
-
addAll
-
clear
public void clear() -
contains
-
containsAll
- Specified by:
containsAll
in interfaceCollection<Layer>
- Specified by:
containsAll
in interfaceList<Layer>
-
get
-
indexOf
-
isEmpty
public boolean isEmpty() -
iterator
-
lastIndexOf
- Specified by:
lastIndexOf
in interfaceList<Layer>
-
listIterator
- Specified by:
listIterator
in interfaceList<Layer>
-
listIterator
- Specified by:
listIterator
in interfaceList<Layer>
-
remove
-
remove
-
removeAll
-
retainAll
-
set
-
size
public int size() -
subList
-
toArray
-
toArray
public <T> T[] toArray(T[] array) -
addListChangedListener
Description copied from interface:ListenableList
Adds a listener for added and removed events.Adding this listener on the UI thread will cause it to be invoked on the UI thread, otherwise it is not guaranteed on which thread the listener is invoked.
- Specified by:
addListChangedListener
in interfaceListenableList<Layer>
- Parameters:
listener
- this listener will be called back when items are added to or removed from the list
-
removeListChangedListener
Description copied from interface:ListenableList
Removes the given listener from this class instance. It will no longer receive added or removed events.- Specified by:
removeListChangedListener
in interfaceListenableList<Layer>
- Parameters:
listener
- listener to remove- Returns:
- true if the listenable list contained the given listener, false otherwise
-
addListener
- Specified by:
addListener
in interfaceObservableList<Layer>
-
removeListener
- Specified by:
removeListener
in interfaceObservableList<Layer>
-
addAll
- Specified by:
addAll
in interfaceObservableList<Layer>
-
setAll
- Specified by:
setAll
in interfaceObservableList<Layer>
-
setAll
- Specified by:
setAll
in interfaceObservableList<Layer>
-
removeAll
- Specified by:
removeAll
in interfaceObservableList<Layer>
-
retainAll
- Specified by:
retainAll
in interfaceObservableList<Layer>
-
remove
public void remove(int from, int to) - Specified by:
remove
in interfaceObservableList<Layer>
-
addListener
- Specified by:
addListener
in interfaceObservable
-
removeListener
- Specified by:
removeListener
in interfaceObservable
-