## org.eclipse.datatools.sqltools.common.ui.tableviewer
Class TableDataContentProvider

    java.lang.Object
      org.eclipse.datatools.sqltools.common.ui.tableviewer.TableDataContentProvider

All Implemented Interfaces:
  org.eclipse.jface.viewers.IContentProvider, org.eclipse.jface.viewers.IStructuredContentProvider

    public class TableDataContentProvider

extends java.lang.Object
implements org.eclipse.jface.viewers.IStructuredContentProvider

An class to content providers for `AccessibleTableViewer`.

Author:
  lihuang

Constructor Summary
`TableDataContentProvider()`

Method Summary
`void` `dispose()`
`java.lang.Object[]` `getElements(java.lang.Object inputElement)` Returns the elements to display in the viewer when its input is set to the given element.
`void` `inputChanged(org.eclipse.jface.viewers.Viewer viewer, java.lang.Object oldInput, java.lang.Object newInput)` Notifies this content provider that the given viewer's input has been switched to a different element.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### TableDataContentProvider

    public TableDataContentProvider()

Method Detail

### dispose

    public void dispose()

  Specified by:
    `dispose` in interface `org.eclipse.jface.viewers.IContentProvider`

### inputChanged

    public void inputChanged(org.eclipse.jface.viewers.Viewer viewer,
                             java.lang.Object oldInput,
                             java.lang.Object newInput)

  Notifies this content provider that the given viewer's input has been switched to a different element.

  A typical use for this method is registering the content provider as a listener to changes on the new input (using model-specific means), and deregistering the viewer from the old input. In response to these change notifications, the content provider should update the viewer (see the add, remove, update and refresh methods on the viewers).

  The viewer should not be updated during this call, as it might be in the process of being disposed.

  Specified by:
    `inputChanged` in interface `org.eclipse.jface.viewers.IContentProvider`
  Parameters:
    `viewer` - `AccessibleTableViewer`
    `oldInput` - the old input element (`ITableData`), or `null` if the viewer did not previously have an input.
    `newInput` - the new input element (`ITableData`), or `null` if the viewer does not have an input

### getElements

    public java.lang.Object[] getElements(java.lang.Object inputElement)

  Returns the elements to display in the viewer when its input is set to the given element. These elements can be presented as rows in a table. The result is not modified by the viewer.

  Specified by:
    `getElements` in interface `org.eclipse.jface.viewers.IStructuredContentProvider`
  Parameters:
    `inputElement` - the input element (`ITableData`)
  Returns:
    the array of elements (`IRowData`) to display in the viewer