|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.jface.viewers.Viewer com.ibm.commons.swt.viewers.AbstractDeferredViewer com.ibm.commons.swt.data.viewers.DCComboBoxDeferredViewer
public class DCComboBoxDeferredViewer
Class to fetch data for a DCCombo in the background. This class is not an eclipse viewer but uses content providers and label providers to maximize reuse. To use, create the viewer by passing an existing DCComboBox. Next set the content provider and the label provider. If a label provider is not available then, it is assume the values returned from the content provider are both the lables and the codes. Next set the Input. This will set the lookup values for the DCComboBox. Initially the combo box will display "Working..." when dropped down until the real data is ready.
Field Summary |
---|
Fields inherited from class org.eclipse.jface.viewers.Viewer |
---|
WIDGET_DATA_KEY |
Constructor Summary | |
---|---|
DCComboBoxDeferredViewer(DCComboBox combo,
java.lang.String title)
Creates a new instance of this class. |
|
DCComboBoxDeferredViewer(DCCompositeCombo combo,
java.lang.String title)
Creates a new instance of this class. |
Method Summary | |
---|---|
void |
dispose()
|
protected void |
doUpdateControl(java.lang.Object results)
Update the control with the results of the deferred data. |
org.eclipse.swt.widgets.Control |
getControl()
Return the control associated with this viewer. |
protected void |
hookControl()
Adds listeners to the control. |
boolean |
isRefreshing()
|
void |
refresh()
Refresh the contents of the combo box. |
void |
setInput(java.lang.Object input)
Set the input for the viewer. |
void |
setRefreshOnFocus(boolean refreshOnFocus)
|
Methods inherited from class com.ibm.commons.swt.viewers.AbstractDeferredViewer |
---|
getContentProvider, getErrorDialogTitle, getInput, getLabelProvider, getSelection, getStackTraceAsMultiStatus, getStatus, getUpdateCallback, jobCompleted, setContentProvider, setInputOnly, setLabelProvider, setSelection, setStatus, setUpdateCallback, updateStatus |
Methods inherited from class org.eclipse.jface.viewers.Viewer |
---|
addHelpListener, addSelectionChangedListener, fireHelpRequested, fireSelectionChanged, getData, handleHelpRequest, inputChanged, removeHelpListener, removeSelectionChangedListener, scrollDown, scrollUp, setData, setSelection |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DCComboBoxDeferredViewer(DCComboBox combo, java.lang.String title)
combo
- an existing DCComboBox whose content is determined by a long running operationtitle
- a dialog title for any error messagespublic DCComboBoxDeferredViewer(DCCompositeCombo combo, java.lang.String title)
combo
- an existing DCCompositeCombo whose content is determined by a long running operationtitle
- a dialog title for any error messagesMethod Detail |
---|
protected void hookControl()
hookControl
in class AbstractDeferredViewer
public void setInput(java.lang.Object input)
setInput
in class AbstractDeferredViewer
public void refresh()
refresh
in class AbstractDeferredViewer
protected void doUpdateControl(java.lang.Object results)
AbstractDeferredViewer
doUpdateControl
in class AbstractDeferredViewer
public org.eclipse.swt.widgets.Control getControl()
getControl
in class AbstractDeferredViewer
public void setRefreshOnFocus(boolean refreshOnFocus)
refreshOnFocus
- - if true refresh the combo box if needed only when the combobox
gets focus. If false refresh the combo box when ever set input
is called.public void dispose()
dispose
in class AbstractDeferredViewer
public boolean isRefreshing()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |