001 package net.sf.tacos.model; 002 003 import java.util.Collection; 004 005 /** 006 * @author phraktle 007 */ 008 public interface ITreeContentProvider extends IContentProvider { 009 010 /** 011 * Returns all child elements of a parent. The returned collection is not 012 * modified by the viewer. 013 * 014 * @param parentElement 015 * @return Collection of child nodes (never null) 016 */ 017 public Collection getChildren(Object parentElement); 018 019 /** 020 * @param parentElement 021 * @return 022 */ 023 public boolean hasChildren(Object parentElement); 024 025 /** 026 * Returns the parent of the given element, or <code>null</code> if the 027 * the parent can't be determined. Revealing a specific element will not 028 * work in this case. 029 * 030 * @param childElement 031 * @return parent or null 032 */ 033 public Object getParent(Object childElement); 034 }