## org.eclipse.emf.compare.ui.viewer.content.part.property
Class ModelContentMergePropertyTab

    java.lang.Object
      org.eclipse.jface.viewers.Viewer
          org.eclipse.jface.viewers.ContentViewer
              org.eclipse.jface.viewers.StructuredViewer
                  org.eclipse.jface.viewers.ColumnViewer
                      org.eclipse.jface.viewers.AbstractTableViewer
                          org.eclipse.jface.viewers.TableViewer
                              org.eclipse.emf.compare.ui.viewer.content.part.property.ModelContentMergePropertyTab

All Implemented Interfaces:
  IModelContentMergeViewerTab, org.eclipse.jface.viewers.IInputProvider, org.eclipse.jface.viewers.IInputSelectionProvider, org.eclipse.jface.viewers.IPostSelectionProvider, org.eclipse.jface.viewers.ISelectionProvider

    public final class ModelContentMergePropertyTab

extends org.eclipse.jface.viewers.TableViewer
implements IModelContentMergeViewerTab

Represents the property view under a `ModelContentMergeTabFolder`'s property tab.

Nested Class Summary

Nested classes/interfaces inherited from class org.eclipse.jface.viewers.StructuredViewer
`org.eclipse.jface.viewers.StructuredViewer.ColorAndFontCollector, org.eclipse.jface.viewers.StructuredViewer.ColorAndFontCollectorWithProviders`

Field Summary
`protected int` `partSide` `int` representing this viewer part side.

Fields inherited from class org.eclipse.jface.viewers.Viewer
`WIDGET_DATA_KEY`

Constructor Summary
`ModelContentMergePropertyTab(org.eclipse.swt.widgets.Composite parentComposite, int side, ModelContentMergeTabFolder parentFolder)` Creates a table viewer on a newly-created table control under the given parent.

Method Summary
`protected void` `associate(java.lang.Object element, org.eclipse.swt.widgets.Item item)`
`void` `dispose()` Disposes of all resources allocated this tab.
`org.eclipse.swt.widgets.TableItem` `find(DiffElement diff)` Returns the widget representing the given `DiffElement` in the table.
`java.util.List<? extends org.eclipse.swt.widgets.Item>` `getSelectedElements()` Returns the tab's selection as a list of Items.
`int` `getSide()` Returns the side of this viewer part.
`int` `getTotalColumnsWidth()` Returns the width of the columns displayed.
`ModelContentMergeTabItem` `getUIItem(org.eclipse.emf.ecore.EObject data)` This will be used when drawing the center part's marquees.
`java.util.List<ModelContentMergeTabItem>` `getVisibleElements()` Returns a list of this tab's visible elements.
`void` `redraw()` Redraws the Control displayed by the tab.
`void` `refresh(java.lang.Object element, boolean updateLabels)`
`void` `setReflectiveInput(java.lang.Object input)` Sets the input of the tab.
`void` `showItem(DiffElement diff)` Ensures that the given diff is visible in the table.
`void` `showItems(java.util.List<DiffElement> items)` Ensures the given List of items is made visible in the tab's Control client area.

Methods inherited from class org.eclipse.jface.viewers.TableViewer

`createViewerEditor, doClear, doClearAll, doDeselectAll, doFindItem, doGetColumn, doGetColumnCount, doGetItem, doGetItemCount, doGetItems, doGetSelection, doGetSelectionIndices, doIndexOf, doRemove, doRemove, doRemoveAll, doResetItem, doSelect, doSetItemCount, doSetSelection, doSetSelection, doShowItem, doShowSelection, getControl, getItemAt, getTable, getViewerRowFromItem, internalCreateNewRowPart, refresh, refresh, remove, setSelection`

Methods inherited from class org.eclipse.jface.viewers.AbstractTableViewer
`add, add, assertContentProviderType, clear, doFindInputItem, doUpdateItem, getColumnViewerOwner, getElementAt, getLabelProvider, getRawChildren, getSelectionFromWidget, handleDispose, hookControl, indexForElement, inputChanged, insert, internalRefresh, internalRefresh, remove, replace, reveal, setItemCount, setSelectionToWidget`

Methods inherited from class org.eclipse.jface.viewers.ColumnViewer
`applyEditorValue, cancelEditing, checkBusy, editElement, getCell, getCellEditors, getCellModifier, getColumnProperties, getColumnViewerEditor, getItem, getLabelProvider, getViewerRow, hookEditingSupport, isBusy, isCellEditorActive, refresh, setBusy, setCellEditors, setCellModifier, setColumnProperties, setColumnViewerEditor, setLabelProvider, triggerEditorActivationEvent, update`

Methods inherited from class org.eclipse.jface.viewers.StructuredViewer

`addDoubleClickListener, addDragSupport, addDropSupport, addFilter, addOpenListener, addPostSelectionChangedListener, assertElementsNotNull, buildLabel, disassociate, equals, filter, findItem, findItems, fireDoubleClick, fireOpen, firePostSelectionChanged, getColorAndFontCollector, getComparator, getComparer, getFilteredChildren, getFilters, getRoot, getSelection, getSortedChildren, getSorter, handleDoubleSelect, handleInvalidSelection, handleLabelProviderChanged, handleOpen, handlePostSelect, handleSelect, hasFilters, internalUpdate, mapElement, needsRefilter, preservingSelection, refresh, refresh, refreshItem, removeDoubleClickListener, removeFilter, removeOpenListener, removePostSelectionChangedListener, resetFilters, setComparator, setComparer, setContentProvider, setFilters, setInput, setSelectionToWidget, setSorter, setUseHashlookup, testFindItem, testFindItems, unmapAllElements, unmapElement, unmapElement, update, updateItem, updateSelection, usingElementMap`

Methods inherited from class org.eclipse.jface.viewers.ContentViewer
`getContentProvider, getInput, labelProviderChanged`

Methods inherited from class org.eclipse.jface.viewers.Viewer
`addHelpListener, addSelectionChangedListener, fireHelpRequested, fireSelectionChanged, getData, handleHelpRequest, removeHelpListener, removeSelectionChangedListener, scrollDown, scrollUp, 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.emf.compare.ui.viewer.content.part.IModelContentMergeViewerTab
`addSelectionChangedListener, getControl`

Methods inherited from interface org.eclipse.jface.viewers.ISelectionProvider
`addSelectionChangedListener, removeSelectionChangedListener, setSelection`

Field Detail

### partSide

    protected final int partSide

  `int` representing this viewer part side.

Constructor Detail

### ModelContentMergePropertyTab

    public ModelContentMergePropertyTab(org.eclipse.swt.widgets.Composite parentComposite,
                                        int side,
                                        ModelContentMergeTabFolder parentFolder)

  Creates a table viewer on a newly-created table control under the given parent. The table control is created using the given style bits.

  Parameters:
    `parentComposite` - the parent control.
    `side` - Side of this viewer part.
    `parentFolder` - Parent folder of this tab.

Method Detail

### dispose

    public void dispose()

  Disposes of all resources allocated this tab.

  Specified by:
    `dispose` in interface `IModelContentMergeViewerTab`
  See Also:
    `IModelContentMergeViewerTab.dispose()`

### find

    public org.eclipse.swt.widgets.TableItem find(DiffElement diff)

  Returns the widget representing the given `DiffElement` in the table.

  Parameters:
    `diff` - `DiffElement` to seek in the table.
  Returns:
    The widget representing the given `DiffElement`.
  See Also:
    `StructuredViewer.findItem(Object)`

### getSelectedElements

    public java.util.List<? extends org.eclipse.swt.widgets.Item> getSelectedElements()

  Returns the tab's selection as a list of Items.

  Specified by:
    `getSelectedElements` in interface `IModelContentMergeViewerTab`
  Returns:
    The tab's selection as a list of Items.
  See Also:
    `IModelContentMergeViewerTab.getSelectedElements()`

### getSide

    public int getSide()

  Returns the side of this viewer part.

  Returns:
    The side of this viewer part.

### getTotalColumnsWidth

    public int getTotalColumnsWidth()

  Returns the width of the columns displayed.

  Returns:
    The width of the columns displayed.

### getUIItem

    public ModelContentMergeTabItem getUIItem(org.eclipse.emf.ecore.EObject data)

  This will be used when drawing the center part's marquees.

  Specified by:
    `getUIItem` in interface `IModelContentMergeViewerTab`
  Parameters:
    `data` - The data for which we need UI variables for.
  Returns:
    List of items corresponding to the given data, wrapped along with UI information.
  See Also:
    `IModelContentMergeViewerTab.getUIItem(org.eclipse.emf.ecore.EObject)`

### getVisibleElements

    public java.util.List<ModelContentMergeTabItem> getVisibleElements()

  Returns a list of this tab's visible elements.

  For the property tab, we won't try and find the "visible" elements and this will return the whole table's content.

  Specified by:
    `getVisibleElements` in interface `IModelContentMergeViewerTab`
  Returns:
    List of this tab's elements.

### redraw

    public void redraw()

  Redraws the Control displayed by the tab.

  Specified by:
    `redraw` in interface `IModelContentMergeViewerTab`
  See Also:
    `IModelContentMergeViewerTab.redraw()`

### refresh

    public void refresh(java.lang.Object element,
                        boolean updateLabels)

  Overrides:
    `refresh` in class `org.eclipse.jface.viewers.ColumnViewer`
  See Also:
    `ColumnViewer.refresh(java.lang.Object, boolean)`

### setReflectiveInput

    public void setReflectiveInput(java.lang.Object input)

  Sets the input of the tab.

  This is often implemented by redirecting to the tab's "setInput(Object)" method.

  Specified by:
    `setReflectiveInput` in interface `IModelContentMergeViewerTab`
  Parameters:
    `input` - New input of the tab's viewer.
  See Also:
    `org.eclipse.emf.compare.ui.viewer.content.part.IModelContentMergeViewerTab#setReflectiveInput(org.eclipse.emf.ecore.EObject)`

### showItem

    public void showItem(DiffElement diff)

  Ensures that the given diff is visible in the table.

  Parameters:
    `diff` - `DiffElement` to make visible.

### showItems

    public void showItems(java.util.List<DiffElement> items)

  Ensures the given List of items is made visible in the tab's Control client area.

  Specified by:
    `showItems` in interface `IModelContentMergeViewerTab`
  Parameters:
    `items` - List of the items ot make visible.
  See Also:
    `IModelContentMergeViewerTab.showItems(java.util.List)`

### associate

    protected void associate(java.lang.Object element,
                             org.eclipse.swt.widgets.Item item)

  Overrides:
    `associate` in class `org.eclipse.jface.viewers.StructuredViewer`
  See Also:
    `StructuredViewer.associate(Object, Item)`

Copyright 2006 IBM Corporation and others. All Rights Reserved.