displayablecollections
Interface DisplayableCollection<E>

All Superinterfaces:
java.util.Collection<E>, java.lang.Iterable<E>
All Known Subinterfaces:
DisplayableList<E>, DisplayableSet<E>, DisplayableSortedSet<E>
All Known Implementing Classes:
DisplayableArrayList, DisplayableHashSet, DisplayableLinkedHashSet, DisplayableLinkedList, DisplayableTreeSet

public interface DisplayableCollection<E>
extends java.util.Collection<E>

A DisplayableCollection encapsulates a Collection and allows it to be displayed by a JList


Nested Class Summary
static interface DisplayableCollection.CollectionChangedNotification<E>
          An object that implements this interface encapsulates information about changes to a DisplayableCollection.
 
Method Summary
 void addObserver(java.util.Observer observer)
          Add an observer to the set of observers of this collection
 void deleteObservers()
          Clear the observers list so this collection no longer has any observers
 javax.swing.ListModel listModel()
          Create a list model for displaying this collection in a JList.
 
Methods inherited from interface java.util.Collection
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray
 

Method Detail

listModel

javax.swing.ListModel listModel()
Create a list model for displaying this collection in a JList. The result of calling toString() is what will actually be displayed for each element. There will be no necessary connection between the order of display and any order in the collection, since this method can be invoked on any collection implementing this interface. (For collections having an inherent order, orderedListModel can be used instead.)

See Also:
orderedListModel() in DisplayableList and DisplayableSortedSet

addObserver

void addObserver(java.util.Observer observer)
Add an observer to the set of observers of this collection

Parameters:
observer - the observer to add

deleteObservers

void deleteObservers()
Clear the observers list so this collection no longer has any observers