Spec-Zone .ru
спецификации, руководства, описания, API
|
private static class FXCollections.UnmodifiableObservableListImpl<T> extends java.util.AbstractList<T> implements ObservableList<T>
Constructor and Description |
---|
FXCollections.UnmodifiableObservableListImpl(ObservableList<T> backingList) |
Modifier and Type | Method and Description |
---|---|
boolean |
addAll(T... elements)
A convenient method for var-arg adding of elements.
|
void |
addListener(InvalidationListener listener)
Adds an
InvalidationListener which will be notified whenever the
Observable becomes invalid. |
void |
addListener(ListChangeListener<? super T> o)
Add a listener to this observable list.
|
T |
get(int index) |
void |
remove(int from,
int to)
Basically a shortcut to sublist(from, to).clear()
As this is a common operation, ObservableList has this method for convenient usage.
|
boolean |
removeAll(T... elements)
A convenient method for var-arg usage of removaAll method.
|
void |
removeListener(InvalidationListener listener)
Removes the given listener from the list of listeners, that are notified
whenever the value of the
Observable becomes invalid. |
void |
removeListener(ListChangeListener<? super T> o)
Tries to removed a listener from this observable list.
|
boolean |
retainAll(T... elements)
A convenient method for var-arg usage of retain method.
|
boolean |
setAll(java.util.Collection<? extends T> col)
Clears the ObservableList and add all elements from the collection.
|
boolean |
setAll(T... elements)
Clears the ObservableList and add all the elements passed as var-args.
|
int |
size() |
add, add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subList
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
public FXCollections.UnmodifiableObservableListImpl(ObservableList<T> backingList)
public T get(int index)
public int size()
public final void addListener(InvalidationListener listener)
Observable
InvalidationListener
which will be notified whenever the
Observable
becomes invalid. If the same
listener is added more than once, then it will be notified more than
once. That is, no check is made to ensure uniqueness.
Note that the same actual InvalidationListener
instance may be
safely registered for different Observables
.
The Observable
stores a strong reference to the listener
which will prevent the listener from being garbage collected and may
result in a memory leak. It is recommended to either unregister a
listener by calling removeListener
after use or to use an instance of
WeakInvalidationListener
avoid this situation.
addListener
in interface Observable
listener
- The listener to registerObservable.removeListener(InvalidationListener)
public final void removeListener(InvalidationListener listener)
Observable
Observable
becomes invalid.
If the given listener has not been previously registered (i.e. it was never added) then this method call is a no-op. If it had been previously added then it will be removed. If it had been added more than once, then only the first occurrence will be removed.
removeListener
in interface Observable
listener
- The listener to removeObservable.addListener(InvalidationListener)
public void addListener(ListChangeListener<? super T> o)
ObservableList
addListener
in interface ObservableList<T>
o
- the listener for listening to the list changespublic void removeListener(ListChangeListener<? super T> o)
ObservableList
removeListener
in interface ObservableList<T>
o
- a listener to removepublic boolean addAll(T... elements)
ObservableList
addAll
in interface ObservableList<T>
elements
- the elements to addpublic boolean setAll(T... elements)
ObservableList
setAll
in interface ObservableList<T>
elements
- the elements to setpublic boolean setAll(java.util.Collection<? extends T> col)
ObservableList
setAll
in interface ObservableList<T>
col
- the collection with elements that will be added to this observableArrayListpublic boolean removeAll(T... elements)
ObservableList
removeAll
in interface ObservableList<T>
elements
- the elements to be removedpublic boolean retainAll(T... elements)
ObservableList
retainAll
in interface ObservableList<T>
elements
- the elements to be retainedpublic void remove(int from, int to)
ObservableList
remove
in interface ObservableList<T>
from
- the start of the range to remove (inclusive)to
- the end of the range to remove (exclusive)Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved. Use is subject to