|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectca.odell.glazedlists.swt.EventComboViewer<E>
public class EventComboViewer<E>
A view helper that displays an EventList
in a Combo
component.
This class is not thread safe. It must be used exclusively with the SWT event handler thread.
Constructor Summary | |
---|---|
EventComboViewer(EventList<E> source,
Combo combo)
Binds the contents of a Combo component to an EventList
source. |
|
EventComboViewer(EventList<E> source,
Combo combo,
ILabelProvider labelProvider)
Binds the contents of a Combo component to an EventList
source. |
Method Summary | |
---|---|
void |
dispose()
Releases the resources consumed by this EventComboViewer so that it
may eventually be garbage collected. |
Combo |
getCombo()
Gets the Combo being managed by this EventComboViewer . |
void |
listChanged(ListEvent listChanges)
When the source combo is changed, this forwards the change to the displayed combo. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EventComboViewer(EventList<E> source, Combo combo)
Combo
component to an EventList
source. This allows the selection choices in a Combo
to change
dynamically to reflect chances to the source EventList
. The
String
values displayed in the Combo
compoment will be
the result of calling toString() on the Objects found in source.
public EventComboViewer(EventList<E> source, Combo combo, ILabelProvider labelProvider)
Combo
component to an EventList
source. This allows the selection choices in a Combo
to change
dynamically to reflect chances to the source EventList
. The
String
values displayed in the Combo
compoment will be
formatted using the provided ILabelProvider
.
ILabelProvider
,
GlazedListsSWT.beanLabelProvider(String)
Method Detail |
---|
public Combo getCombo()
EventComboViewer
.
public void listChanged(ListEvent listChanges)
listChanged
in interface ListEventListener<E>
public void dispose()
EventComboViewer
so that it
may eventually be garbage collected.
An EventComboViewer
will be garbage collected without a call to
dispose()
, but not before its source EventList
is garbage
collected. By calling dispose()
, you allow the EventComboViewer
to be garbage collected before its source EventList
. This is
necessary for situations where an EventComboViewer
is short-lived but
its source EventList
is long-lived.
Warning: It is an error
to call any method on a EventComboViewer
after it has been disposed.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |