| java.lang.Object org.eclipse.jface.viewers.Viewer org.eclipse.jface.viewers.ContentViewer org.eclipse.jface.viewers.StructuredViewer org.eclipse.jface.viewers.ColumnViewer org.eclipse.jface.viewers.AbstractTableViewer
All known Subclasses: org.eclipse.jface.viewers.TableViewer,
AbstractTableViewer | abstract public class AbstractTableViewer extends ColumnViewer (Code) | | This is a widget independent class implementors of
org.eclipse.swt.widgets.Table like widgets can use to provide a
viewer on top of their widget implementations.
since: 3.3 |
Method Summary | |
public void | add(Object[] elements) Adds the given elements to this table viewer. | public void | add(Object element) Adds the given element to this table viewer. | protected void | assertContentProviderType(IContentProvider provider) | public void | clear(int index) | abstract protected void | doClear(int index) Clears the item at the given zero-relative index in the receiver. | abstract protected void | doClearAll() Clears all the items in the receiver. | abstract protected void | doDeselectAll() Deselects all selected items in the receiver. | protected Widget | doFindInputItem(Object element) | protected Widget | doFindItem(Object element) | abstract protected Widget | doGetColumn(int index) Returns the column at the given, zero-relative index in the receiver.
Throws an exception if the index is out of range. | abstract protected Item | doGetItem(int index) Returns the item at the given, zero-relative index in the receiver. | abstract protected int | doGetItemCount() Returns the number of items contained in the receiver. | abstract protected Item[] | doGetItems() Returns a (possibly empty) array of TableItems which are the items in the
receiver. | abstract protected Item[] | doGetSelection() Returns an array of
Item that are currently selected in the
receiver. | abstract protected int[] | doGetSelectionIndices() Returns the zero-relative indices of the items which are currently
selected in the receiver. | abstract protected int | doIndexOf(Item item) Searches the receiver's list starting at the first item (index 0) until
an item is found that is equal to the argument, and returns the index of
that item. | abstract protected void | doRemove(int start, int end) Removes the items from the receiver which are between the given
zero-relative start and end indices (inclusive). | abstract protected void | doRemove(int[] indices) Removes the items from the receiver's list at the given zero-relative
indices. | abstract protected void | doRemoveAll() Removes all of the items from the receiver. | abstract protected void | doResetItem(Item item) Resets the given item in the receiver. | abstract protected void | doSelect(int[] indices) Selects the items at the given zero-relative indices in the receiver. | abstract protected void | doSetItemCount(int count) Sets the number of items contained in the receiver. | abstract protected void | doSetSelection(Item[] items) Sets the receiver's selection to be the given array of items. | abstract protected void | doSetSelection(int[] indices) Selects the items at the given zero-relative indices in the receiver. | abstract protected void | doShowItem(Item item) Shows the item. | abstract protected void | doShowSelection() Shows the selection. | protected void | doUpdateItem(Widget widget, Object element, boolean fullMap) | protected Widget | getColumnViewerOwner(int columnIndex) | public Object | getElementAt(int index) Returns the element with the given index from this table viewer. | public IBaseLabelProvider | getLabelProvider() The table viewer implementation of this Viewer framework
method returns the label provider, which in the case of table viewers
will be an instance of either ITableLabelProvider or
ILabelProvider . | protected Object[] | getRawChildren(Object parent) | protected List | getSelectionFromWidget() | protected void | hookControl(Control control) | protected int | indexForElement(Object element) | protected void | inputChanged(Object input, Object oldInput) | public void | insert(Object element, int position) Inserts the given element into this table viewer at the given position.
If this viewer has a sorter, the position is ignored and the element is
inserted at the correct position in the sort order.
This method should be called (by the content provider) when elements have
been added to the model, in order to cause the viewer to accurately
reflect the model. | abstract protected ViewerRow | internalCreateNewRowPart(int style, int rowIndex) Create a new row. | protected void | internalRefresh(Object element) | protected void | internalRefresh(Object element, boolean updateLabels) | public void | remove(Object[] elements) Removes the given elements from this table viewer. | public void | remove(Object element) Removes the given element from this table viewer. | public void | replace(Object element, int index) Replace the entries starting at index with elements. | public void | reveal(Object element) | public void | setItemCount(int count) Set the item count of the receiver. | protected void | setSelectionToWidget(List list, boolean reveal) |
AbstractTableViewer | public AbstractTableViewer()(Code) | | Create the new viewer for table like widgets
|
add | public void add(Object[] elements)(Code) | | Adds the given elements to this table viewer. If this viewer does not
have a sorter, the elements are added at the end in the order given;
otherwise the elements are inserted at appropriate positions.
This method should be called (by the content provider) when elements have
been added to the model, in order to cause the viewer to accurately
reflect the model. This method only affects the viewer, not the model.
Parameters: elements - the elements to add |
add | public void add(Object element)(Code) | | Adds the given element to this table viewer. If this viewer does not have
a sorter, the element is added at the end; otherwise the element is
inserted at the appropriate position.
This method should be called (by the content provider) when a single
element has been added to the model, in order to cause the viewer to
accurately reflect the model. This method only affects the viewer, not
the model. Note that there is another method for efficiently processing
the simultaneous addition of multiple elements.
Parameters: element - the element to add |
clear | public void clear(int index)(Code) | | Clear the table item at the specified index
Parameters: index - the index of the table item to be cleared since: 3.1 |
doClear | abstract protected void doClear(int index)(Code) | | Clears the item at the given zero-relative index in the receiver. The
text, icon and other attributes of the item are set to the default value.
If the table was created with the SWT.VIRTUAL style, these
attributes are requested again as needed.
Parameters: index - the index of the item to clear exception: IllegalArgumentException - -if the index is not between 0 and the number of elementsin the list minus 1 (inclusive) See Also: SWT.VIRTUAL See Also: SWT.SetData since: 3.3 |
doClearAll | abstract protected void doClearAll()(Code) | | Clears all the items in the receiver. The text, icon and other attributes
of the items are set to their default values. If the table was created
with the SWT.VIRTUAL style, these attributes are requested
again as needed.
since: 3.3 |
doDeselectAll | abstract protected void doDeselectAll()(Code) | | Deselects all selected items in the receiver.
since: 3.3 |
doFindInputItem | protected Widget doFindInputItem(Object element)(Code) | | |
doGetColumn | abstract protected Widget doGetColumn(int index)(Code) | | Returns the column at the given, zero-relative index in the receiver.
Throws an exception if the index is out of range. Columns are returned in
the order that they were created. If no TableColumns were created by the
programmer, this method will throw ERROR_INVALID_RANGE despite the fact
that a single column of data may be visible in the table. This occurs
when the programmer uses the table like a list, adding items but never
creating a column.
Parameters: index - the index of the column to return the column at the given index exception: IllegalArgumentException - -if the index is not between 0 and the number of elementsin the list minus 1 (inclusive) since: 3.3 |
doGetItem | abstract protected Item doGetItem(int index)(Code) | | Returns the item at the given, zero-relative index in the receiver.
Throws an exception if the index is out of range.
Parameters: index - the index of the item to return the item at the given index exception: IllegalArgumentException - -if the index is not between 0 and the number of elementsin the list minus 1 (inclusive) since: 3.3 |
doGetItemCount | abstract protected int doGetItemCount()(Code) | | Returns the number of items contained in the receiver.
the number of items since: 3.3 |
doGetItems | abstract protected Item[] doGetItems()(Code) | | Returns a (possibly empty) array of TableItems which are the items in the
receiver.
the items in the receiver since: 3.3 |
doGetSelection | abstract protected Item[] doGetSelection()(Code) | | Returns an array of
Item that are currently selected in the
receiver. The order of the items is unspecified. An empty array indicates
that no items are selected.
an array representing the selection since: 3.3 |
doGetSelectionIndices | abstract protected int[] doGetSelectionIndices()(Code) | | Returns the zero-relative indices of the items which are currently
selected in the receiver. The order of the indices is unspecified. The
array is empty if no items are selected.
an array representing the selection since: 3.3 |
doIndexOf | abstract protected int doIndexOf(Item item)(Code) | | Searches the receiver's list starting at the first item (index 0) until
an item is found that is equal to the argument, and returns the index of
that item. If no item is found, returns -1.
Parameters: item - the search item the index of the item since: 3.3 |
doRemove | abstract protected void doRemove(int start, int end)(Code) | | Removes the items from the receiver which are between the given
zero-relative start and end indices (inclusive).
Parameters: start - the start of the range Parameters: end - the end of the range exception: IllegalArgumentException - -if either the start or end are not between 0 and thenumber of elements in the list minus 1 (inclusive) since: 3.3 |
doRemove | abstract protected void doRemove(int[] indices)(Code) | | Removes the items from the receiver's list at the given zero-relative
indices.
Parameters: indices - the array of indices of the items exception: IllegalArgumentException - -if the array is null, or if any of the indices is notbetween 0 and the number of elements in the list minus 1(inclusive) since: 3.3 |
doRemoveAll | abstract protected void doRemoveAll()(Code) | | Removes all of the items from the receiver.
since: 3.3 |
doResetItem | abstract protected void doResetItem(Item item)(Code) | | Resets the given item in the receiver. The text, icon and other attributes
of the item are set to their default values.
Parameters: item - the item to reset since: 3.3 |
doSelect | abstract protected void doSelect(int[] indices)(Code) | | Selects the items at the given zero-relative indices in the receiver.
The current selection is not cleared before the new items are selected.
If the item at a given index is not selected, it is selected.
If the item at a given index was already selected, it remains selected.
Indices that are out of range and duplicate indices are ignored.
If the receiver is single-select and multiple indices are specified,
then all indices are ignored.
Parameters: indices - the array of indices for the items to select exception: IllegalArgumentException - - if the array of indices is null |
doSetItemCount | abstract protected void doSetItemCount(int count)(Code) | | Sets the number of items contained in the receiver.
Parameters: count - the number of items since: 3.3 |
doSetSelection | abstract protected void doSetSelection(Item[] items)(Code) | | Sets the receiver's selection to be the given array of items. The current
selection is cleared before the new items are selected.
Items that are not in the receiver are ignored. If the receiver is
single-select and multiple items are specified, then all items are
ignored.
Parameters: items - the array of items exception: IllegalArgumentException - -if the array of items is null since: 3.3 |
doSetSelection | abstract protected void doSetSelection(int[] indices)(Code) | | Selects the items at the given zero-relative indices in the receiver. The
current selection is cleared before the new items are selected.
Indices that are out of range and duplicate indices are ignored. If the
receiver is single-select and multiple indices are specified, then all
indices are ignored.
Parameters: indices - the indices of the items to select exception: IllegalArgumentException - -if the array of indices is null since: 3.3 |
doShowItem | abstract protected void doShowItem(Item item)(Code) | | Shows the item. If the item is already showing in the receiver, this
method simply returns. Otherwise, the items are scrolled until the item
is visible.
Parameters: item - the item to be shown exception: IllegalArgumentException - -if the item is null since: 3.3 |
doShowSelection | abstract protected void doShowSelection()(Code) | | Shows the selection. If the selection is already showing in the receiver,
this method simply returns. Otherwise, the items are scrolled until the
selection is visible.
since: 3.3 |
doUpdateItem | protected void doUpdateItem(Widget widget, Object element, boolean fullMap)(Code) | | |
getColumnViewerOwner | protected Widget getColumnViewerOwner(int columnIndex)(Code) | | |
getElementAt | public Object getElementAt(int index)(Code) | | Returns the element with the given index from this table viewer. Returns
null if the index is out of range.
This method is internal to the framework.
Parameters: index - the zero-based index the element at the given index, or null if theindex is out of range |
getLabelProvider | public IBaseLabelProvider getLabelProvider()(Code) | | The table viewer implementation of this Viewer framework
method returns the label provider, which in the case of table viewers
will be an instance of either ITableLabelProvider or
ILabelProvider . If it is an
ITableLabelProvider , then it provides a separate label
text and image for each column. If it is an ILabelProvider ,
then it provides only the label text and image for the first column, and
any remaining columns are blank.
|
getSelectionFromWidget | protected List getSelectionFromWidget()(Code) | | |
hookControl | protected void hookControl(Control control)(Code) | | |
indexForElement | protected int indexForElement(Object element)(Code) | | Parameters: element - the element to insert the index where the item should be inserted. |
insert | public void insert(Object element, int position)(Code) | | Inserts the given element into this table viewer at the given position.
If this viewer has a sorter, the position is ignored and the element is
inserted at the correct position in the sort order.
This method should be called (by the content provider) when elements have
been added to the model, in order to cause the viewer to accurately
reflect the model. This method only affects the viewer, not the model.
Parameters: element - the element Parameters: position - a 0-based position relative to the model, or -1 to indicatethe last position |
internalCreateNewRowPart | abstract protected ViewerRow internalCreateNewRowPart(int style, int rowIndex)(Code) | | Create a new row. Callers can only use the returned object locally and before
making the next call on the viewer since it may be re-used for subsequent method
calls.
Parameters: style - the style for the new row Parameters: rowIndex - the index of the row or -1 if the row is appended at the end the newly created row |
internalRefresh | protected void internalRefresh(Object element)(Code) | | |
internalRefresh | protected void internalRefresh(Object element, boolean updateLabels)(Code) | | |
remove | public void remove(Object[] elements)(Code) | | Removes the given elements from this table viewer. The selection is
updated if required.
This method should be called (by the content provider) when elements have
been removed from the model, in order to cause the viewer to accurately
reflect the model. This method only affects the viewer, not the model.
Parameters: elements - the elements to remove |
remove | public void remove(Object element)(Code) | | Removes the given element from this table viewer. The selection is
updated if necessary.
This method should be called (by the content provider) when a single
element has been removed from the model, in order to cause the viewer to
accurately reflect the model. This method only affects the viewer, not
the model. Note that there is another method for efficiently processing
the simultaneous removal of multiple elements.
NOTE: removing an object from a virtual table will
decrement the itemCount.
Parameters: element - the element |
replace | public void replace(Object element, int index)(Code) | | Replace the entries starting at index with elements. This method assumes
all of these values are correct and will not call the content provider to
verify. Note that this method will create a TableItem for all of
the elements provided.
Parameters: element - Parameters: index - See Also: ILazyContentProvider since: 3.1 |
setItemCount | public void setItemCount(int count)(Code) | | Set the item count of the receiver.
Parameters: count - the new table size. since: 3.1 |
setSelectionToWidget | protected void setSelectionToWidget(List list, boolean reveal)(Code) | | |
Methods inherited from org.eclipse.jface.viewers.StructuredViewer | public void addDoubleClickListener(IDoubleClickListener listener)(Code)(Java Doc) public void addDragSupport(int operations, Transfer[] transferTypes, DragSourceListener listener)(Code)(Java Doc) public void addDropSupport(int operations, Transfer[] transferTypes, DropTargetListener listener)(Code)(Java Doc) public void addFilter(ViewerFilter filter)(Code)(Java Doc) public void addOpenListener(IOpenListener listener)(Code)(Java Doc) public void addPostSelectionChangedListener(ISelectionChangedListener listener)(Code)(Java Doc) protected void assertContentProviderType(IContentProvider provider)(Code)(Java Doc) protected void assertElementsNotNull(Object[] elements)(Code)(Java Doc) protected void associate(Object element, Item item)(Code)(Java Doc) protected void buildLabel(ViewerLabel updateLabel, Object element)(Code)(Java Doc) void buildLabel(ViewerLabel updateLabel, Object element, IViewerLabelProvider labelProvider)(Code)(Java Doc) void buildLabel(ViewerLabel updateLabel, TreePath elementPath, ITreePathLabelProvider labelProvider)(Code)(Java Doc) void buildLabel(ViewerLabel updateLabel, Object element, ILabelProvider labelProvider)(Code)(Java Doc) protected void disassociate(Item item)(Code)(Java Doc) abstract protected Widget doFindInputItem(Object element)(Code)(Java Doc) abstract protected Widget doFindItem(Object element)(Code)(Java Doc) abstract protected void doUpdateItem(Widget item, Object element, boolean fullMap)(Code)(Java Doc) protected boolean equals(Object elementA, Object elementB)(Code)(Java Doc) protected Object[] filter(Object[] elements)(Code)(Java Doc) final protected Widget findItem(Object element)(Code)(Java Doc) final protected Widget[] findItems(Object element)(Code)(Java Doc) protected void fireDoubleClick(DoubleClickEvent event)(Code)(Java Doc) protected void fireOpen(OpenEvent event)(Code)(Java Doc) protected void firePostSelectionChanged(SelectionChangedEvent event)(Code)(Java Doc) protected ColorAndFontCollector getColorAndFontCollector()(Code)(Java Doc) public ViewerComparator getComparator()(Code)(Java Doc) public IElementComparer getComparer()(Code)(Java Doc) protected Object[] getFilteredChildren(Object parent)(Code)(Java Doc) public ViewerFilter[] getFilters()(Code)(Java Doc) protected Item getItem(int x, int y)(Code)(Java Doc) protected Object[] getRawChildren(Object parent)(Code)(Java Doc) protected Object getRoot()(Code)(Java Doc) public ISelection getSelection()(Code)(Java Doc) abstract protected List getSelectionFromWidget()(Code)(Java Doc) protected Object[] getSortedChildren(Object parent)(Code)(Java Doc) public ViewerSorter getSorter()(Code)(Java Doc) protected void handleDispose(DisposeEvent event)(Code)(Java Doc) protected void handleDoubleSelect(SelectionEvent event)(Code)(Java Doc) protected void handleInvalidSelection(ISelection invalidSelection, ISelection newSelection)(Code)(Java Doc) protected void handleLabelProviderChanged(LabelProviderChangedEvent event)(Code)(Java Doc) protected void handleOpen(SelectionEvent event)(Code)(Java Doc) protected void handlePostSelect(SelectionEvent e)(Code)(Java Doc) protected void handleSelect(SelectionEvent event)(Code)(Java Doc) protected boolean hasFilters()(Code)(Java Doc) protected void hookControl(Control control)(Code)(Java Doc) abstract protected void internalRefresh(Object element)(Code)(Java Doc) protected void internalRefresh(Object element, boolean updateLabels)(Code)(Java Doc) protected void internalUpdate(Widget widget, Object element, String[] properties)(Code)(Java Doc) protected void mapElement(Object element, Widget item)(Code)(Java Doc) protected boolean needsRefilter(Object element, String property)(Code)(Java Doc) CustomHashtable newHashtable(int capacity)(Code)(Java Doc) protected void preservingSelection(Runnable updateCode)(Code)(Java Doc) void preservingSelection(Runnable updateCode, boolean reveal)(Code)(Java Doc) public void refresh()(Code)(Java Doc) public void refresh(boolean updateLabels)(Code)(Java Doc) public void refresh(Object element)(Code)(Java Doc) public void refresh(Object element, boolean updateLabels)(Code)(Java Doc) final protected void refreshItem(Widget widget, Object element)(Code)(Java Doc) public void removeDoubleClickListener(IDoubleClickListener listener)(Code)(Java Doc) public void removeFilter(ViewerFilter filter)(Code)(Java Doc) public void removeOpenListener(IOpenListener listener)(Code)(Java Doc) public void removePostSelectionChangedListener(ISelectionChangedListener listener)(Code)(Java Doc) public void resetFilters()(Code)(Java Doc) abstract public void reveal(Object element)(Code)(Java Doc) public void setComparator(ViewerComparator comparator)(Code)(Java Doc) public void setComparer(IElementComparer comparer)(Code)(Java Doc) public void setContentProvider(IContentProvider provider)(Code)(Java Doc) public void setFilters(ViewerFilter[] filters)(Code)(Java Doc) final public void setInput(Object input)(Code)(Java Doc) public void setLabelProvider(IBaseLabelProvider labelProvider)(Code)(Java Doc) public void setSelection(ISelection selection, boolean reveal)(Code)(Java Doc) abstract protected void setSelectionToWidget(List l, boolean reveal)(Code)(Java Doc) protected void setSelectionToWidget(ISelection selection, boolean reveal)(Code)(Java Doc) public void setSorter(ViewerSorter sorter)(Code)(Java Doc) public void setUseHashlookup(boolean enable)(Code)(Java Doc) public Widget testFindItem(Object element)(Code)(Java Doc) public Widget[] testFindItems(Object element)(Code)(Java Doc) protected void unmapAllElements()(Code)(Java Doc) protected void unmapElement(Object element)(Code)(Java Doc) protected void unmapElement(Object element, Widget item)(Code)(Java Doc) public void update(Object[] elements, String[] properties)(Code)(Java Doc) public void update(Object element, String[] properties)(Code)(Java Doc) final protected void updateItem(Widget widget, Object element)(Code)(Java Doc) protected void updateSelection(ISelection selection)(Code)(Java Doc) protected boolean usingElementMap()(Code)(Java Doc)
|
Fields inherited from org.eclipse.jface.viewers.Viewer | final protected static String WIDGET_DATA_KEY(Code)(Java Doc)
|
|
|