|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.progeeks.util.ConstrainedObservableList
public abstract class ConstrainedObservableList
A java.util.List wrapper that will deliver the appropriate ListPropertyChangeEvents when the list is modified but also supports vetoing adds, removes, and sets based on subclass implementations.
| Constructor Summary | |
|---|---|
protected |
ConstrainedObservableList()
Subclass constructor used to be able to create an ObservableList and defer setting of the delegate list until other setup has been done. |
|
ConstrainedObservableList(java.util.List list)
Creates an ObservableList that delegates to the specified list and will fire PropertyChangeEvents for the "list" property. |
protected |
ConstrainedObservableList(java.lang.String propertyName)
Subclass constructor used to be able to create an ObservableList and defer setting of the delegate list until other setup has been done. |
|
ConstrainedObservableList(java.lang.String propertyName,
java.util.List list)
Creates an ObservableList that delegates to the specified list and will fire PropertyChangeEvents for the specified property name. |
| Method Summary | |
|---|---|
void |
add(int index,
java.lang.Object element)
|
boolean |
add(java.lang.Object o)
|
boolean |
addAll(java.util.Collection c)
|
boolean |
addAll(int index,
java.util.Collection c)
|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Adds a listener that will be notified when items are added, updated, or removed from the list. |
protected boolean |
canAdd(java.lang.Object o)
Returns true if the specified object can be added to the list. |
protected boolean |
canRemove(java.lang.Object o)
Returns true if the specified object can be removed from the list. |
void |
clear()
|
boolean |
contains(java.lang.Object o)
|
boolean |
containsAll(java.util.Collection c)
|
boolean |
equals(java.lang.Object o)
|
protected void |
fireElementsInserted(int first,
int last,
java.util.List original)
Sends an event to interested listeners that this property has had elements inserted. |
protected void |
fireElementsModified(int first,
int last,
java.util.List original)
Sends an event to interested listeners that this property has had elements inserted. |
protected void |
fireElementsRemoved(int first,
int last,
java.util.List original)
Sends an event to interested listeners that this property has had elements inserted. |
protected void |
firePropertyChangeEvent(java.beans.PropertyChangeEvent event)
Implemented by subclasses to deliver a change event to the appropriately registered listeners. |
java.lang.Object |
get(int index)
|
protected java.lang.String |
getPropertyName()
|
int |
hashCode()
|
int |
indexOf(java.lang.Object o)
|
boolean |
isEmpty()
|
java.util.Iterator |
iterator()
|
int |
lastIndexOf(java.lang.Object o)
|
java.util.ListIterator |
listIterator()
|
java.util.ListIterator |
listIterator(int index)
|
java.lang.Object |
remove(int index)
|
boolean |
remove(java.lang.Object o)
|
boolean |
removeAll(java.util.Collection c)
|
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Removes a previously registered listener. |
boolean |
retainAll(java.util.Collection c)
|
java.lang.Object |
set(int index,
java.lang.Object element)
|
protected void |
setList(java.util.List list)
|
int |
size()
|
java.util.List |
subList(int from,
int to)
|
java.lang.Object[] |
toArray()
|
java.lang.Object[] |
toArray(java.lang.Object[] a)
|
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ConstrainedObservableList(java.util.List list)
public ConstrainedObservableList(java.lang.String propertyName,
java.util.List list)
protected ConstrainedObservableList()
protected ConstrainedObservableList(java.lang.String propertyName)
| Method Detail |
|---|
protected void setList(java.util.List list)
public int size()
size in interface java.util.Collectionsize in interface java.util.Listpublic boolean isEmpty()
isEmpty in interface java.util.CollectionisEmpty in interface java.util.Listpublic boolean contains(java.lang.Object o)
contains in interface java.util.Collectioncontains in interface java.util.Listpublic java.util.Iterator iterator()
iterator in interface java.lang.Iterableiterator in interface java.util.Collectioniterator in interface java.util.Listpublic java.lang.Object[] toArray()
toArray in interface java.util.CollectiontoArray in interface java.util.Listpublic java.lang.Object[] toArray(java.lang.Object[] a)
toArray in interface java.util.CollectiontoArray in interface java.util.Listprotected boolean canAdd(java.lang.Object o)
protected boolean canRemove(java.lang.Object o)
public boolean add(java.lang.Object o)
add in interface java.util.Collectionadd in interface java.util.Listpublic boolean remove(java.lang.Object o)
remove in interface java.util.Collectionremove in interface java.util.Listpublic boolean containsAll(java.util.Collection c)
containsAll in interface java.util.CollectioncontainsAll in interface java.util.Listpublic boolean addAll(java.util.Collection c)
addAll in interface java.util.CollectionaddAll in interface java.util.List
public boolean addAll(int index,
java.util.Collection c)
addAll in interface java.util.Listpublic boolean removeAll(java.util.Collection c)
removeAll in interface java.util.CollectionremoveAll in interface java.util.Listpublic boolean retainAll(java.util.Collection c)
retainAll in interface java.util.CollectionretainAll in interface java.util.Listpublic void clear()
clear in interface java.util.Collectionclear in interface java.util.Listpublic boolean equals(java.lang.Object o)
equals in interface java.util.Collectionequals in interface java.util.Listequals in class java.lang.Objectpublic int hashCode()
hashCode in interface java.util.CollectionhashCode in interface java.util.ListhashCode in class java.lang.Objectpublic java.lang.Object get(int index)
get in interface java.util.List
public java.lang.Object set(int index,
java.lang.Object element)
set in interface java.util.List
public void add(int index,
java.lang.Object element)
add in interface java.util.Listpublic java.lang.Object remove(int index)
remove in interface java.util.Listpublic int indexOf(java.lang.Object o)
indexOf in interface java.util.Listpublic int lastIndexOf(java.lang.Object o)
lastIndexOf in interface java.util.Listpublic java.util.ListIterator listIterator()
listIterator in interface java.util.Listpublic java.util.ListIterator listIterator(int index)
listIterator in interface java.util.List
public java.util.List subList(int from,
int to)
subList in interface java.util.Listpublic void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
ObservableList
addPropertyChangeListener in interface ObservableListpublic void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
ObservableList
removePropertyChangeListener in interface ObservableListprotected java.lang.String getPropertyName()
protected void firePropertyChangeEvent(java.beans.PropertyChangeEvent event)
protected void fireElementsInserted(int first,
int last,
java.util.List original)
protected void fireElementsModified(int first,
int last,
java.util.List original)
protected void fireElementsRemoved(int first,
int last,
java.util.List original)
public java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||