|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectca.odell.glazedlists.swing.DefaultEventListModel<E>
ca.odell.glazedlists.swing.EventListModel<E>
DefaultEventListModel
instead. 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).
public class EventListModel<E>
An EventListModel adapts an EventList to the ListModel interface making it
appropriate for use with a JList
. Each element of the list
corresponds to an element in the ListModel
.
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)
.
SwingUtilities.invokeAndWait(Runnable)
Field Summary |
---|
Fields inherited from class ca.odell.glazedlists.swing.DefaultEventListModel |
---|
listDataEvent, source |
Constructor Summary | |
---|---|
EventListModel(EventList<E> source)
Deprecated. Creates a new model that contains all objects located in the given source and reacts to any changes in the given
source . |
Method Summary | |
---|---|
void |
dispose()
Deprecated. Releases the resources consumed by this EventListModel so that it
may eventually be garbage collected. |
Methods inherited from class ca.odell.glazedlists.swing.DefaultEventListModel |
---|
addListDataListener, fireListDataEvent, getElementAt, getSize, listChanged, removeListDataListener |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EventListModel(EventList<E> source)
source
and reacts to any changes in the given
source
.
Method Detail |
---|
public void dispose()
EventListModel
so that it
may eventually be garbage collected.
An EventListModel
will be garbage collected without a call to
dispose()
, but not before its source EventList
is garbage
collected. By calling dispose()
, you allow the EventListModel
to be garbage collected before its source EventList
. This is
necessary for situations where an EventListModel
is short-lived but
its source EventList
is long-lived.
Warning: It is an error
to call any method on an EventListModel
after it has been disposed.
As such, this EventListModel
should be detached from its
corresponding Component before it is disposed.
dispose
in class DefaultEventListModel<E>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |