public class MatchItemComboViewer
extends org.eclipse.jface.viewers.ComboViewer
ComboViewer
that allows typed text to be matched against
the combo viewer's items and also allows setting the selection via arrow keys.
If the escape key pressed, the content of the editor is set back to its initial state.Constructor and Description |
---|
MatchItemComboViewer(org.eclipse.swt.custom.CCombo combo)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
TimeBoundStringBuffer |
getBuffer()
Returns the search buffer used during matching.
|
void |
onEnter()
Callback that is called when the enter key is released.
|
protected void |
onEscape()
Callback that is called when the escape key is released.
|
protected void |
reset()
Reset to initial state, i.e.
|
void |
setClosestMatch(String text)
Match given text against items of combo and set selection, if applicable.
|
protected void |
setupListeners()
Initializes this viewer.
|
getCCombo, getCombo, getControl, listAdd, listDeselectAll, listGetItemCount, listGetSelectionIndices, listRemove, listRemoveAll, listSetItem, listSetItems, listSetSelection, listShowSelection, reveal
add, add, doFindInputItem, doFindItem, doUpdateItem, getElementAt, getLabelProvider, getSelectionFromWidget, indexForElement, inputChanged, insert, internalRefresh, listGetTopIndex, listSetTopIndex, remove, remove, setLabelProvider, setSelectionToWidget
addDoubleClickListener, addDragSupport, addDropSupport, addFilter, addOpenListener, addPostSelectionChangedListener, assertContentProviderType, assertElementsNotNull, associate, buildLabel, disassociate, equals, filter, findItem, findItems, fireDoubleClick, fireOpen, firePostSelectionChanged, getColorAndFontCollector, getComparator, getComparer, getFilteredChildren, getFilters, getItem, getRawChildren, getRoot, getSelection, getSortedChildren, getSorter, getStructuredSelection, handleDispose, handleDoubleSelect, handleInvalidSelection, handleLabelProviderChanged, handleOpen, handlePostSelect, handleSelect, hasFilters, hookControl, internalRefresh, internalUpdate, mapElement, needsRefilter, preservingSelection, refresh, refresh, refresh, refresh, refreshItem, removeDoubleClickListener, removeFilter, removeOpenListener, removePostSelectionChangedListener, resetFilters, setComparator, setComparer, setContentProvider, setFilters, setInput, setSelection, setSelectionToWidget, setSorter, setUseHashlookup, testFindItem, testFindItems, unmapAllElements, unmapElement, unmapElement, update, update, updateItem, updateSelection, usingElementMap
getContentProvider, getInput, labelProviderChanged
addHelpListener, addSelectionChangedListener, fireHelpRequested, fireSelectionChanged, getData, handleHelpRequest, removeHelpListener, removeSelectionChangedListener, scrollDown, scrollUp, setData, setSelection
public MatchItemComboViewer(org.eclipse.swt.custom.CCombo combo)
combo
- the CCombo
to be wrappedpublic void onEnter()
public TimeBoundStringBuffer getBuffer()
TimeBoundStringBuffer
public void setClosestMatch(String text)
text
- the string to be matchedprotected void onEscape()
protected void setupListeners()
protected void reset()
Copyright © 2019. All rights reserved.