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

# Class ContainerItemProvider<CONTAINER extends IContainer<Object>>

java.lang.Object
org.eclipse.jface.viewers.ViewerComparator
org.eclipse.jface.viewers.ViewerSorter
org.eclipse.net4j.util.ui.StructuredContentProvider<INPUT>
org.eclipse.net4j.util.ui.views.ItemProvider<CONTAINER>
org.eclipse.net4j.util.ui.views.ContainerItemProvider<CONTAINER>

All Implemented Interfaces:
  `EventListener`, `DelegatingStyledCellLabelProvider.IStyledLabelProvider`, `IBaseLabelProvider`, `IColorProvider`, `IContentProvider`, `IFontProvider`, `ILabelProvider`, `IStructuredContentProvider`, `ITreeContentProvider`, `IListener`

Direct Known Subclasses:
  `ContainerPathItemProvider`, `ContainerView.ContainerViewItemProvider`, `ManagedContainerItemProvider`

public class ContainerItemProvider<CONTAINER extends IContainer<Object>> extends ItemProvider<CONTAINER>

Author:
  Eike Stepper

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`class`
`ContainerItemProvider.AbstractContainerNode`
`class`
`ContainerItemProvider.AbstractNode`
`class`
`ContainerItemProvider.ContainerNode`
`class`
`ContainerItemProvider.ErrorElement`
`class`
`ContainerItemProvider.FixedChildrenNode`
`class`
`ContainerItemProvider.LazyElement`
Deprecated.
As of 3.5 use `ContainerItemProvider.SlowElement`.
`class`
`ContainerItemProvider.LeafNode`
`static interface`
`ContainerItemProvider.Node`
`static class`
`ContainerItemProvider.SlowElement`

## Nested classes/interfaces inherited from interface org.eclipse.net4j.util.event.IListener

`IListener.NotifierAware`

## Field Summary

Fields
Modifier and Type
Field
Description
`static final Image`
`ERROR_IMAGE`
Deprecated.
As of 3.12 use `UIUtil.errorImage()`.
`static final Color`
`PENDING_COLOR`
Deprecated.
As of 3.12 use `pendingColor()`.
`static final Image`
`PENDING_IMAGE`
Deprecated.
As of 3.12 use `pendingImage()`.

### Fields inherited from class org.eclipse.net4j.util.ui.views.ItemProvider

`NO_ELEMENTS`

### Fields inherited from class org.eclipse.jface.viewers.ViewerSorter

`collator`

## Constructor Summary

Constructors
Constructor
Description
`ContainerItemProvider()`
`ContainerItemProvider(IElementFilter rootElementFilter)`

## Method Summary

Modifier and Type
Method
Description
`protected void`
`addNode(Object element, ContainerItemProvider.Node node)`
`void`
`clearNodesCache()`
`protected void`
`connectInput(CONTAINER input)`
`protected ContainerItemProvider<CONTAINER>.ContainerNode`
`createContaineNode(ContainerItemProvider.Node parent, Object element)`
`protected ContainerItemProvider<CONTAINER>.LeafNode`
`createLeafNode(ContainerItemProvider.Node parent, Object element)`
`protected ContainerItemProvider.Node`
`createNode(ContainerItemProvider.Node parent, Object element)`
`protected ContainerItemProvider.SlowElement`
`createSlowElement(IContainer<?> container)`
`static IContainer<Object>`
`createSlowInput(String text)`
`protected void`
`disconnectInput(CONTAINER input)`
`protected void`
`elementAdded(Object element, Object parent)`
`protected void`
`elementRemoved(Object element, Object parent)`
`protected void`
`executeRunnable(Runnable runnable)`
`void`
`fillContextMenu(IMenuManager manager, ITreeSelection selection)`
`protected boolean`
`filterRootElement(Object element)`
`Object[]`
`getChildren(Object element)`
`protected Object[]`
`getContainerChildren(ContainerItemProvider<CONTAINER>.AbstractContainerNode containerNode, IContainer<?> container)`
`protected String`
`getErrorText(IContainer<Object> container)`
`Font`
`getFont(Object obj)`
`Color`
`getForeground(Object obj)`
`Image`
`getImage(Object obj)`
`protected ContainerItemProvider.Node`
`getNode(Object element)`
`protected Map<Object,ContainerItemProvider.Node>`
`getNodes()`
`Object`
`getParent(Object element)`
`protected ContainerItemProvider.Node`
`getRoot()`
`IElementFilter`
`getRootElementFilter()`
`protected String`
`getSlowText(IContainer<Object> container)`
`protected void`
`handleElementEvent(IEvent event)`
`protected void`
`handleInactiveElement(Iterator<ContainerItemProvider.Node> it, ContainerItemProvider.Node child)`
`boolean`
`hasChildren(Object element)`
`protected boolean`
`isComputeChildrenEagerly()`
`protected boolean`
`isSlow(IContainer<Object> container)`
`static Color`
`pendingColor()`
`static Image`
`pendingImage()`
`protected ContainerItemProvider.Node`
`removeNode(Object element)`

### Methods inherited from class org.eclipse.net4j.util.ui.views.ItemProvider

`addListener, fireLabelProviderChanged, fireLabelProviderChanged, fireLabelProviderChanged, getBackground, getElements, getListeners, getStyledText, getText, isLabelProperty, removeListener`

### Methods inherited from class org.eclipse.net4j.util.ui.StructuredContentProvider

`dispose, expandElement, getBoldFont, getDisplay, getInput, getItalicFont, getViewer, inputChanged, notifyEvent, refreshElement, refreshSynced, refreshViewer, revealElement, selectElement, updateLabels`

### Methods inherited from class org.eclipse.jface.viewers.ViewerSorter

`getCollator`

### Methods inherited from class org.eclipse.jface.viewers.ViewerComparator

`category, compare, getComparator, isSorterProperty, sort`

### 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.IBaseLabelProvider

`dispose`

### Methods inherited from interface org.eclipse.jface.viewers.IContentProvider

`dispose, inputChanged`

## Field Details

### PENDING_COLOR

@Deprecated public static final Color PENDING_COLOR
Deprecated.
As of 3.12 use `pendingColor()`.

Since:
  3.5

### PENDING_IMAGE

@Deprecated public static final Image PENDING_IMAGE
Deprecated.
As of 3.12 use `pendingImage()`.

Since:
  3.5

### ERROR_IMAGE

@Deprecated public static final Image ERROR_IMAGE
Deprecated.
As of 3.12 use `UIUtil.errorImage()`.

Since:
  3.5

## Constructor Details

### ContainerItemProvider

public ContainerItemProvider()

### ContainerItemProvider

public ContainerItemProvider(IElementFilter rootElementFilter)

## Method Details

### getRootElementFilter

public IElementFilter getRootElementFilter()

### hasChildren

public boolean hasChildren(Object element)

Specified by:
  `hasChildren` in interface `ITreeContentProvider`
Overrides:
  `hasChildren` in class `ItemProvider<CONTAINER extends IContainer<Object>>`

### getChildren

public Object[] getChildren(Object element)

### getParent

public Object getParent(Object element)

### clearNodesCache

public void clearNodesCache()

Since:
  3.4

### connectInput

protected void connectInput(CONTAINER input)

Overrides:
  `connectInput` in class `StructuredContentProvider<CONTAINER extends IContainer<Object>>`

### disconnectInput

protected void disconnectInput(CONTAINER input)

Overrides:
  `disconnectInput` in class `StructuredContentProvider<CONTAINER extends IContainer<Object>>`

### handleInactiveElement

protected void handleInactiveElement(Iterator<ContainerItemProvider.Node> it, ContainerItemProvider.Node child)

Since:
  2.0

### elementAdded

protected void elementAdded(Object element, Object parent)

### elementRemoved

protected void elementRemoved(Object element, Object parent)

### handleElementEvent

protected void handleElementEvent(IEvent event)

Since:
  3.3

### getContainerChildren

protected Object[] getContainerChildren(ContainerItemProvider<CONTAINER>.AbstractContainerNode containerNode, IContainer<?> container)

Since:
  3.5

### getRoot

protected ContainerItemProvider.Node getRoot()

### getNodes

protected Map<Object,ContainerItemProvider.Node> getNodes()

### getNode

protected ContainerItemProvider.Node getNode(Object element)

### createNode

protected ContainerItemProvider.Node createNode(ContainerItemProvider.Node parent, Object element)

### createLeafNode

protected ContainerItemProvider<CONTAINER>.LeafNode createLeafNode(ContainerItemProvider.Node parent, Object element)

### createContaineNode

protected ContainerItemProvider<CONTAINER>.ContainerNode createContaineNode(ContainerItemProvider.Node parent, Object element)

### addNode

protected void addNode(Object element, ContainerItemProvider.Node node)

### removeNode

protected ContainerItemProvider.Node removeNode(Object element)

### filterRootElement

protected boolean filterRootElement(Object element)

### executeRunnable

protected void executeRunnable(Runnable runnable)

Since:
  3.1

### createSlowElement

protected ContainerItemProvider.SlowElement createSlowElement(IContainer<?> container)

Since:
  3.5

### isComputeChildrenEagerly

protected boolean isComputeChildrenEagerly()

Since:
  3.5

### isSlow

protected boolean isSlow(IContainer<Object> container)

Since:
  3.1

### getSlowText

protected String getSlowText(IContainer<Object> container)

Since:
  3.1

### getErrorText

protected String getErrorText(IContainer<Object> container)

Since:
  3.1

### fillContextMenu

public void fillContextMenu(IMenuManager manager, ITreeSelection selection)

Overrides:
  `fillContextMenu` in class `ItemProvider<CONTAINER extends IContainer<Object>>`
Since:
  3.3

### getFont

public Font getFont(Object obj)

Specified by:
  `getFont` in interface `IFontProvider`
Overrides:
  `getFont` in class `ItemProvider<CONTAINER extends IContainer<Object>>`

### getForeground

public Color getForeground(Object obj)

Specified by:
  `getForeground` in interface `IColorProvider`
Overrides:
  `getForeground` in class `ItemProvider<CONTAINER extends IContainer<Object>>`

### getImage

public Image getImage(Object obj)

Specified by:
  `getImage` in interface `DelegatingStyledCellLabelProvider.IStyledLabelProvider`
Specified by:
  `getImage` in interface `ILabelProvider`
Overrides:
  `getImage` in class `ItemProvider<CONTAINER extends IContainer<Object>>`

### pendingColor

public static Color pendingColor()

Since:
  3.12

### pendingImage

public static Image pendingImage()

Since:
  3.12

### createSlowInput

public static IContainer<Object> createSlowInput(String text)

Since:
  3.5