Package org.eclipse.net4j.util.ui.views

# Class ContainerView

java.lang.Object
org.eclipse.core.commands.common.EventManager
org.eclipse.ui.part.WorkbenchPart
org.eclipse.ui.part.ViewPart
org.eclipse.net4j.util.ui.views.ContainerView

All Implemented Interfaces:
  `IAdaptable`, `IExecutableExtension`, `ISelectionProvider`, `IPersistable`, `IViewPart`, `IWorkbenchPart`, `IWorkbenchPart2`, `IWorkbenchPart3`, `ISetSelectionTarget`, `IWorkbenchPartOrientation`

Direct Known Subclasses:
  `ContainerView.Default`

public abstract class ContainerView extends ViewPart implements ISelectionProvider, ISetSelectionTarget

Since:
  3.9

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`class`
`ContainerView.ContainerViewItemProvider`
`static class`
`ContainerView.Default<CONTAINER extends IContainer<?>>`
`protected static enum`
`ContainerView.MessageType`

## Field Summary

### Fields inherited from interface org.eclipse.ui.IWorkbenchPart

`PROP_TITLE`

## Constructor Summary

Constructors
Constructor
Description
`ContainerView()`

## Method Summary

Modifier and Type
Method
Description
`protected void`
`addCollapseAllAction(IContributionManager manager)`
`protected void`
`addMenuGroup(IContributionManager manager, String groupName)`
`protected void`
`addMenuGroupAdditions(IContributionManager manager)`
`protected void`
`addRefreshAction(IContributionManager manager)`
`void`
`addSelectionChangedListener(ISelectionChangedListener listener)`
`protected void`
`addSeparator(IContributionManager manager)`
Deprecated.
As of 3.9 use `addMenuGroupAdditions(IContributionManager)`.
`protected void`
`closeView()`
`protected void`
`collapseAllPressed()`
`protected void`
`contributeToActionBars()`
`protected ContainerItemProvider<IContainer<Object>>`
`createContainerItemProvider()`
`protected IContentProvider`
`createContentProvider()`
`protected void`
`createdUI()`
`protected ILabelDecorator`
`createLabelDecorator()`
`protected IBaseLabelProvider`
`createLabelProvider()`
`final void`
`createPartControl(Composite parent)`
`protected Control`
`createUI(Composite parent)`
`protected ViewerComparator`
`createViewerComparator()`
`protected ViewerSorter`
`createViewerSorter()`
`protected void`
`doubleClicked(Object object)`
`void`
`expandElement(Object element, int level)`
`protected void`
`fillContextMenu(IMenuManager manager, ITreeSelection selection)`
`protected void`
`fillLocalPullDown(IMenuManager manager)`
`protected void`
`fillLocalToolBar(IToolBarManager manager)`
`<T> T`
`getAdapter(Class<T> adapter)`
`static ImageDescriptor`
`getAddImageDescriptor()`
`Action`
`getCollapseAllAction()`
`static ImageDescriptor`
`getCollapseAllImageDescriptor()`
`protected abstract IContainer<?>`
`getContainer()`
`static ImageDescriptor`
`getDeleteImageDescriptor()`
`protected Display`
`getDisplay()`
`protected Color`
`getElementBackground(Object element)`
`protected Font`
`getElementFont(Object element)`
`protected Color`
`getElementForeground(Object element)`
`protected Image`
`getElementImage(Object element)`
`protected String`
`getElementText(Object element)`
`ContainerItemProvider<IContainer<Object>>`
`getItemProvider()`
`protected Action`
`getRefreshAction()`
`static ImageDescriptor`
`getRefreshImageDescriptor()`
`protected IElementFilter`
`getRootElementFilter()`
`ISelection`
`getSelection()`
`Shell`
`getShell()`
`TreeViewer`
`getViewer()`
`protected void`
`handleElementEvent(IEvent event)`
`protected void`
`hookContextMenu()`
`protected void`
`hookDoubleClick()`
`protected void`
`initViewer()`
`void`
`refreshElement(Object element, boolean updateLabels)`
`protected void`
`refreshPressed()`
`void`
`refreshPropertySheetPage()`
`void`
`refreshViewer(boolean updateLabels)`
`void`
`removeSelectionChangedListener(ISelectionChangedListener listener)`
`void`
`resetInput()`
`void`
`revealElement(Object element)`
`protected void`
`selectionChanged(IActionBars bars, ITreeSelection selection)`
`void`
`selectReveal(ISelection selection)`
`void`
`setFocus()`
`void`
`setSelection(ISelection selection)`
`protected void`
`showMessage(String message)`
`protected boolean`
`showMessage(ContainerView.MessageType type, String message)`
`void`
`updateLabels(Object element)`

### Methods inherited from class org.eclipse.ui.part.ViewPart

`checkSite, getViewSite, init, init, saveState, setContentDescription, setInitializationData, setPartName`

### Methods inherited from class org.eclipse.ui.part.WorkbenchPart

`addPartPropertyListener, addPropertyListener, dispose, firePartPropertyChanged, firePropertyChange, getConfigurationElement, getContentDescription, getDefaultImage, getOrientation, getPartName, getPartProperties, getPartProperty, getSite, getTitle, getTitleImage, getTitleToolTip, removePartPropertyListener, removePropertyListener, setPartProperty, setSite, setTitle, setTitleImage, setTitleToolTip, showBusy`

### Methods inherited from class org.eclipse.core.commands.common.EventManager

`addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface org.eclipse.ui.IWorkbenchPart

`addPropertyListener, dispose, getSite, getTitle, getTitleImage, getTitleToolTip, removePropertyListener`

## Constructor Details

### ContainerView

public ContainerView()

## Method Details

### getShell

public Shell getShell()

### getItemProvider

public ContainerItemProvider<IContainer<Object>> getItemProvider()

Since:
  3.9

### getViewer

public TreeViewer getViewer()

### setFocus

public void setFocus()

Specified by:
  `setFocus` in interface `IWorkbenchPart`
Specified by:
  `setFocus` in class `WorkbenchPart`

### resetInput

public void resetInput()

### getSelection

public ISelection getSelection()

Specified by:
  `getSelection` in interface `ISelectionProvider`
Since:
  3.0

### setSelection

public void setSelection(ISelection selection)

Specified by:
  `setSelection` in interface `ISelectionProvider`
Since:
  3.0

### addSelectionChangedListener

public void addSelectionChangedListener(ISelectionChangedListener listener)

Specified by:
  `addSelectionChangedListener` in interface `ISelectionProvider`
Since:
  3.0

### removeSelectionChangedListener

public void removeSelectionChangedListener(ISelectionChangedListener listener)

Specified by:
  `removeSelectionChangedListener` in interface `ISelectionProvider`
Since:
  3.0

### selectReveal

public void selectReveal(ISelection selection)

Specified by:
  `selectReveal` in interface `ISetSelectionTarget`

### createPartControl

public final void createPartControl(Composite parent)

Specified by:
  `createPartControl` in interface `IWorkbenchPart`
Specified by:
  `createPartControl` in class `WorkbenchPart`

### createUI

protected Control createUI(Composite parent)

### createdUI

protected void createdUI()

Since:
  3.1

### initViewer

protected void initViewer()

Since:
  3.1

### createViewerComparator

protected ViewerComparator createViewerComparator()

Since:
  3.9

### createViewerSorter

protected ViewerSorter createViewerSorter()

Since:
  3.3

### createContentProvider

protected IContentProvider createContentProvider()

Since:
  3.0

### createLabelProvider

protected IBaseLabelProvider createLabelProvider()

Since:
  3.0

### createLabelDecorator

protected ILabelDecorator createLabelDecorator()

Since:
  3.0

### createContainerItemProvider

protected ContainerItemProvider<IContainer<Object>> createContainerItemProvider()

Since:
  3.9

### handleElementEvent

protected void handleElementEvent(IEvent event)

Since:
  3.9

### getElementText

protected String getElementText(Object element)

### getElementImage

protected Image getElementImage(Object element)

### getElementForeground

protected Color getElementForeground(Object element)

Since:
  3.0

### getElementBackground

protected Color getElementBackground(Object element)

Since:
  3.0

### getElementFont

protected Font getElementFont(Object element)

Since:
  3.0

### getRootElementFilter

protected IElementFilter getRootElementFilter()

### getContainer

protected abstract IContainer<?> getContainer()

### hookDoubleClick

protected void hookDoubleClick()

### hookContextMenu

protected void hookContextMenu()

### contributeToActionBars

protected void contributeToActionBars()

### fillLocalPullDown

protected void fillLocalPullDown(IMenuManager manager)

### fillLocalToolBar

protected void fillLocalToolBar(IToolBarManager manager)

### fillContextMenu

protected void fillContextMenu(IMenuManager manager, ITreeSelection selection)

### addSeparator

@Deprecated protected void addSeparator(IContributionManager manager)
Deprecated.
As of 3.9 use `addMenuGroupAdditions(IContributionManager)`.

Since:
  3.5

### addMenuGroupAdditions

protected void addMenuGroupAdditions(IContributionManager manager)

Since:
  3.9

### addMenuGroup

protected void addMenuGroup(IContributionManager manager, String groupName)

Since:
  3.9

### addRefreshAction

protected void addRefreshAction(IContributionManager manager)

Since:
  3.5

### addCollapseAllAction

protected void addCollapseAllAction(IContributionManager manager)

Since:
  3.5

### selectionChanged

protected void selectionChanged(IActionBars bars, ITreeSelection selection)

### doubleClicked

protected void doubleClicked(Object object)

### refreshPressed

protected void refreshPressed()

Since:
  3.1

### collapseAllPressed

protected void collapseAllPressed()

Since:
  3.3

### closeView

protected void closeView()

### showMessage

protected void showMessage(String message)

### showMessage

protected boolean showMessage(ContainerView.MessageType type, String message)

### getRefreshAction

protected Action getRefreshAction()

Since:
  3.1

### getCollapseAllAction

public Action getCollapseAllAction()

Since:
  3.3

### getDisplay

protected Display getDisplay()

### getAdapter

public <T> T getAdapter(Class<T> adapter)

Specified by:
  `getAdapter` in interface `IAdaptable`
Overrides:
  `getAdapter` in class `WorkbenchPart`

### refreshPropertySheetPage

public void refreshPropertySheetPage()

Since:
  3.5

### refreshViewer

public void refreshViewer(boolean updateLabels)

### refreshElement

public void refreshElement(Object element, boolean updateLabels)

### updateLabels

public void updateLabels(Object element)

### revealElement

public void revealElement(Object element)

### expandElement

public void expandElement(Object element, int level)

Since:
  3.3

### getAddImageDescriptor

public static ImageDescriptor getAddImageDescriptor()

### getDeleteImageDescriptor

public static ImageDescriptor getDeleteImageDescriptor()

### getRefreshImageDescriptor

public static ImageDescriptor getRefreshImageDescriptor()

### getCollapseAllImageDescriptor

public static ImageDescriptor getCollapseAllImageDescriptor()

Since:
  3.3