|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface DisplayableMap<K,V>
A DisplayableMap encapsulates a Map and allows it to be displayed by a JList
Nested Class Summary | |
---|---|
static interface |
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. |
Nested classes/interfaces inherited from interface java.util.Map |
---|
java.util.Map.Entry<K,V> |
Method Summary | |
---|---|
void |
addObserver(java.util.Observer observer)
Add an observer to the set of observers of this map |
void |
deleteObservers()
Clear the observers list so this map no longer has any observers |
java.util.Set<java.util.Map.Entry<K,V>> |
entrySet()
Returns a set view of the mappings contained in this map. |
java.util.Set<K> |
keySet()
Returns a set view of the keys contained in this map. |
javax.swing.ListModel |
listModel()
Create a list model for displaying this map's values in a JList. |
javax.swing.ListModel |
valueOrderedListModel()
Create a list model for displaying the values in this map in a JList. |
javax.swing.ListModel |
valueOrderedListModel(java.util.Comparator<V> comparator)
Create a list model for displaying the values in this map in a JList. |
java.util.Collection<V> |
values()
Returns a collection view of the values contained in this map. |
Methods inherited from interface java.util.Map |
---|
clear, containsKey, containsValue, equals, get, hashCode, isEmpty, put, putAll, remove, size |
Method Detail |
---|
javax.swing.ListModel listModel()
toString()
is what will actually be
displayed for each. There will be no necessary connection between
the order of display and any order in the map, since this
method can be invoked on any map implementing this interface. (The
method valueOrderedListModel
specified below can be used
with any map if it is desired to display the values in some order based
on their natural order or that induced by a specified comparator.
For maps having an inherent order of keys,
keyOrderedListModel
can also be used to display the values
in an order corresponding to the order of the keys.)
valueOrderedListModel()
in this interface and
keyOrderedListModel
in DisplayableSortedMap
javax.swing.ListModel valueOrderedListModel()
toString()
is what will actually be
displayed for each. The values will be displayed in an order determined
by the natural order of the values
javax.swing.ListModel valueOrderedListModel(java.util.Comparator<V> comparator)
toString()
is what will actually be
displayed for each. The values will be displayed in an order determined
by the specified comparator
comparator
- the comparator to usevoid addObserver(java.util.Observer observer)
observer
- the observer to addvoid deleteObservers()
java.util.Set<java.util.Map.Entry<K,V>> entrySet()
entrySet
in interface java.util.Map<K,V>
java.util.Set<K> keySet()
keySet
in interface java.util.Map<K,V>
java.util.Collection<V> values()
values
in interface java.util.Map<K,V>
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |