Class ObservableCollections
java.lang.Object
org.jdesktop.observablecollections.ObservableCollections
ObservableCollections
provides factory methods for creating
observable lists and maps.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
ObservableListHelper
is created byobservableListHelper
, and useful when changes to individual elements of the list can be tracked. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <E> ObservableList<E>
observableList
(List<E> list) Creates and returns anObservableList
wrapping the suppliedList
.static <E> ObservableCollections.ObservableListHelper<E>
observableListHelper
(List<E> list) Creates and returns anObservableListHelper
wrapping the suppliedList
.static <K,
V> ObservableMap<K, V> observableMap
(Map<K, V> map) Creates and returns anObservableMap
wrapping the suppliedMap
.
-
Constructor Details
-
ObservableCollections
public ObservableCollections()
-
-
Method Details
-
observableMap
Creates and returns anObservableMap
wrapping the suppliedMap
.- Parameters:
map
- theMap
to wrap- Returns:
- an
ObservableMap
- Throws:
IllegalArgumentException
- ifmap
isnull
-
observableList
Creates and returns anObservableList
wrapping the suppliedList
.- Parameters:
list
- theList
to wrap- Returns:
- an
ObservableList
- Throws:
IllegalArgumentException
- iflist
isnull
-
observableListHelper
Creates and returns anObservableListHelper
wrapping the suppliedList
. If you can track changes to the underlying list, use this method instead ofobservableList()
.- Parameters:
list
- theList
to wrap- Returns:
- an
ObservableList
- Throws:
IllegalArgumentException
- iflist
isnull
- See Also:
-