|
Eclipse Platform Release 3.6 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.jface.viewers.Viewer
org.eclipse.jface.viewers.ContentViewer
org.eclipse.jface.viewers.StructuredViewer
org.eclipse.jface.viewers.ColumnViewer
org.eclipse.jface.viewers.AbstractTreeViewer
org.eclipse.jface.viewers.TableTreeViewer
TreeViewer instead
public class TableTreeViewer
A concrete viewer based on a SWT TableTree control.
This class is not intended to be subclassed outside the viewer framework. It is designed to be instantiated with a pre-existing SWT table tree control and configured with a domain-specific content provider, label provider, element filter (optional), and element sorter (optional).
Content providers for table tree viewers must implement the
ITreeContentProvider interface.
Label providers for table tree viewers must implement either the
ITableLabelProvider or the ILabelProvider
interface (see TableTreeViewer.setLabelProvider for more
details).
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.eclipse.jface.viewers.StructuredViewer |
|---|
StructuredViewer.ColorAndFontCollector, StructuredViewer.ColorAndFontCollectorWithProviders |
| Field Summary |
|---|
| Fields inherited from class org.eclipse.jface.viewers.AbstractTreeViewer |
|---|
ALL_LEVELS |
| Fields inherited from class org.eclipse.jface.viewers.Viewer |
|---|
WIDGET_DATA_KEY |
| Constructor Summary | |
|---|---|
TableTreeViewer(Composite parent)
Deprecated. Creates a table tree viewer on a newly-created table tree control under the given parent. |
|
TableTreeViewer(Composite parent,
int style)
Deprecated. Creates a table tree viewer on a newly-created table tree control under the given parent. |
|
TableTreeViewer(TableTree tree)
Deprecated. Creates a table tree viewer on the given table tree control. |
|
| Method Summary | |
|---|---|
protected void |
addTreeListener(Control c,
TreeListener listener)
Deprecated. Adds the given SWT tree listener to the given SWT control. |
void |
cancelEditing()
Deprecated. Cancels a currently active cell editor. |
protected void |
doUpdateItem(Item item,
java.lang.Object element)
Deprecated. Copies the attributes of the given element into the given SWT item. |
void |
editElement(java.lang.Object element,
int column)
Deprecated. Starts editing the given element. |
CellEditor[] |
getCellEditors()
Deprecated. Returns the cell editors of this viewer. |
ICellModifier |
getCellModifier()
Deprecated. Returns the cell modifier of this viewer. |
protected Item |
getChild(Widget widget,
int index)
Deprecated. Get the child for the widget at index. |
protected Item[] |
getChildren(Widget o)
Deprecated. Returns the SWT child items for the given SWT widget. |
java.lang.Object[] |
getColumnProperties()
Deprecated. Returns the column properties of this viewer. |
Control |
getControl()
Deprecated. Returns the primary control associated with this viewer. |
java.lang.Object |
getElementAt(int index)
Deprecated. Returns the element with the given index from this viewer. |
protected boolean |
getExpanded(Item item)
Deprecated. Returns whether the given SWT item is expanded or collapsed. |
protected Item |
getItemAt(Point p)
Deprecated. This implementation of AbstractTreeViewer.getItemAt(Point) returns null to ensure
API backwards compatibility. |
protected int |
getItemCount(Control widget)
Deprecated. Returns the number of child items of the given SWT control. |
protected int |
getItemCount(Item item)
Deprecated. Returns the number of child items of the given SWT item. |
protected Item[] |
getItems(Item item)
Deprecated. Returns the child items of the given SWT item. |
IBaseLabelProvider |
getLabelProvider()
Deprecated. The table tree viewer implementation of this Viewer
framework method returns the label provider, which in the case of table
tree viewers will be an instance of either
ITableLabelProvider or ILabelProvider. |
protected Item |
getParentItem(Item item)
Deprecated. Returns the parent item of the given item in the tree, or null if there is no parent item. |
protected Item[] |
getSelection(Control widget)
Deprecated. Returns all selected items for the given SWT control. |
TableTree |
getTableTree()
Deprecated. Returns this table tree viewer's table tree control. |
protected void |
hookControl(Control control)
Deprecated. Adds event listener hooks to the given control. |
boolean |
isCellEditorActive()
Deprecated. Returns whether there is an active cell editor. |
protected Item |
newItem(Widget parent,
int flags,
int ix)
Deprecated. Creates a new item. |
protected void |
removeAll(Control widget)
Deprecated. Removes all items from the given control. |
void |
setCellEditors(CellEditor[] editors)
Deprecated. Sets the cell editors of this table viewer. |
void |
setCellModifier(ICellModifier modifier)
Deprecated. Sets the cell modifier of this table viewer. |
void |
setColumnProperties(java.lang.String[] columnProperties)
Deprecated. Sets the column properties of this table viewer. |
protected void |
setExpanded(Item node,
boolean expand)
Deprecated. Sets the expand state of the given item. |
protected void |
setSelection(java.util.List items)
Deprecated. Sets the selection to the given list of items. |
protected void |
showItem(Item item)
Deprecated. Shows the given item. |
| Methods inherited from class org.eclipse.jface.viewers.ColumnViewer |
|---|
applyEditorValue, checkBusy, getCell, getColumnViewerEditor, getItem, getLabelProvider, getViewerRow, hookEditingSupport, isBusy, refresh, refresh, setBusy, setColumnViewerEditor, setLabelProvider, triggerEditorActivationEvent, update |
| Methods inherited from class org.eclipse.jface.viewers.ContentViewer |
|---|
getContentProvider, getInput |
| Methods inherited from class org.eclipse.jface.viewers.Viewer |
|---|
addHelpListener, addSelectionChangedListener, fireHelpRequested, fireSelectionChanged, getData, handleHelpRequest, removeHelpListener, removeSelectionChangedListener, setData, setSelection |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.eclipse.jface.viewers.ISelectionProvider |
|---|
addSelectionChangedListener, removeSelectionChangedListener, setSelection |
| Constructor Detail |
|---|
public TableTreeViewer(TableTree tree)
tree - the table tree controlpublic TableTreeViewer(Composite parent)
MULTI, H_SCROLL, V_SCROLL, and BORDER. The viewer
has no input, no content provider, a default label provider, no sorter,
and no filters.
parent - the parent control
public TableTreeViewer(Composite parent,
int style)
parent - the parent controlstyle - the SWT style bits| Method Detail |
|---|
protected void addTreeListener(Control c,
TreeListener listener)
AbstractTreeViewer
addTreeListener in class AbstractTreeViewerc - the SWT controllistener - the SWT tree listenerpublic void cancelEditing()
cancelEditing in class ColumnViewer
protected void doUpdateItem(Item item,
java.lang.Object element)
AbstractTreeViewer
doUpdateItem in class AbstractTreeVieweritem - the SWT itemelement - the element
public void editElement(java.lang.Object element,
int column)
editElement in class ColumnViewerelement - the elementcolumn - the column numberpublic CellEditor[] getCellEditors()
getCellEditors in class ColumnViewerViewerColumn.setEditingSupport(EditingSupport),
EditingSupportpublic ICellModifier getCellModifier()
getCellModifier in class ColumnViewerViewerColumn.setEditingSupport(EditingSupport),
EditingSupportprotected Item[] getChildren(Widget o)
AbstractTreeViewer
getChildren in class AbstractTreeViewero - the widget
protected Item getChild(Widget widget,
int index)
AbstractTreeViewer
getChild in class AbstractTreeViewerwidget - the widget to checkindex - the index of the widget
null if widget is not a type that can
contain items.public java.lang.Object[] getColumnProperties()
getColumnProperties in class ColumnViewerViewerColumn.setEditingSupport(EditingSupport),
EditingSupportpublic Control getControl()
Viewer
getControl in class Viewerpublic java.lang.Object getElementAt(int index)
null if the index is out of range.
This method is internal to the framework.
index - the zero-based index
null if the
index is out of rangeprotected boolean getExpanded(Item item)
AbstractTreeViewer
getExpanded in class AbstractTreeVieweritem - the item
true if the item is considered expanded and
false if collapsedprotected Item getItemAt(Point p)
AbstractTreeViewerAbstractTreeViewer.getItemAt(Point) returns null to ensure
API backwards compatibility. Subclasses should override.
getItemAt in class AbstractTreeViewerp - the widget-relative coordinates
Item at the coordinates or null if there
is no item at the given coordinatesprotected int getItemCount(Control widget)
AbstractTreeViewer
getItemCount in class AbstractTreeViewerwidget - the control
protected int getItemCount(Item item)
AbstractTreeViewer
getItemCount in class AbstractTreeVieweritem - the item
protected Item[] getItems(Item item)
AbstractTreeViewer
getItems in class AbstractTreeVieweritem - the item
public IBaseLabelProvider getLabelProvider()
Viewer
framework method returns the label provider, which in the case of table
tree 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.
getLabelProvider in class ContentViewerprotected Item getParentItem(Item item)
AbstractTreeViewernull if there is no parent item.
getParentItem in class AbstractTreeVieweritem - the item
null if noneprotected Item[] getSelection(Control widget)
AbstractTreeViewer
getSelection in class AbstractTreeViewerwidget - the control
public TableTree getTableTree()
protected void hookControl(Control control)
ContentViewerAll subclasses must call this method when their control is first established.
The ContentViewer implementation of this method hooks
dispose events for the given control.
Subclasses may override if they need to add other control hooks;
however, super.hookControl must be invoked.
hookControl in class AbstractTreeViewercontrol - the controlpublic boolean isCellEditorActive()
isCellEditorActive in class ColumnViewertrue if there is an active cell editor, and
false otherwiseViewerColumn.setEditingSupport(EditingSupport),
EditingSupport
protected Item newItem(Widget parent,
int flags,
int ix)
AbstractTreeViewer
newItem in class AbstractTreeViewerparent - the parent widgetflags - SWT style bitsix - if non-negative, indicates the position to insert the item
into its parent
protected void removeAll(Control widget)
AbstractTreeViewer
removeAll in class AbstractTreeViewerwidget - the controlpublic void setCellEditors(CellEditor[] editors)
setCellEditors in class ColumnViewereditors - the list of cell editorsViewerColumn.setEditingSupport(EditingSupport),
EditingSupportpublic void setCellModifier(ICellModifier modifier)
setCellModifier in class ColumnViewermodifier - the cell modifierViewerColumn.setEditingSupport(EditingSupport),
EditingSupportpublic void setColumnProperties(java.lang.String[] columnProperties)
setColumnProperties in class ColumnViewercolumnProperties - the list of column propertiesViewerColumn.setEditingSupport(EditingSupport),
EditingSupport
protected void setExpanded(Item node,
boolean expand)
AbstractTreeViewer
setExpanded in class AbstractTreeViewernode - the itemexpand - the expand state of the itemprotected void setSelection(java.util.List items)
AbstractTreeViewer
setSelection in class AbstractTreeVieweritems - list of items (element type:
org.eclipse.swt.widgets.Item)protected void showItem(Item item)
AbstractTreeViewer
showItem in class AbstractTreeVieweritem - the item
|
Eclipse Platform Release 3.6 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Guidelines for using Eclipse APIs.
Copyright (c) Eclipse contributors and others 2000, 2010. All rights reserved.