|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectca.odell.glazedlists.swt.DefaultEventComboViewer<E>
public class DefaultEventComboViewer<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.
Field Summary | |
---|---|
protected EventList<E> |
source
the EventList to respond to |
Constructor Summary | |
---|---|
|
DefaultEventComboViewer(EventList<E> source,
org.eclipse.swt.widgets.Combo combo)
Binds the contents of a Combo component to an EventList
source. |
|
DefaultEventComboViewer(EventList<E> source,
org.eclipse.swt.widgets.Combo combo,
ItemFormat<? super E> itemFormat)
Binds the contents of a Combo component to an EventList
source. |
protected |
DefaultEventComboViewer(EventList<E> source,
org.eclipse.swt.widgets.Combo combo,
ItemFormat<? super E> itemFormat,
boolean disposeSource)
Binds the contents of a Combo component to an EventList
source. |
Method Summary | |
---|---|
void |
dispose()
Releases the resources consumed by this DefaultEventComboViewer so that it
may eventually be garbage collected. |
org.eclipse.swt.widgets.Combo |
getCombo()
Gets the Combo being managed by this DefaulEventComboViewer . |
ItemFormat<? super E> |
getItemFormat()
Gets the Combo's ItemFormat . |
void |
listChanged(ListEvent<E> 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 |
Field Detail |
---|
protected EventList<E> source
Constructor Detail |
---|
public DefaultEventComboViewer(EventList<E> source, org.eclipse.swt.widgets.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
component will be
the result of calling toString() on the Objects found in source.
source
- the EventList that provides the elementscombo
- the combo boxpublic DefaultEventComboViewer(EventList<E> source, org.eclipse.swt.widgets.Combo combo, ItemFormat<? super E> itemFormat)
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
component will be
formatted using the provided ItemFormat
.
source
- the EventList that provides the elementscombo
- the combo boxitemFormat
- an ItemFormat
for formatting the displayed valuesItemFormat
,
GlazedListsSWT.beanItemFormat(String)
protected DefaultEventComboViewer(EventList<E> source, org.eclipse.swt.widgets.Combo combo, ItemFormat<? super E> itemFormat, boolean disposeSource)
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
component will be
formatted using the provided ItemFormat
.
source
- the EventList that provides the elementscombo
- the combo boxitemFormat
- an optional ItemFormat
for formatting the displayed valuesdiposeSource
- true
if the source list should be disposed when disposing
this model, false
otherwiseItemFormat
,
GlazedListsSWT.beanItemFormat(String)
Method Detail |
---|
public org.eclipse.swt.widgets.Combo getCombo()
DefaulEventComboViewer
.
public ItemFormat<? super E> getItemFormat()
ItemFormat
.
public void listChanged(ListEvent<E> listChanges)
listChanged
in interface ListEventListener<E>
listChanges
- a ListEvent
describing the changes to the listpublic void dispose()
DefaultEventComboViewer
so that it
may eventually be garbage collected.
An DefaultEventComboViewer
will be garbage collected without a call to
dispose()
, but not before its source EventList
is garbage
collected. By calling dispose()
, you allow the DefaultEventComboViewer
to be garbage collected before its source EventList
. This is
necessary for situations where an DefaultEventComboViewer
is short-lived but
its source EventList
is long-lived.
Warning: It is an error
to call any method on a DefaultEventComboViewer
after it has been disposed.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |