Class EventListModel<E>
- java.lang.Object
-
- ca.odell.glazedlists.swing.DefaultEventListModel<E>
-
- ca.odell.glazedlists.swing.EventListModel<E>
-
- All Implemented Interfaces:
ListEventListener<E>,java.util.EventListener,javax.swing.ListModel
- Direct Known Subclasses:
EventComboBoxModel
public class EventListModel<E> extends DefaultEventListModel<E>
Deprecated.UseDefaultEventListModelinstead. This class will be removed in the GL 2.0 release. The wrapping of the source list with an EDT safe list has been determined to be undesirable (it is better for the user to provide their own EDT safe list).An EventListModel adapts an EventList to the ListModel interface making it appropriate for use with aJList. Each element of the list corresponds to an element in theListModel.The EventListModel class is not thread-safe. Unless otherwise noted, all methods are only safe to be called from the event dispatch thread. To do this programmatically, use
SwingUtilities.invokeAndWait(Runnable).- Author:
- Jesse Wilson, Holger Brands
- See Also:
- Bug 14,
Bug 146,
Bug 177,
Bug 228,
SwingUtilities.invokeAndWait(Runnable)
-
-
Field Summary
-
Fields inherited from class ca.odell.glazedlists.swing.DefaultEventListModel
listDataEvent, source
-
-
Constructor Summary
Constructors Constructor Description EventListModel(EventList<E> source)Deprecated.Creates a new model that contains all objects located in the givensourceand reacts to any changes in the givensource.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voiddispose()Deprecated.Releases the resources consumed by thisEventListModelso that it may eventually be garbage collected.-
Methods inherited from class ca.odell.glazedlists.swing.DefaultEventListModel
addListDataListener, fireListDataEvent, getElementAt, getSize, listChanged, removeListDataListener
-
-
-
-
Method Detail
-
dispose
public void dispose()
Deprecated.Releases the resources consumed by thisEventListModelso that it may eventually be garbage collected.An
EventListModelwill be garbage collected without a call todispose(), but not before its sourceEventListis garbage collected. By callingdispose(), you allow theEventListModelto be garbage collected before its sourceEventList. This is necessary for situations where anEventListModelis short-lived but its sourceEventListis long-lived.Warning: It is an error to call any method on an
EventListModelafter it has been disposed. As such, thisEventListModelshould be detached from its corresponding Component before it is disposed.- Overrides:
disposein classDefaultEventListModel<E>
-
-