| java.lang.Object org.eclipse.jface.viewers.Viewer org.eclipse.jface.viewers.ContentViewer org.eclipse.jface.viewers.StructuredViewer org.eclipse.jface.viewers.AbstractListViewer
All known Subclasses: org.eclipse.jface.viewers.ListViewer, org.eclipse.jface.viewers.ComboViewer,
Method Summary | |
public void | add(Object[] elements) Adds the given elements to this list 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. | public void | add(Object element) Adds the given element to this list 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. | protected Widget | doFindInputItem(Object element) | protected Widget | doFindItem(Object element) | protected void | doUpdateItem(Widget data, Object element, boolean fullMap) | public Object | getElementAt(int index) Returns the element with the given index from this list viewer. | int | getElementIndex(Object element) Returns the index of the given element in listMap, or -1 if the element cannot be found. | public IBaseLabelProvider | getLabelProvider() The list viewer implementation of this Viewer framework
method returns the label provider, which in the case of list
viewers will be an instance of ILabelProvider . | protected List | getSelectionFromWidget() | 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 list 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. | protected void | internalRefresh(Object element) | abstract protected void | listAdd(String string, int index) | abstract protected void | listDeselectAll() Deselects all selected items in the underlying widget. | abstract protected int | listGetItemCount() Returns the number of items contained in the underlying widget. | abstract protected int[] | listGetSelectionIndices() Returns the zero-relative indices of the items which are currently
selected in the underlying widget. | protected int | listGetTopIndex() Returns the index of the item currently at the top of the viewable area. | abstract protected void | listRemove(int index) Removes the item from the underlying widget at the given
zero-relative index. | abstract protected void | listRemoveAll() Removes all of the items from the underlying widget. | abstract protected void | listSetItem(int index, String string) Sets the text of the item at the given index in the underlying widget. | abstract protected void | listSetItems(String[] labels) Sets the underlying widget's items to be the given array of items. | abstract protected void | listSetSelection(int[] ixs) Selects the items at the given zero-relative indices in the underlying widget. | protected void | listSetTopIndex(int index) Sets the index of the item to be at the top of the viewable area.
Default implementation does nothing.
Parameters: index - the given index. | abstract protected void | listShowSelection() Shows the selection. | public void | remove(Object[] elements) Removes the given elements from this list 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. | public void | remove(Object element) Removes the given element from this list 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. | public void | setLabelProvider(IBaseLabelProvider labelProvider) The list viewer implementation of this Viewer framework
method ensures that the given label provider is an instance of
ILabelProvider . | protected void | setSelectionToWidget(List in, boolean reveal) |
add | public void add(Object[] elements)(Code) | | Adds the given elements to this list 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 list 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 |
doFindInputItem | protected Widget doFindInputItem(Object element)(Code) | | |
doUpdateItem | protected void doUpdateItem(Widget data, Object element, boolean fullMap)(Code) | | |
getElementAt | public Object getElementAt(int index)(Code) | | Returns the element with the given index from this list viewer.
Returns null if the index is out of range.
Parameters: index - the zero-based index the element at the given index, or null if theindex is out of range |
getElementIndex | int getElementIndex(Object element)(Code) | | Returns the index of the given element in listMap, or -1 if the element cannot be found.
As of 3.3, uses the element comparer if available.
Parameters: element - the index |
getLabelProvider | public IBaseLabelProvider getLabelProvider()(Code) | | The list viewer implementation of this Viewer framework
method returns the label provider, which in the case of list
viewers will be an instance of ILabelProvider .
|
getSelectionFromWidget | protected List getSelectionFromWidget()(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 list 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 since: 3.3 |
internalRefresh | protected void internalRefresh(Object element)(Code) | | |
listAdd | abstract protected void listAdd(String string, int index)(Code) | | Adds the given string to the underlying widget at the given index
Parameters: string - the string to add Parameters: index - position to insert the string into |
listDeselectAll | abstract protected void listDeselectAll()(Code) | | Deselects all selected items in the underlying widget.
|
listGetItemCount | abstract protected int listGetItemCount()(Code) | | Returns the number of items contained in the underlying widget.
the number of items |
listGetSelectionIndices | abstract protected int[] listGetSelectionIndices()(Code) | | Returns the zero-relative indices of the items which are currently
selected in the underlying widget. The array is empty if no items are selected.
Note: This is not the actual structure used by the receiver
to maintain its selection, so modifying the array will
not affect the receiver.
the array of indices of the selected items |
listGetTopIndex | protected int listGetTopIndex()(Code) | | Returns the index of the item currently at the top of the viewable area.
Default implementation returns -1.
index, -1 for none since: 3.3 |
listRemove | abstract protected void listRemove(int index)(Code) | | Removes the item from the underlying widget at the given
zero-relative index.
Parameters: index - the index for the item |
listRemoveAll | abstract protected void listRemoveAll()(Code) | | Removes all of the items from the underlying widget.
|
listSetItem | abstract protected void listSetItem(int index, String string)(Code) | | Sets the text of the item at the given index in the underlying widget.
Parameters: index - index to modify Parameters: string - new text |
listSetItems | abstract protected void listSetItems(String[] labels)(Code) | | Sets the underlying widget's items to be the given array of items.
Parameters: labels - the array of label text |
listSetSelection | abstract protected void listSetSelection(int[] ixs)(Code) | | Selects the items at the given zero-relative indices in the underlying widget.
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: ixs - the indices of the items to select |
listSetTopIndex | protected void listSetTopIndex(int index)(Code) | | Sets the index of the item to be at the top of the viewable area.
Default implementation does nothing.
Parameters: index - the given index. -1 for none. index will always refer to a valid index. since: 3.3 |
listShowSelection | abstract protected void listShowSelection()(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.
|
remove | public void remove(Object[] elements)(Code) | | Removes the given elements from this list 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 list 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.
Parameters: element - the element |
setLabelProvider | public void setLabelProvider(IBaseLabelProvider labelProvider)(Code) | | The list viewer implementation of this Viewer framework
method ensures that the given label provider is an instance of
ILabelProvider .
The optional interfaces
IColorProvider and
IFontProvider have no effect for this type of viewer
|
setSelectionToWidget | protected void setSelectionToWidget(List in, 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)
|
|
|