org.eclipse.net4j.util.ui.views
Class ContainerItemProvider<CONTAINER extends IContainer<Object>>

java.lang.Object
  extended by org.eclipse.net4j.util.ui.StructuredContentProvider<INPUT>
      extended by org.eclipse.net4j.util.ui.views.ItemProvider<CONTAINER>
          extended by org.eclipse.net4j.util.ui.views.ContainerItemProvider<CONTAINER>
All Implemented Interfaces:
EventListener, IBaseLabelProvider, IColorProvider, IContentProvider, IFontProvider, ILabelProvider, IStructuredContentProvider, ITreeContentProvider, IListener
Direct Known Subclasses:
ContainerPathItemProvider

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


Nested Class Summary
 class ContainerItemProvider.AbstractContainerNode
           
 class ContainerItemProvider.AbstractNode
           
 class ContainerItemProvider.ContainerNode
           
 class ContainerItemProvider.ErrorElement
           
 class ContainerItemProvider.LazyElement
           
 class ContainerItemProvider.LeafNode
           
static interface ContainerItemProvider.Node
           
 
Field Summary
 
Fields inherited from class org.eclipse.net4j.util.ui.views.ItemProvider
NO_ELEMENTS
 
Constructor Summary
ContainerItemProvider()
           
ContainerItemProvider(IElementFilter rootElementFilter)
           
 
Method Summary
protected  void addNode(Object element, ContainerItemProvider.Node node)
           
protected  void connectInput(CONTAINER input)
           
protected  ContainerItemProvider.ContainerNode createContaineNode(ContainerItemProvider.Node parent, Object element)
           
protected  ContainerItemProvider.LeafNode createLeafNode(ContainerItemProvider.Node parent, Object element)
           
protected  ContainerItemProvider.Node createNode(ContainerItemProvider.Node parent, Object element)
           
protected  void disconnectInput(CONTAINER input)
           
 void dispose()
           
protected  void elementAdded(Object element, Object parent)
           
protected  void elementRemoved(Object element, Object parent)
           
protected  void executeRunnable(Runnable runnable)
           
protected  void fillContextMenu(IMenuManager manager, ITreeSelection selection)
           
protected  boolean filterRootElement(Object element)
           
 Object[] getChildren(Object element)
           
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 handleInactiveElement(Iterator<ContainerItemProvider.Node> it, ContainerItemProvider.Node child)
           
protected  boolean isSlow(IContainer<Object> container)
           
protected  ContainerItemProvider.Node removeNode(Object element)
           
 
Methods inherited from class org.eclipse.net4j.util.ui.views.ItemProvider
addListener, fireLabelProviderChanged, fireLabelProviderChanged, fireLabelProviderChanged, getBackground, getElements, getListeners, getText, hasChildren, isLabelProperty, removeListener
 
Methods inherited from class org.eclipse.net4j.util.ui.StructuredContentProvider
getDisplay, getInput, getItalicFont, getViewer, inputChanged, notifyEvent, refreshElement, refreshSynced, refreshViewer, revealElement, selectElement, updateLabels
 
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
inputChanged
 

Constructor Detail

ContainerItemProvider

public ContainerItemProvider()

ContainerItemProvider

public ContainerItemProvider(IElementFilter rootElementFilter)
Method Detail

getRootElementFilter

public IElementFilter getRootElementFilter()

getChildren

public Object[] getChildren(Object element)

getParent

public Object getParent(Object element)

dispose

public void dispose()
Specified by:
dispose in interface IBaseLabelProvider
Specified by:
dispose in interface IContentProvider
Overrides:
dispose in class StructuredContentProvider<CONTAINER extends IContainer<Object>>

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)

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.LeafNode createLeafNode(ContainerItemProvider.Node parent,
                                                        Object element)

createContaineNode

protected ContainerItemProvider.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

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

protected void fillContextMenu(IMenuManager manager,
                               ITreeSelection selection)
Overrides:
fillContextMenu in class ItemProvider<CONTAINER extends IContainer<Object>>

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 ILabelProvider
Overrides:
getImage in class ItemProvider<CONTAINER extends IContainer<Object>>


Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.