Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Eclipse Platform
Release 3.5

org.eclipse.jface.viewers
Class TableTreeViewer


java.lang.Object
  extended by 

org.eclipse.jface.viewers.Viewer
      extended by 

org.eclipse.jface.viewers.ContentViewer
          extended by 

org.eclipse.jface.viewers.StructuredViewer
              extended by 

org.eclipse.jface.viewers.ColumnViewer
                  extended by 

org.eclipse.jface.viewers.AbstractTreeViewer
                      extended by 
org.eclipse.jface.viewers.TableTreeViewer
All Implemented Interfaces:
IInputProvider, IInputSelectionProvider, IPostSelectionProvider, ISelectionProvider

Deprecated. As of 3.1 use TreeViewer instead

public class TableTreeViewer
extends AbstractTreeViewer

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).

Restriction:
This class is not intended to be subclassed by clients.

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, Object element)
          Deprecated. Copies the attributes of the given element into the given SWT item.
 void editElement ( 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.
  Object[] getColumnProperties ()
          Deprecated. Returns the column properties of this viewer.
  Control getControl ()
          Deprecated. Returns the primary control associated with this viewer.
  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 ( 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 ( 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. AbstractTreeViewer
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, getFilteredChildren, 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, setSelectionToWidget, setSelectionToWidget, updateChildren, updatePlus
 
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. StructuredViewer
addDoubleClickListener, addDragSupport, addDropSupport, addFilter, addOpenListener, addPostSelectionChangedListener, assertElementsNotNull, equals, filter, findItem, findItems, fireDoubleClick, fireOpen, firePostSelectionChanged, getColorAndFontCollector, getComparator, getComparer, getFilters, getRoot, getSorter, handleDispose, 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
 
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

TableTreeViewer

public TableTreeViewer(
TableTree tree)
Deprecated. 
Creates a table tree viewer on the given table tree control. The viewer has no input, no content provider, a default label provider, no sorter, and no filters.

Parameters:
tree - the table tree control

TableTreeViewer

public TableTreeViewer(
Composite parent)
Deprecated. 
Creates a table tree viewer on a newly-created table tree control under the given parent. The table tree control is created using the SWT style bits MULTI, H_SCROLL, V_SCROLL, and BORDER. The viewer has no input, no content provider, a default label provider, no sorter, and no filters.

Parameters:
parent - the parent control

TableTreeViewer

public TableTreeViewer(
Composite parent,
                       int style)
Deprecated. 
Creates a table tree viewer on a newly-created table tree control under the given parent. The table tree control is created using the given SWT style bits. The viewer has no input, no content provider, a default label provider, no sorter, and no filters.

Parameters:
parent - the parent control
style - the SWT style bits
Method Detail

addTreeListener

protected void addTreeListener(
Control c,
                               
TreeListener listener)
Deprecated. 
Description copied from class: AbstractTreeViewer
Adds the given SWT tree listener to the given SWT control.

Specified by:
addTreeListener in class AbstractTreeViewer
Parameters:
c - the SWT control
listener - the SWT tree listener

cancelEditing

public void cancelEditing()
Deprecated. 
Cancels a currently active cell editor. All changes already done in the cell editor are lost.

Overrides:
cancelEditing in class ColumnViewer

doUpdateItem

protected void doUpdateItem(
Item item,
                            
Object element)
Deprecated. 
Description copied from class: AbstractTreeViewer
Copies the attributes of the given element into the given SWT item.

Overrides:
doUpdateItem in class AbstractTreeViewer
Parameters:
item - the SWT item
element - the element

editElement

public void editElement(
Object element,
                        int column)
Deprecated. 
Starts editing the given element.

Overrides:
editElement in class ColumnViewer
Parameters:
element - the element
column - the column number

getCellEditors

public 
CellEditor[] getCellEditors()
Deprecated. 
Returns the cell editors of this viewer.

Overrides:
getCellEditors in class ColumnViewer
Returns:
the list of cell editors
See Also:
ViewerColumn.setEditingSupport(EditingSupport), EditingSupport

getCellModifier

public 
ICellModifier getCellModifier()
Deprecated. 
Returns the cell modifier of this viewer.

Overrides:
getCellModifier in class ColumnViewer
Returns:
the cell modifier
See Also:
ViewerColumn.setEditingSupport(EditingSupport), EditingSupport

getChildren

protected 
Item[] getChildren(
Widget o)
Deprecated. 
Description copied from class: AbstractTreeViewer
Returns the SWT child items for the given SWT widget.

Specified by:
getChildren in class AbstractTreeViewer
Parameters:
o - the widget
Returns:
the child items

getChild

protected 
Item getChild(
Widget widget,
                        int index)
Deprecated. 
Description copied from class: AbstractTreeViewer
Get the child for the widget at index. Note that the default implementation is not very efficient and should be overridden if this class is implemented.

Overrides:
getChild in class AbstractTreeViewer
Parameters:
widget - the widget to check
index - the index of the widget
Returns:
Item or null if widget is not a type that can contain items.

getColumnProperties

public 
Object[] getColumnProperties()
Deprecated. 
Returns the column properties of this viewer. The properties must correspond with the columns of the table control. They are used to identify the column in a cell modifier.

Overrides:
getColumnProperties in class ColumnViewer
Returns:
the list of column properties
See Also:
ViewerColumn.setEditingSupport(EditingSupport), EditingSupport

getControl

public 
Control getControl()
Deprecated. 
Description copied from class: Viewer
Returns the primary control associated with this viewer.

Specified by:
getControl in class Viewer
Returns:
the SWT control which displays this viewer's content

getElementAt

public 
Object getElementAt(int index)
Deprecated. 
Returns the element with the given index from this viewer. Returns null if the index is out of range.

This method is internal to the framework.

Parameters:
index - the zero-based index
Returns:
the element at the given index, or null if the index is out of range

getExpanded

protected boolean getExpanded(
Item item)
Deprecated. 
Description copied from class: AbstractTreeViewer
Returns whether the given SWT item is expanded or collapsed.

Specified by:
getExpanded in class AbstractTreeViewer
Parameters:
item - the item
Returns:
true if the item is considered expanded and false if collapsed

getItemAt

protected 
Item getItemAt(
Point p)
Deprecated. 
Description copied from class: AbstractTreeViewer
This implementation of AbstractTreeViewer.getItemAt(Point) returns null to ensure API backwards compatibility. Subclasses should override.

Overrides:
getItemAt in class AbstractTreeViewer
Parameters:
p - the widget-relative coordinates
Returns:
the Item at the coordinates or null if there is no item at the given coordinates

getItemCount

protected int getItemCount(
Control widget)
Deprecated. 
Description copied from class: AbstractTreeViewer
Returns the number of child items of the given SWT control.

Specified by:
getItemCount in class AbstractTreeViewer
Parameters:
widget - the control
Returns:
the number of children

getItemCount

protected int getItemCount(
Item item)
Deprecated. 
Description copied from class: AbstractTreeViewer
Returns the number of child items of the given SWT item.

Specified by:
getItemCount in class AbstractTreeViewer
Parameters:
item - the item
Returns:
the number of children

getItems

protected 
Item[] getItems(
Item item)
Deprecated. 
Description copied from class: AbstractTreeViewer
Returns the child items of the given SWT item.

Specified by:
getItems in class AbstractTreeViewer
Parameters:
item - the item
Returns:
the child items

getLabelProvider

public 
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. 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.

Overrides:
getLabelProvider in class ContentViewer
Returns:
a label provider

getParentItem

protected 
Item getParentItem(
Item item)
Deprecated. 
Description copied from class: AbstractTreeViewer
Returns the parent item of the given item in the tree, or null if there is no parent item.

Specified by:
getParentItem in class AbstractTreeViewer
Parameters:
item - the item
Returns:
the parent item, or null if none

getSelection

protected 
Item[] getSelection(
Control widget)
Deprecated. 
Description copied from class: AbstractTreeViewer
Returns all selected items for the given SWT control.

Specified by:
getSelection in class AbstractTreeViewer
Parameters:
widget - the control
Returns:
the list of selected items

getTableTree

public 
TableTree getTableTree()
Deprecated. 
Returns this table tree viewer's table tree control.

Returns:
the table tree control

hookControl

protected void hookControl(
Control control)
Deprecated. 
Description copied from class: ContentViewer
Adds event listener hooks to the given control.

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.

Overrides:
hookControl in class AbstractTreeViewer
Parameters:
control - the control

isCellEditorActive

public boolean isCellEditorActive()
Deprecated. 
Returns whether there is an active cell editor.

Overrides:
isCellEditorActive in class ColumnViewer
Returns:
true if there is an active cell editor, and false otherwise
See Also:
ViewerColumn.setEditingSupport(EditingSupport), EditingSupport

newItem

protected 
Item newItem(
Widget parent,
                       int flags,
                       int ix)
Deprecated. 
Description copied from class: AbstractTreeViewer
Creates a new item.

Specified by:
newItem in class AbstractTreeViewer
Parameters:
parent - the parent widget
flags - SWT style bits
ix - if non-negative, indicates the position to insert the item into its parent
Returns:
the newly-created item

removeAll

protected void removeAll(
Control widget)
Deprecated. 
Description copied from class: AbstractTreeViewer
Removes all items from the given control.

Specified by:
removeAll in class AbstractTreeViewer
Parameters:
widget - the control

setCellEditors

public void setCellEditors(
CellEditor[] editors)
Deprecated. 
Sets the cell editors of this table viewer.

Overrides:
setCellEditors in class ColumnViewer
Parameters:
editors - the list of cell editors
See Also:
ViewerColumn.setEditingSupport(EditingSupport), EditingSupport

setCellModifier

public void setCellModifier(
ICellModifier modifier)
Deprecated. 
Sets the cell modifier of this table viewer.

Overrides:
setCellModifier in class ColumnViewer
Parameters:
modifier - the cell modifier
See Also:
ViewerColumn.setEditingSupport(EditingSupport), EditingSupport

setColumnProperties

public void setColumnProperties(
String[] columnProperties)
Deprecated. 
Sets the column properties of this table viewer. The properties must correspond with the columns of the table control. They are used to identify the column in a cell modifier.

Overrides:
setColumnProperties in class ColumnViewer
Parameters:
columnProperties - the list of column properties
See Also:
ViewerColumn.setEditingSupport(EditingSupport), EditingSupport

setExpanded

protected void setExpanded(
Item node,
                           boolean expand)
Deprecated. 
Description copied from class: AbstractTreeViewer
Sets the expand state of the given item.

Specified by:
setExpanded in class AbstractTreeViewer
Parameters:
node - the item
expand - the expand state of the item

setSelection

protected void setSelection(
List items)
Deprecated. 
Description copied from class: AbstractTreeViewer
Sets the selection to the given list of items.

Specified by:
setSelection in class AbstractTreeViewer
Parameters:
items - list of items (element type: org.eclipse.swt.widgets.Item)

showItem

protected void showItem(
Item item)
Deprecated. 
Description copied from class: AbstractTreeViewer
Shows the given item.

Specified by:
showItem in class AbstractTreeViewer
Parameters:
item - the item

Eclipse Platform
Release 3.5

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire