| java.lang.Object org.eclipse.jface.viewers.Viewer org.eclipse.jface.viewers.ContentViewer org.eclipse.jface.viewers.StructuredViewer org.eclipse.jface.viewers.ColumnViewer
All known Subclasses: org.eclipse.jface.viewers.AbstractTableViewer, org.eclipse.jface.viewers.AbstractTreeViewer,
ColumnViewer | abstract public class ColumnViewer extends StructuredViewer (Code) | | The ColumnViewer is the abstract superclass of viewers that have columns
(e.g., AbstractTreeViewer and AbstractTableViewer). Concrete subclasses of
ColumnViewer should implement a matching concrete subclass of
ViewerColumn .
This class is not intended to be subclassed outside of the JFace
viewers framework.
since: 3.3 |
Constructor Summary | |
public | ColumnViewer() Create a new instance of the receiver. |
Method Summary | |
protected void | applyEditorValue() Apply the value of the active cell editor if one is active. | public void | cancelEditing() Cancels a currently active cell editor if one is active. | void | clearLegacyEditingSetup() | abstract protected ColumnViewerEditor | createViewerEditor() Creates the viewer editor used for editing cell contents. | abstract protected int | doGetColumnCount() Returns the number of columns contained in the receiver. | public void | editElement(Object element, int column) Starts editing the given element at the given column index. | ViewerCell | getCell(Point point) | public CellEditor[] | getCellEditors() Return the CellEditors for the receiver, or null if no
cell editors are set. | public ICellModifier | getCellModifier() Returns the cell modifier of this viewer, or null if none
has been set. | public Object[] | getColumnProperties() Returns the column properties of this table viewer. | public ColumnViewerEditor | getColumnViewerEditor() | abstract protected Widget | getColumnViewerOwner(int columnIndex) Returns the column widget at the given column index. | protected Item | getItem(int x, int y) | abstract protected Item | getItemAt(Point point) Returns the
Item at the given widget-relative coordinates, or
null if there is no item at the given coordinates. | public CellLabelProvider | getLabelProvider(int columnIndex) Returns the label provider associated with the column at the given index
or null if no column with this index is known. | protected Object[] | getRawChildren(Object parent) | ViewerColumn | getViewerColumn(int columnIndex) Returns the viewer column for the given column index. | protected ViewerRow | getViewerRow(Point point) Returns the viewer row at the given widget-relative coordinates. | abstract protected ViewerRow | getViewerRowFromItem(Widget item) Returns a
ViewerRow associated with the given row widget. | protected void | hookControl(Control control) | protected void | hookEditingSupport(Control control) Hook up the editing support. | boolean | isBusy() | public boolean | isCellEditorActive() Returns whether there is an active cell editor. | public void | refresh(Object element) | public void | refresh(Object element, boolean updateLabels) | public void | setCellEditors(CellEditor[] editors) Sets the cell editors of this column viewer. | public void | setCellModifier(ICellModifier modifier) Sets the cell modifier for this column viewer. | public void | setColumnProperties(String[] columnProperties) Sets the column properties of this column viewer. | public void | setColumnViewerEditor(ColumnViewerEditor columnViewerEditor) | public void | setLabelProvider(IBaseLabelProvider labelProvider) The column viewer implementation of this Viewer framework
method ensures that the given label provider is an instance of
ITableLabelProvider , ILabelProvider , or
CellLabelProvider .
If the label provider is an
ITableLabelProvider , then it
provides a separate label text and image for each column. | protected void | triggerEditorActivationEvent(ColumnViewerEditorActivationEvent event) | public void | update(Object element, String[] properties) | ViewerCell | updateCell(ViewerRow rowItem, int column, Object element) Update the cached cell object with the given row and column. |
logWhenBusy | boolean logWhenBusy(Code) | | |
ColumnViewer | public ColumnViewer()(Code) | | Create a new instance of the receiver.
|
applyEditorValue | protected void applyEditorValue()(Code) | | Apply the value of the active cell editor if one is active.
since: 3.3 |
cancelEditing | public void cancelEditing()(Code) | | Cancels a currently active cell editor if one is active. All changes
already done in the cell editor are lost.
since: 3.1 (in subclasses, added in 3.3 to abstract class) |
clearLegacyEditingSetup | void clearLegacyEditingSetup()(Code) | | |
createViewerEditor | abstract protected ColumnViewerEditor createViewerEditor()(Code) | | Creates the viewer editor used for editing cell contents. To be
implemented by subclasses.
the editor, or null if this viewer does notsupport editing cell contents. |
doGetColumnCount | abstract protected int doGetColumnCount()(Code) | | Returns the number of columns contained in the receiver. If no columns
were created by the programmer, this value is zero, despite the fact that
visually, one column of items may be visible. This occurs when the
programmer uses the column viewer like a list, adding elements but never
creating a column.
the number of columns since: 3.3 |
editElement | public void editElement(Object element, int column)(Code) | | Starts editing the given element at the given column index.
Parameters: element - the model element Parameters: column - the column index since: 3.1 (in subclasses, added in 3.3 to abstract class) |
getCell | ViewerCell getCell(Point point)(Code) | | Returns the viewer cell at the given widget-relative coordinates, or
null if there is no cell at that location
Parameters: point - the widget-relative coordinates the cell or null if no cell is found at the givenpoint |
getColumnViewerOwner | abstract protected Widget getColumnViewerOwner(int columnIndex)(Code) | | Returns the column widget at the given column index.
Parameters: columnIndex - the column index Widget the column widget |
getItem | protected Item getItem(int x, int y)(Code) | | |
getItemAt | abstract protected Item getItemAt(Point point)(Code) | | Returns the
Item at the given widget-relative coordinates, or
null if there is no item at the given coordinates.
Parameters: point - the widget-relative coordinates the Item at the coordinates or null ifthere is no item at the given coordinates |
getLabelProvider | public CellLabelProvider getLabelProvider(int columnIndex)(Code) | | Returns the label provider associated with the column at the given index
or null if no column with this index is known.
Parameters: columnIndex - the column index the label provider associated with the column ornull if no column with this index is known since: 3.3 |
getViewerColumn | ViewerColumn getViewerColumn(int columnIndex)(Code) | | Returns the viewer column for the given column index.
Parameters: columnIndex - the column index the viewer column at the given index, or null ifthere is none for the given index |
getViewerRow | protected ViewerRow getViewerRow(Point point)(Code) | | Returns the viewer row at the given widget-relative coordinates.
Parameters: point - the widget-relative coordinates of the viewer row ViewerRow the row or null if no row is found atthe given coordinates |
getViewerRowFromItem | abstract protected ViewerRow getViewerRowFromItem(Widget item)(Code) | | Returns a
ViewerRow associated with the given row widget.
Implementations may re-use the same instance for different row widgets;
callers can only use the viewer row locally and until the next call to
this method.
Parameters: item - the row widget ViewerRow a viewer row object |
hookControl | protected void hookControl(Control control)(Code) | | |
hookEditingSupport | protected void hookEditingSupport(Control control)(Code) | | Hook up the editing support. Subclasses may override.
Parameters: control - the control you want to hook on |
refresh | public void refresh(Object element, boolean updateLabels)(Code) | | |
setColumnProperties | public void setColumnProperties(String[] columnProperties)(Code) | | Sets the column properties of this column viewer. The properties must
correspond with the columns of the control. They are used to identify the
column in a cell modifier. If editing is not supported by this viewer the
call simply has no effect.
Since 3.3, an alternative API is available, see
ViewerColumn.setEditingSupport(EditingSupport) for a more
flexible way of editing values in a column viewer.
Parameters: columnProperties - the list of column properties since: 3.1 (in subclasses, added in 3.3 to abstract class) See Also: ViewerColumn.setEditingSupport(EditingSupport) See Also: EditingSupport |
setColumnViewerEditor | public void setColumnViewerEditor(ColumnViewerEditor columnViewerEditor)(Code) | | Parameters: columnViewerEditor - the new column viewer editor |
setLabelProvider | public void setLabelProvider(IBaseLabelProvider labelProvider)(Code) | | The column viewer implementation of this Viewer framework
method ensures that the given label provider is an instance of
ITableLabelProvider , ILabelProvider , or
CellLabelProvider .
If the label provider is an
ITableLabelProvider , then it
provides a separate label text and image for each column. Implementers of
ITableLabelProvider may also implement
ITableColorProvider and/or
ITableFontProvider to provide
colors and/or fonts.
If the label provider is an ILabelProvider , then it
provides only the label text and image for the first column, and any
remaining columns are blank. Implementers of ILabelProvider
may also implement
IColorProvider and/or
IFontProvider to
provide colors and/or fonts.
|
triggerEditorActivationEvent | protected void triggerEditorActivationEvent(ColumnViewerEditorActivationEvent event)(Code) | | Invoking this method fires an editor activation event which tries to
enable the editor but before this event is passed to
ColumnViewerEditorActivationStrategy to see if this event should
really trigger editor activation
Parameters: event - the activation event |
updateCell | ViewerCell updateCell(ViewerRow rowItem, int column, Object element)(Code) | | Update the cached cell object with the given row and column.
Parameters: rowItem - Parameters: column - ViewerCell |
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)
|
|
|