public class TextGridObjectTableViewer extends TableViewer
TableViewer
that can display TextGridObject
s and is
prepared for fetching them in the background.Modifier and Type | Class and Description |
---|---|
static class |
TextGridObjectTableViewer.Column |
protected class |
TextGridObjectTableViewer.ColumnComparator |
class |
TextGridObjectTableViewer.TGOProjectLabelProvider
A
DelegatingStyledCellLabelProvider.IStyledLabelProvider that labels the project field of
TextGridObjects. |
StructuredViewer.ColorAndFontCollector, StructuredViewer.ColorAndFontCollectorWithProviders
Modifier and Type | Field and Description |
---|---|
static StyledString.Styler |
ERROR_STYLER
A styler used for error messages
|
WIDGET_DATA_KEY
Constructor and Description |
---|
TextGridObjectTableViewer(Composite parent,
int style)
Creates a new
TextGridObject TableViewer with a default
label provider and an UpdatingDeferredListContentProvider . |
Modifier and Type | Method and Description |
---|---|
TableViewerColumn |
getColumn(TextGridObjectTableViewer.Column column) |
UpdatingDeferredListContentProvider |
getDefaultContentProvider()
Returns the default content provider.
|
protected void |
init()
Initializes the viewer.
|
protected void |
initColumns()
Initializes the Table's columns.
|
void |
queryMetadata(String query)
Convenience method that creates a metadata query to TG-Search and fills
this viewer correspondingly.
|
void |
setDefaultSelection(TextGridObject... defaultSelection)
Registers a default selection for this content provider.
|
void |
setVisibleColumns(EnumSet<TextGridObjectTableViewer.Column> columnsToShow) |
createViewerEditor, doClear, doClearAll, doDeselectAll, doFindItem, doGetColumn, doGetColumnCount, doGetItem, doGetItemCount, doGetItems, doGetSelection, doGetSelectionIndices, doIndexOf, doRemove, doRemove, doRemoveAll, doResetItem, doSelect, doSetItemCount, doSetSelection, doSetSelection, doShowItem, doShowSelection, getControl, getItemAt, getTable, getViewerRowFromItem, internalCreateNewRowPart, refresh, refresh, remove, setSelection
add, add, assertContentProviderType, clear, doFindInputItem, doUpdateItem, getColumnViewerOwner, getElementAt, getLabelProvider, getRawChildren, getSelectionFromWidget, handleDispose, hookControl, indexForElement, inputChanged, insert, internalRefresh, internalRefresh, remove, replace, reveal, setItemCount, setSelectionToWidget
applyEditorValue, cancelEditing, checkBusy, editElement, getCell, getCellEditors, getCellModifier, getColumnProperties, getColumnViewerEditor, getItem, getLabelProvider, getViewerRow, hookEditingSupport, isBusy, isCellEditorActive, refresh, refresh, setBusy, setCellEditors, setCellModifier, setColumnProperties, setColumnViewerEditor, setLabelProvider, triggerEditorActivationEvent, update
addDoubleClickListener, addDragSupport, addDropSupport, addFilter, addOpenListener, addPostSelectionChangedListener, assertElementsNotNull, associate, buildLabel, disassociate, equals, filter, findItem, findItems, fireDoubleClick, fireOpen, firePostSelectionChanged, getColorAndFontCollector, getComparator, getComparer, getFilteredChildren, getFilters, getRoot, getSelection, getSortedChildren, getSorter, handleDoubleSelect, handleInvalidSelection, handleLabelProviderChanged, handleOpen, handlePostSelect, handleSelect, hasFilters, internalUpdate, mapElement, needsRefilter, preservingSelection, refresh, refresh, refreshItem, removeDoubleClickListener, removeFilter, removeOpenListener, removePostSelectionChangedListener, resetFilters, setComparator, setComparer, setContentProvider, setFilters, setInput, setSelectionToWidget, setSorter, setUseHashlookup, testFindItem, testFindItems, unmapAllElements, unmapElement, unmapElement, update, updateItem, updateSelection, usingElementMap
getContentProvider, getInput, labelProviderChanged
addHelpListener, addSelectionChangedListener, fireHelpRequested, fireSelectionChanged, getData, handleHelpRequest, removeHelpListener, removeSelectionChangedListener, scrollDown, scrollUp, setData, setSelection
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addSelectionChangedListener, removeSelectionChangedListener, setSelection
public static final StyledString.Styler ERROR_STYLER
public TextGridObjectTableViewer(Composite parent, int style)
TextGridObject
TableViewer
with a default
label provider and an UpdatingDeferredListContentProvider
. You
must either call StructuredViewer.setInput(Object)
with some input that has a
IDeferredWorkbenchAdapter
, or set a different content provider
before you assign any input.
Note: Only one of the styles SINGLE, and MULTI may be specified.
public TableViewerColumn getColumn(TextGridObjectTableViewer.Column column)
public void setVisibleColumns(EnumSet<TextGridObjectTableViewer.Column> columnsToShow)
public UpdatingDeferredListContentProvider getDefaultContentProvider()
public void setDefaultSelection(TextGridObject... defaultSelection)
StructuredViewer.setInput(Object)
.
If you use the default content provider, you cannot call
TableViewer.setSelection(org.eclipse.jface.viewers.ISelection, boolean)
immediately after StructuredViewer.setInput(Object)
because the viewer will only
contain a PendingUpdateAdapter
by then. When you set a default
selection instead using this method, these objects will be selected after
the content provider has finished loading (unless the user has already
selected something else).
defaultSelection
- One or more TextGridObject
s to select after loading.protected void init()
protected void initColumns()
init()
. If you override this, you will probably also need to
set an appropriate label provider.public void queryMetadata(String query)
queryFields
- the metadata fields to query.SearchRequest#setQueryMetadata(Map)