1 package net.sf.tacos.model;
2
3 import java.util.Collection;
4
5 /**
6 * @author phraktle
7 */
8 public interface ITreeContentProvider extends IContentProvider {
9
10 /**
11 * Returns all child elements of a parent. The returned collection is not
12 * modified by the viewer.
13 *
14 * @param parentElement
15 * @return Collection of child nodes (never null)
16 */
17 public Collection getChildren(Object parentElement);
18
19 /**
20 * @param parentElement
21 * @return
22 */
23 public boolean hasChildren(Object parentElement);
24
25 /**
26 * Returns the parent of the given element, or <code>null</code> if the
27 * the parent can't be determined. Revealing a specific element will not
28 * work in this case.
29 *
30 * @param childElement
31 * @return parent or null
32 */
33 public Object getParent(Object childElement);
34 }