org.eclipse.net4j.util.ui.views

## Class ContainerItemProvider<CONTAINER extends IContainer<java.lang.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:
    java.util.EventListener, DelegatingStyledCellLabelProvider.IStyledLabelProvider, IBaseLabelProvider, IColorProvider, IContentProvider, IFontProvider, ILabelProvider, IStructuredContentProvider, ITreeContentProvider, IListener
  Direct Known Subclasses:
    ContainerPathItemProvider

      public class ContainerItemProvider<CONTAINER extends IContainer<java.lang.Object>>
      extends ItemProvider<CONTAINER>

  Author:
    Eike Stepper

- - ### Nested Class Summary

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

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static Image` | `ERROR_IMAGE`
    `static Color` | `PENDING_COLOR`
    `static Image` | `PENDING_IMAGE`

    - ### 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 and Description
    `ContainerItemProvider()`
    `ContainerItemProvider(IElementFilter rootElementFilter)`

  - ### Method Summary

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

      `dispose, inputChanged`

    - ### Methods inherited from interface org.eclipse.jface.viewers.IBaseLabelProvider

      `dispose`

- - ### Field Detail

    - #### PENDING_COLOR

          public static final Color PENDING_COLOR

      Since:
        3.5

    - #### PENDING_IMAGE

          public static final Image PENDING_IMAGE

      Since:
        3.5

    - #### ERROR_IMAGE

          public static final Image ERROR_IMAGE

      Since:
        3.5

  - ### Constructor Detail

    - #### ContainerItemProvider

          public ContainerItemProvider()

    - #### ContainerItemProvider

          public ContainerItemProvider(IElementFilter rootElementFilter)

  - ### Method Detail

    - #### getRootElementFilter

          public IElementFilter getRootElementFilter()

    - #### hasChildren

          public boolean hasChildren(java.lang.Object element)

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

    - #### getChildren

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

    - #### getParent

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

    - #### clearNodesCache

          public void clearNodesCache()

      Since:
        3.4

    - #### connectInput

          protected void connectInput(CONTAINER input)

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

    - #### disconnectInput

          protected void disconnectInput(CONTAINER input)

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

    - #### handleInactiveElement

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

      Since:
        2.0

    - #### elementAdded

          protected void elementAdded(java.lang.Object element,
                                      java.lang.Object parent)

    - #### elementRemoved

          protected void elementRemoved(java.lang.Object element,
                                        java.lang.Object parent)

    - #### handleElementEvent

          protected void handleElementEvent(IEvent event)

      Since:
        3.3

    - #### getContainerChildren

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

      Since:
        3.5

    - #### getRoot

          protected ContainerItemProvider.Node getRoot()

    - #### getNodes

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

    - #### getNode

          protected ContainerItemProvider.Node getNode(java.lang.Object element)

    - #### createNode

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

    - #### createLeafNode

          protected ContainerItemProvider.LeafNode createLeafNode(ContainerItemProvider.Node parent,
                                                                  java.lang.Object element)

    - #### createContaineNode

          protected ContainerItemProvider.ContainerNode createContaineNode(ContainerItemProvider.Node parent,
                                                                           java.lang.Object element)

    - #### addNode

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

    - #### removeNode

          protected ContainerItemProvider.Node removeNode(java.lang.Object element)

    - #### filterRootElement

          protected boolean filterRootElement(java.lang.Object element)

    - #### executeRunnable

          protected void executeRunnable(java.lang.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<java.lang.Object> container)

      Since:
        3.1

    - #### getSlowText

          protected java.lang.String getSlowText(IContainer<java.lang.Object> container)

      Since:
        3.1

    - #### getErrorText

          protected java.lang.String getErrorText(IContainer<java.lang.Object> container)

      Since:
        3.1

    - #### fillContextMenu

          public void fillContextMenu(IMenuManager manager,
                                      ITreeSelection selection)

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

    - #### getFont

          public Font getFont(java.lang.Object obj)

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

    - #### getForeground

          public Color getForeground(java.lang.Object obj)

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

    - #### getImage

          public Image getImage(java.lang.Object obj)

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

    - #### createSlowInput

          public static IContainer<java.lang.Object> createSlowInput(java.lang.String text)

      Since:
        3.5

Copyright (c) 2004-2019 Eike Stepper (Loehne, Germany) and others.
All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html