Spec-Zone .ru
спецификации, руководства, описания, API
|
private static final class TextArea.ParagraphList extends java.util.AbstractList<java.lang.CharSequence> implements ObservableList<java.lang.CharSequence>
Modifier and Type | Method and Description |
---|---|
boolean |
addAll(java.lang.CharSequence... paragraphs)
A convenient method for var-arg adding of elements.
|
boolean |
addAll(java.util.Collection<? extends java.lang.CharSequence> paragraphs) |
void |
addListener(InvalidationListener listener)
Adds an
InvalidationListener which will be notified whenever the
Observable becomes invalid. |
void |
addListener(ListChangeListener<? super java.lang.CharSequence> listener)
Add a listener to this observable list.
|
java.lang.CharSequence |
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(java.lang.CharSequence... 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 java.lang.CharSequence> listener)
Tries to removed a listener from this observable list.
|
boolean |
retainAll(java.lang.CharSequence... elements)
A convenient method for var-arg usage of retain method.
|
boolean |
setAll(java.lang.CharSequence... paragraphs)
Clears the ObservableList and add all the elements passed as var-args.
|
boolean |
setAll(java.util.Collection<? extends java.lang.CharSequence> paragraphs)
Clears the ObservableList and add all elements from the collection.
|
int |
size() |
add, add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subList
contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
public java.lang.CharSequence get(int index)
get
in interface java.util.List<java.lang.CharSequence>
get
in class java.util.AbstractList<java.lang.CharSequence>
public boolean addAll(java.util.Collection<? extends java.lang.CharSequence> paragraphs)
addAll
in interface java.util.Collection<java.lang.CharSequence>
addAll
in interface java.util.List<java.lang.CharSequence>
addAll
in class java.util.AbstractCollection<java.lang.CharSequence>
public boolean addAll(java.lang.CharSequence... paragraphs)
ObservableList
addAll
in interface ObservableList<java.lang.CharSequence>
paragraphs
- the elements to addpublic boolean setAll(java.util.Collection<? extends java.lang.CharSequence> paragraphs)
ObservableList
setAll
in interface ObservableList<java.lang.CharSequence>
paragraphs
- the collection with elements that will be added to this observableArrayListpublic boolean setAll(java.lang.CharSequence... paragraphs)
ObservableList
setAll
in interface ObservableList<java.lang.CharSequence>
paragraphs
- the elements to setpublic int size()
size
in interface java.util.Collection<java.lang.CharSequence>
size
in interface java.util.List<java.lang.CharSequence>
size
in class java.util.AbstractCollection<java.lang.CharSequence>
public void addListener(ListChangeListener<? super java.lang.CharSequence> listener)
ObservableList
addListener
in interface ObservableList<java.lang.CharSequence>
listener
- the listener for listening to the list changespublic void removeListener(ListChangeListener<? super java.lang.CharSequence> listener)
ObservableList
removeListener
in interface ObservableList<java.lang.CharSequence>
listener
- a listener to removepublic boolean removeAll(java.lang.CharSequence... elements)
ObservableList
removeAll
in interface ObservableList<java.lang.CharSequence>
elements
- the elements to be removedpublic boolean retainAll(java.lang.CharSequence... elements)
ObservableList
retainAll
in interface ObservableList<java.lang.CharSequence>
elements
- the elements to be retainedpublic void remove(int from, int to)
ObservableList
remove
in interface ObservableList<java.lang.CharSequence>
from
- the start of the range to remove (inclusive)to
- the end of the range to remove (exclusive)public 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 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)
Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved. Use is subject to