Package displayablecollections

This package provides support for collections and maps whose contents can easily be displayed in a GUI.

See:
          Description

Interface Summary
ChangeNotification An object that implements this interface encapsulates information about changes to a displayable collection or map.
DisplayableCollection<E> A DisplayableCollection encapsulates a Collection and allows it to be displayed by a JList
DisplayableCollection.CollectionChangedNotification<E> An object that implements this interface encapsulates information about changes to a DisplayableCollection.
DisplayableList<E> A DisplayableList encapsulates a List and allows it to be displayed by a JList
DisplayableList.ListChangedNotification<E> An object that implements this interface encapsulates information about changes to an DisplayableList.
DisplayableMap<K,V> A DisplayableMap encapsulates a Map and allows it to be displayed by a JList
DisplayableMap.MapChangedNotification<K,V> An object that implements this interface encapsulates information about changes to an DisplayableMap Such an object will be the second parameter when the update() method of an Observer is called following a change to this DisplayableList.
DisplayableSet<E> A DisplayableSet encapsulates a Set and allows it to be displayed by a JList
DisplayableSortedMap<K,V> A DisplayableSortedMap encapsulates a SortedMap and allows it to be displayed by a JList
DisplayableSortedSet<E> A DisplayableSortedSet encapsulates a SortedSet and allows it to be displayed by a JList
 

Class Summary
DisplayableArrayList<E> A DisplayableArrayList encapsulates an ArrayList and allows it to be displayed by a JList
DisplayableHashMap<K,V> A DisplayableHashMap encapsulates a HashMap and allows it to be displayed by a JList
DisplayableHashSet<E> An DisplayableHashSet encapsulates HashSet and allows it to be displayed by a JList
DisplayableLinkedHashMap<K,V> A DisplayableLinkedHashMap encapsulates a LinkedHashMap and allows it to be displayed by a JList
DisplayableLinkedHashSet<E> A DisplayableHashSet encapsulates a LinkedHashSet and allows it to be displayed by a JList
DisplayableLinkedList<E> A Displayable ArrayList encapsulates a LinkedList and allows it to be displayed by a JList
DisplayableTreeMap<K,V> A DisplayableTreeMap encapsulates a TreeMap and allows it to be displayed by a JList
DisplayableTreeSet<E> A DisplayableTreeSet encapsulates a TreeSet and allows it to be displayed by a JList
ListModelAdapter Abstract base class for adapter classes that allow various DisplayableCollection or DisplayableMap objects to be displayed by a javax.swing.JList using an object of this class as its model.
 

Enum Summary
ChangeNotification.ChangeType The type of change made to a displayable collection or map by operation on it.
 

Package displayablecollections Description

This package provides support for collections and maps whose contents can easily be displayed in a GUI. It includes classes that correspond to all the collection and map classes in the java.util package, but with added support for GUI display. These classes support all of the methods of the corresponding java.util class by encapsulating an object of that class and forwarding operations to it with added support for maintaining the display.

In the case of a set or list, the display will show the results of calling toString() on each element of the collection. In the case of a map, the display will show the results of calling toString() on each of the values in the map. (Keys will not be displayed.) Accordingly, the element/value class should override toString() to return appropriate text to display. As the collection or map is modified by methods such as add() or put() or remove(), the display will be modified to reflect the changes.

The public classes defined in this package are:

Class in this package Corresponding java.util class Methods that create a javax.swing.JList
DisplayableArrayList ArrayList listModel()
orderedListModel()
DisplayableHashMap HashMap listModel()
valueOrderedListModel()
valueOrderedListModel(Comparator)
DisplayableHashSet HashSet listModel()
DisplayableLinkedHashMap LinkeHashMap listModel()
valueOrderedListModel()
valueOrderedListModel(Comparator)
DisplayableLinkedHashSet LinkedHashSet listModel()
DisplayableLinkedList LinkedList listModel()
orderedListModel()
DisplayableTreeMap TreeMap listModel()
valueOrderedListModel()
valueOrderedListModel(Comparator)
keyOrderedListModel()
DisplayableTreeSet TreeSet listModel()
orderedListModel()