- 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 TypeMethodDescriptionvoidbooleanbooleanaddAll(int index, Collection<? extends Layer> layers) booleanbooleanaddAll(Collection<? extends Layer> layers) voidaddListChangedListener(ListChangedListener<Layer> listener) Adds a listener for added and removed events.voidaddListener(InvalidationListener listener) voidaddListener(ListChangeListener<? super Layer> listener) voidclear()booleanbooleancontainsAll(Collection<?> collection) get(int index) intbooleanisEmpty()iterator()intlastIndexOf(Object object) listIterator(int index) remove(int index) voidremove(int from, int to) booleanbooleanbooleanremoveAll(Collection<?> collection) booleanremoveListChangedListener(ListChangedListener<Layer> listener) Removes the given listener from this class instance.voidremoveListener(InvalidationListener listener) voidremoveListener(ListChangeListener<? super Layer> listener) booleanbooleanretainAll(Collection<?> collection) booleanbooleansetAll(Collection<? extends Layer> col) intsize()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, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface java.util.List
addFirst, addLast, equals, getFirst, getLast, hashCode, removeFirst, removeLast, replaceAll, reversed, sort, spliteratorMethods inherited from interface javafx.collections.ObservableList
filtered, sorted, sorted
-
Method Details
-
add
-
add
-
addAll
-
addAll
-
clear
public void clear() -
contains
-
containsAll
- Specified by:
containsAllin interfaceCollection<Layer>- Specified by:
containsAllin interfaceList<Layer>
-
get
-
indexOf
-
isEmpty
public boolean isEmpty() -
iterator
-
lastIndexOf
- Specified by:
lastIndexOfin interfaceList<Layer>
-
listIterator
- Specified by:
listIteratorin interfaceList<Layer>
-
listIterator
- Specified by:
listIteratorin 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:ListenableListAdds 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:
addListChangedListenerin 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:ListenableListRemoves the given listener from this class instance. It will no longer receive added or removed events.- Specified by:
removeListChangedListenerin interfaceListenableList<Layer>- Parameters:
listener- listener to remove- Returns:
- true if the listenable list contained the given listener, false otherwise
-
addListener
- Specified by:
addListenerin interfaceObservableList<Layer>
-
removeListener
- Specified by:
removeListenerin interfaceObservableList<Layer>
-
addAll
- Specified by:
addAllin interfaceObservableList<Layer>
-
setAll
- Specified by:
setAllin interfaceObservableList<Layer>
-
setAll
- Specified by:
setAllin interfaceObservableList<Layer>
-
removeAll
- Specified by:
removeAllin interfaceObservableList<Layer>
-
retainAll
- Specified by:
retainAllin interfaceObservableList<Layer>
-
remove
public void remove(int from, int to) - Specified by:
removein interfaceObservableList<Layer>
-
addListener
- Specified by:
addListenerin interfaceObservable
-
removeListener
- Specified by:
removeListenerin interfaceObservable
-