Class FlatTreeContentProvider
java.lang.Object
org.eclipse.nebula.jface.galleryviewer.FlatTreeContentProvider
- All Implemented Interfaces:
org.eclipse.jface.viewers.IContentProvider
,org.eclipse.jface.viewers.IStructuredContentProvider
,org.eclipse.jface.viewers.ITreeContentProvider
public class FlatTreeContentProvider
extends java.lang.Object
implements org.eclipse.jface.viewers.ITreeContentProvider
Adaptor that converts an
IStructuredContentProvider
into an
ITreeContentProvider
that places the nested contents inside a single
root node.- Since:
- Dec 6, 2007
-
Field Summary
-
Constructor Summary
Constructors Constructor Description FlatTreeContentProvider(org.eclipse.jface.viewers.IStructuredContentProvider provider)
Adapts anIStructuredContentProvider
into anITreeContentProvider
that places the nested contents inside a single root node.FlatTreeContentProvider(org.eclipse.jface.viewers.IStructuredContentProvider provider, java.lang.Object rootNode)
Adapts anIStructuredContentProvider
into anITreeContentProvider
that places the nested contents inside the given root node. -
Method Summary
Modifier and Type Method Description void
dispose()
java.lang.Object[]
getChildren(java.lang.Object parentElement)
java.lang.Object[]
getElements(java.lang.Object inputElement)
java.lang.Object
getParent(java.lang.Object element)
boolean
hasChildren(java.lang.Object element)
void
inputChanged(org.eclipse.jface.viewers.Viewer viewer, java.lang.Object oldInput, java.lang.Object newInput)
-
Field Details
-
Constructor Details
-
FlatTreeContentProvider
public FlatTreeContentProvider(org.eclipse.jface.viewers.IStructuredContentProvider provider)Adapts anIStructuredContentProvider
into anITreeContentProvider
that places the nested contents inside a single root node.- Parameters:
provider
- theIStructuredContentProvider
to adapt
-
FlatTreeContentProvider
public FlatTreeContentProvider(org.eclipse.jface.viewers.IStructuredContentProvider provider, java.lang.Object rootNode)Adapts anIStructuredContentProvider
into anITreeContentProvider
that places the nested contents inside the given root node.- Parameters:
provider
- theIStructuredContentProvider
to adaptthe
- single root node for the tree
-
-
Method Details
-
getParent
public java.lang.Object getParent(java.lang.Object element)- Specified by:
getParent
in interfaceorg.eclipse.jface.viewers.ITreeContentProvider
- See Also:
ITreeContentProvider.getParent(java.lang.Object)
-
hasChildren
public boolean hasChildren(java.lang.Object element)- Specified by:
hasChildren
in interfaceorg.eclipse.jface.viewers.ITreeContentProvider
- See Also:
ITreeContentProvider.hasChildren(java.lang.Object)
-
getElements
public java.lang.Object[] getElements(java.lang.Object inputElement)- Specified by:
getElements
in interfaceorg.eclipse.jface.viewers.IStructuredContentProvider
- Specified by:
getElements
in interfaceorg.eclipse.jface.viewers.ITreeContentProvider
- See Also:
IStructuredContentProvider.getElements(java.lang.Object)
-
getChildren
public java.lang.Object[] getChildren(java.lang.Object parentElement)- Specified by:
getChildren
in interfaceorg.eclipse.jface.viewers.ITreeContentProvider
- See Also:
ITreeContentProvider.getChildren(java.lang.Object)
-
dispose
public void dispose()- Specified by:
dispose
in interfaceorg.eclipse.jface.viewers.IContentProvider
- See Also:
IContentProvider.dispose()
-
inputChanged
public void inputChanged(org.eclipse.jface.viewers.Viewer viewer, java.lang.Object oldInput, java.lang.Object newInput)- Specified by:
inputChanged
in interfaceorg.eclipse.jface.viewers.IContentProvider
- See Also:
IContentProvider.inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
-