net.sf.tacos.demo.tree
Class SimpleTreeContentProvider

java.lang.Object
  extended bynet.sf.tacos.demo.tree.SimpleTreeContentProvider
All Implemented Interfaces:
IContentProvider, ITreeContentProvider

public class SimpleTreeContentProvider
extends Object
implements ITreeContentProvider

Author:
phraktle

Constructor Summary
SimpleTreeContentProvider()
           
 
Method Summary
 Collection getChildren(Object parentElement)
          Returns all child elements of a parent.
 Collection getElements()
           
 Object getParent(Object childElement)
          Returns the parent of the given element, or null if the the parent can't be determined.
 boolean hasChildren(Object parentElement)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleTreeContentProvider

public SimpleTreeContentProvider()
Method Detail

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