net.sf.tacos.demo.tree.fs
Class FileTreeContentProvider

java.lang.Object
  extended by net.sf.tacos.demo.tree.fs.FileTreeContentProvider
All Implemented Interfaces:
IContentProvider, ITreeContentProvider

public class FileTreeContentProvider
extends Object
implements ITreeContentProvider

Author:
phraktle

Constructor Summary
FileTreeContentProvider(String rootPath)
          Creates a new tree
 
Method Summary
 Collection getChildren(Object parentElement)
          Returns all child elements of a parent.
 List 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

FileTreeContentProvider

public FileTreeContentProvider(String rootPath)
Creates a new tree

Parameters:
rootPath -
Method Detail

getElements

public List getElements()

Specified by:
getElements in interface IContentProvider
Returns:

getChildren

public Collection getChildren(Object parentElement)
Returns all child elements of a parent. The returned collection is not modified by the viewer.

Specified by:
getChildren in interface ITreeContentProvider
Returns:
Collection of child nodes (never null)

getParent

public Object getParent(Object childElement)
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
Returns:
parent or null

hasChildren

public boolean hasChildren(Object parentElement)

Specified by:
hasChildren in interface ITreeContentProvider
Returns: