net.sf.tacos.demo.tree
Class SimpleTreeContentProvider
java.lang.Object
net.sf.tacos.demo.tree.SimpleTreeContentProvider
- All Implemented Interfaces:
- IContentProvider, ITreeContentProvider
- public class SimpleTreeContentProvider
- extends Object
- implements ITreeContentProvider
- Author:
- phraktle
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SimpleTreeContentProvider
public SimpleTreeContentProvider()
getElements
public Collection getElements()
- Specified by:
getElements
in interface IContentProvider
- Returns:
hasChildren
public boolean hasChildren(Object parentElement)
- Specified by:
hasChildren
in interface ITreeContentProvider
- Parameters:
parentElement
-
- Returns:
getChildren
public Collection getChildren(Object parentElement)
- Description copied from interface:
ITreeContentProvider
- Returns all child elements of a parent.
The returned collection is not modified by the viewer.
- Specified by:
getChildren
in interface ITreeContentProvider
- Parameters:
parentElement
-
- Returns:
- Collection of child nodes (never null)
getParent
public Object getParent(Object childElement)
- Description copied from interface:
ITreeContentProvider
- Returns the parent of the given element, or
null
if the the parent can't be determined. Revealing a specific element
will not work in this case.
- Specified by:
getParent
in interface ITreeContentProvider
- Parameters:
childElement
-
- Returns:
- parent or null