TreeViewer
instead@Deprecated public class TableTreeViewer extends AbstractTreeViewer
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).
StructuredViewer.ColorAndFontCollector, StructuredViewer.ColorAndFontCollectorWithProviders
ALL_LEVELS
WIDGET_DATA_KEY
Constructor and Description |
---|
TableTreeViewer(Composite parent)
Deprecated.
|
TableTreeViewer(Composite parent,
int style)
Deprecated.
|
TableTreeViewer(TableTree tree)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
protected void |
addTreeListener(Control c,
TreeListener listener)
Deprecated.
Adds the given SWT tree listener to the given SWT control.
|
void |
cancelEditing()
Deprecated.
|
protected void |
doUpdateItem(Item item,
Object element)
Deprecated.
Copies the attributes of the given element into the given SWT item.
|
void |
editElement(Object element,
int column)
Deprecated.
|
CellEditor[] |
getCellEditors()
Deprecated.
|
ICellModifier |
getCellModifier()
Deprecated.
|
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.
|
Object[] |
getColumnProperties()
Deprecated.
|
Control |
getControl()
Deprecated.
|
Object |
getElementAt(int index)
Deprecated.
|
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.
|
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.
|
protected void |
hookControl(Control control)
Deprecated.
Adds event listener hooks to the given control.
|
boolean |
isCellEditorActive()
Deprecated.
|
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.
|
void |
setCellModifier(ICellModifier modifier)
Deprecated.
|
void |
setColumnProperties(String[] columnProperties)
Deprecated.
|
protected void |
setExpanded(Item node,
boolean expand)
Deprecated.
|
protected void |
setSelection(List items)
Deprecated.
|
protected void |
showItem(Item item)
Deprecated.
|
add, add, addSelectionListener, addTreeListener, assertContentProviderType, associate, buildLabel, collapseAll, collapseToLevel, createChildren, createTreeItem, createViewerEditor, disassociate, doFindInputItem, doFindItem, doGetColumnCount, doUpdateItem, expandAll, expandToLevel, expandToLevel, fireTreeCollapsed, fireTreeExpanded, getAutoExpandLevel, getChildren, getColumnViewerOwner, getExpandedElements, getExpandedState, getExpandedTreePaths, getNextItem, getParentElement, getPreviousItem, getRawChildren, getSelection, getSelectionFromWidget, getSortedChildren, getTreePathFromItem, getViewerRowFromItem, getVisibleExpandedElements, handleDoubleSelect, handleTreeCollapse, handleTreeExpand, indexForElement, inputChanged, insert, internalAdd, internalCollapseToLevel, internalExpand, internalExpandToLevel, internalFindItems, internalGetWidgetToSelect, internalInitializeTree, internalIsInputOrEmptyPath, internalRefresh, internalRefresh, internalRefresh, internalRemove, internalRemove, isExpandable, isSameSelection, labelProviderChanged, remove, remove, remove, removeTreeListener, reveal, scrollDown, scrollUp, setAutoExpandLevel, setContentProvider, setExpandedElements, setExpandedState, setExpandedTreePaths, setExpandPreCheckFilters, setSelectionToWidget, setSelectionToWidget, updateChildren, updatePlus
applyEditorValue, checkBusy, getCell, getColumnViewerEditor, getItem, getLabelProvider, getViewerRow, handleDispose, hookEditingSupport, isBusy, refresh, refresh, setBusy, setColumnViewerEditor, setLabelProvider, triggerEditorActivationEvent, update
addDoubleClickListener, addDragSupport, addDropSupport, addFilter, addOpenListener, addPostSelectionChangedListener, assertElementsNotNull, equals, filter, findItem, findItems, fireDoubleClick, fireOpen, firePostSelectionChanged, getColorAndFontCollector, getComparator, getComparer, getFilteredChildren, getFilters, getRoot, getSorter, handleInvalidSelection, handleLabelProviderChanged, handleOpen, handlePostSelect, handleSelect, hasFilters, internalUpdate, mapElement, needsRefilter, preservingSelection, refresh, refresh, refreshItem, removeDoubleClickListener, removeFilter, removeOpenListener, removePostSelectionChangedListener, resetFilters, setComparator, setComparer, setFilters, setInput, setSelection, setSorter, setUseHashlookup, testFindItem, testFindItems, unmapAllElements, unmapElement, unmapElement, update, updateItem, updateSelection, usingElementMap
getContentProvider, getInput
addHelpListener, addSelectionChangedListener, fireHelpRequested, fireSelectionChanged, getData, handleHelpRequest, removeHelpListener, removeSelectionChangedListener, setData, setSelection
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addSelectionChangedListener, removeSelectionChangedListener, setSelection
@Deprecated public TableTreeViewer(TableTree tree)
tree
- the table tree control@Deprecated public 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@Deprecated public TableTreeViewer(Composite parent, int style)
parent
- the parent controlstyle
- the SWT style bitsprotected void addTreeListener(Control c, TreeListener listener)
AbstractTreeViewer
addTreeListener
in class AbstractTreeViewer
c
- the SWT controllistener
- the SWT tree listener@Deprecated public void cancelEditing()
ColumnViewer
cancelEditing
in class ColumnViewer
protected void doUpdateItem(Item item, Object element)
AbstractTreeViewer
doUpdateItem
in class AbstractTreeViewer
item
- the SWT itemelement
- the element@Deprecated public void editElement(Object element, int column)
ColumnViewer
editElement
in class ColumnViewer
element
- the model elementcolumn
- the column index@Deprecated public CellEditor[] getCellEditors()
ColumnViewer
null
if no cell
editors are set.
Since 3.3, an alternative API is available, see ViewerColumn.setEditingSupport(EditingSupport)
for a more flexible way
of editing values in a column viewer.
getCellEditors
in class ColumnViewer
ViewerColumn.setEditingSupport(EditingSupport)
,
EditingSupport
@Deprecated public ICellModifier getCellModifier()
ColumnViewer
null
if none
has been set.
Since 3.3, an alternative API is available, see ViewerColumn.setEditingSupport(EditingSupport)
for a more flexible way
of editing values in a column viewer.
getCellModifier
in class ColumnViewer
null
ViewerColumn.setEditingSupport(EditingSupport)
,
EditingSupport
protected Item[] getChildren(Widget o)
AbstractTreeViewer
getChildren
in class AbstractTreeViewer
o
- the widgetprotected Item getChild(Widget widget, int index)
AbstractTreeViewer
getChild
in class AbstractTreeViewer
widget
- the widget to checkindex
- the index of the widgetnull
if widget is not a type that can
contain items.@Deprecated public Object[] getColumnProperties()
ColumnViewer
Since 3.3, an alternative API is available, see ViewerColumn.setEditingSupport(EditingSupport)
for a more flexible way
of editing values in a column viewer.
getColumnProperties
in class ColumnViewer
ViewerColumn.setEditingSupport(EditingSupport)
,
EditingSupport
@Deprecated public Control getControl()
Viewer
getControl
in class Viewer
@Deprecated public Object getElementAt(int index)
null
if the index is out of range.
This method is internal to the framework.
index
- the zero-based indexnull
if the
index is out of rangeprotected boolean getExpanded(Item item)
AbstractTreeViewer
getExpanded
in class AbstractTreeViewer
item
- the itemtrue
if the item is considered expanded and
false
if collapsedprotected Item getItemAt(Point p)
AbstractTreeViewer
AbstractTreeViewer.getItemAt(Point)
returns null to ensure
API backwards compatibility. Subclasses should override.getItemAt
in class AbstractTreeViewer
p
- the widget-relative coordinatesItem
at the coordinates or null
if there
is no item at the given coordinatesprotected int getItemCount(Control widget)
AbstractTreeViewer
getItemCount
in class AbstractTreeViewer
widget
- the controlprotected int getItemCount(Item item)
AbstractTreeViewer
getItemCount
in class AbstractTreeViewer
item
- the itemprotected Item[] getItems(Item item)
AbstractTreeViewer
getItems
in class AbstractTreeViewer
item
- the item@Deprecated 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 ContentViewer
protected Item getParentItem(Item item)
AbstractTreeViewer
null
if there is no parent item.getParentItem
in class AbstractTreeViewer
item
- the itemnull
if noneprotected Item[] getSelection(Control widget)
AbstractTreeViewer
getSelection
in class AbstractTreeViewer
widget
- the control@Deprecated public TableTree getTableTree()
protected void hookControl(Control control)
ContentViewer
All 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 AbstractTreeViewer
control
- the control@Deprecated public boolean isCellEditorActive()
ColumnViewer
Since 3.3, an alternative API is available, see ViewerColumn.setEditingSupport(EditingSupport)
for a more flexible way
of editing values in a column viewer.
isCellEditorActive
in class ColumnViewer
true
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 AbstractTreeViewer
parent
- the parent widgetflags
- SWT style bitsix
- if non-negative, indicates the position to insert the item
into its parentprotected void removeAll(Control widget)
AbstractTreeViewer
removeAll
in class AbstractTreeViewer
widget
- the control@Deprecated public void setCellEditors(CellEditor[] editors)
ColumnViewer
Since 3.3, an alternative API is available, see ViewerColumn.setEditingSupport(EditingSupport)
for a more flexible way
of editing values in a column viewer.
Users setting up an editable TreeViewer
or TableViewer
with more than 1 column have
to pass the SWT.FULL_SELECTION style bit
setCellEditors
in class ColumnViewer
editors
- the list of cell editorsViewerColumn.setEditingSupport(EditingSupport)
,
EditingSupport
@Deprecated public void setCellModifier(ICellModifier modifier)
ColumnViewer
Since 3.3, an alternative API is available, see ViewerColumn.setEditingSupport(EditingSupport)
for a more flexible way
of editing values in a column viewer.
Users setting up an editable TreeViewer
or TableViewer
with more than 1 column have
to pass the SWT.FULL_SELECTION style bit
setCellModifier
in class ColumnViewer
modifier
- the cell modifierViewerColumn.setEditingSupport(EditingSupport)
,
EditingSupport
@Deprecated public void setColumnProperties(String[] columnProperties)
ColumnViewer
Since 3.3, an alternative API is available, see ViewerColumn.setEditingSupport(EditingSupport)
for a more flexible way
of editing values in a column viewer.
Users setting up an editable TreeViewer
or TableViewer
with more than 1 column have
to pass the SWT.FULL_SELECTION style bit
setColumnProperties
in class ColumnViewer
columnProperties
- the list of column propertiesViewerColumn.setEditingSupport(EditingSupport)
,
EditingSupport
@Deprecated protected void setExpanded(Item node, boolean expand)
AbstractTreeViewer
setExpanded
in class AbstractTreeViewer
node
- the itemexpand
- the expand state of the item@Deprecated protected void setSelection(List items)
AbstractTreeViewer
setSelection
in class AbstractTreeViewer
items
- list of items (element type:
org.eclipse.swt.widgets.Item
)@Deprecated protected void showItem(Item item)
AbstractTreeViewer
showItem
in class AbstractTreeViewer
item
- the item
Copyright (c) 2000, 2014 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.