KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > enterprise > tools > guiframework > view > descriptors > BasicTree


1 /*
2  * The contents of this file are subject to the terms
3  * of the Common Development and Distribution License
4  * (the License). You may not use this file except in
5  * compliance with the License.
6  *
7  * You can obtain a copy of the license at
8  * https://glassfish.dev.java.net/public/CDDLv1.0.html or
9  * glassfish/bootstrap/legal/CDDLv1.0.txt.
10  * See the License for the specific language governing
11  * permissions and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL
14  * Header Notice in each file and include the License file
15  * at glassfish/bootstrap/legal/CDDLv1.0.txt.
16  * If applicable, add the following below the CDDL Header,
17  * with the fields enclosed by brackets [] replaced by
18  * you own identifying information:
19  * "Portions Copyrighted [year] [name of copyright owner]"
20  *
21  * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
22  */

23
24 /*
25  * BasicTree.java
26  *
27  * Created on April 7, 2004, 10:44 PM
28  */

29
30 package com.sun.enterprise.tools.guiframework.view.descriptors;
31
32 import java.util.ArrayList JavaDoc;
33
34 //import com.sun.enterprise.tools.guiframework.view.descriptors.ViewDescriptor;
35
import com.iplanet.jato.RequestContext;
36
37
38 /**
39  *
40  * @author anissa
41  *
42  */

43 public interface BasicTree {
44     
45     // This method is called after the constructor of the implementing class for any initialization.
46
public void init(ViewDescriptor viewDescriptor, RequestContext ctx);
47     
48     //This method should return the root of the tree.
49
public Object JavaDoc getRoot();
50     
51     //Given the parent, this should return an ArrayList of all its children.
52
//The ArrayList should be empty if no child exist.
53
public ArrayList JavaDoc getChildren(Object JavaDoc parent);
54     
55     //Given the node, return if is is a child node.
56
public boolean hasChildren (Object JavaDoc node);
57     
58     //This method is called to get the display name of the node on the tree.
59
//The parameter passed is one of the nodes in the ArrayList returned by getChildren
60
public String JavaDoc getDisplayName(Object JavaDoc node);
61     
62     public String JavaDoc getURL();
63     public String JavaDoc getKey(Object JavaDoc node);
64 }
65
Popular Tags