## org.eclipse.datatools.sqltools.sqlbuilder.provider.rdbschema
Class AvailableTablesTreeProvider

    java.lang.Object
      org.eclipse.core.commands.common.EventManager
          org.eclipse.jface.viewers.BaseLabelProvider
              org.eclipse.jface.viewers.LabelProvider
                  org.eclipse.datatools.sqltools.sqlbuilder.provider.rdbschema.AvailableTablesTreeProvider

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

    public class AvailableTablesTreeProvider

extends org.eclipse.jface.viewers.LabelProvider
implements org.eclipse.jface.viewers.ITreeContentProvider

This class acts as both a content provider and lable provider for a tree viewer that is used to select a table from a collection of available tables. The collection is displayed as a tree of schemas at the top level with tables at the next level. Tables under a schema are not loaded until the schema node is expanded by the user.

Constructor Summary
`AvailableTablesTreeProvider(java.util.List schemaList, SQLDomainModel domainModel)` Constructs an instance of this class using the given list of Schema objects.

Method Summary
`void` `dispose()` Implements `ITreeContentProvider.dispose`.
`java.lang.Object[]` `getChildren(java.lang.Object parentElement)` Implements `ITreeContentProvider.getChildren`.
`java.lang.Object[]` `getElements(java.lang.Object inputElement)` Implements `ITreeContentProvider.getElements`.
`org.eclipse.swt.graphics.Image` `getImage(java.lang.Object object)` Overrides super to return the image associated with the input object
`java.lang.Object` `getParent(java.lang.Object element)` Implements `ITreeContentProvider.getParent`.
`java.lang.String` `getText(java.lang.Object object)` Overrides `LabelProvider.getText`.
`boolean` `hasChildren(java.lang.Object element)` Implements `ITreeContentProvider.hasChildren`.
`void` `inputChanged(org.eclipse.jface.viewers.Viewer viewer, java.lang.Object oldInput, java.lang.Object newInput)` Implements `ITreeContentProvider.inputChanged`.

Methods inherited from class org.eclipse.jface.viewers.BaseLabelProvider
`addListener, isLabelProperty, removeListener`

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

Methods inherited from interface org.eclipse.jface.viewers.IBaseLabelProvider
`addListener, isLabelProperty, removeListener`

Constructor Detail

### AvailableTablesTreeProvider

    public AvailableTablesTreeProvider(java.util.List schemaList,
                                       SQLDomainModel domainModel)

  Constructs an instance of this class using the given list of Schema objects.

  Parameters:
    `schemaList` - the list of schemas to display in the tree

Method Detail

### getChildren

    public java.lang.Object[] getChildren(java.lang.Object parentElement)

  Implements `ITreeContentProvider.getChildren`.

  Specified by:
    `getChildren` in interface `org.eclipse.jface.viewers.ITreeContentProvider`

### getParent

    public java.lang.Object getParent(java.lang.Object element)

  Implements `ITreeContentProvider.getParent`.

  Specified by:
    `getParent` in interface `org.eclipse.jface.viewers.ITreeContentProvider`

### hasChildren

    public boolean hasChildren(java.lang.Object element)

  Implements `ITreeContentProvider.hasChildren`.

  Specified by:
    `hasChildren` in interface `org.eclipse.jface.viewers.ITreeContentProvider`

### getElements

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

  Implements `ITreeContentProvider.getElements`.

  Specified by:
    `getElements` in interface `org.eclipse.jface.viewers.IStructuredContentProvider`
  Specified by:
    `getElements` in interface `org.eclipse.jface.viewers.ITreeContentProvider`

### dispose

    public void dispose()

  Implements `ITreeContentProvider.dispose`.

  Specified by:
    `dispose` in interface `org.eclipse.jface.viewers.IBaseLabelProvider`
  Specified by:
    `dispose` in interface `org.eclipse.jface.viewers.IContentProvider`
  Overrides:
    `dispose` in class `org.eclipse.jface.viewers.BaseLabelProvider`

### inputChanged

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

  Implements `ITreeContentProvider.inputChanged`.

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

### getText

    public java.lang.String getText(java.lang.Object object)

  Overrides `LabelProvider.getText`. When the given object is a schema or table, the name of the schema or table object is returned.

  Specified by:
    `getText` in interface `org.eclipse.jface.viewers.ILabelProvider`
  Overrides:
    `getText` in class `org.eclipse.jface.viewers.LabelProvider`

### getImage

    public org.eclipse.swt.graphics.Image getImage(java.lang.Object object)

  Overrides super to return the image associated with the input object

  Specified by:
    `getImage` in interface `org.eclipse.jface.viewers.ILabelProvider`
  Overrides:
    `getImage` in class `org.eclipse.jface.viewers.LabelProvider`
  Parameters:
    `object` - the object associated with the image
  Returns:
    the image for the object