KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > directory > ldapstudio > proxy > view > wrappers > IWrapper


1 /*
2  * Licensed to the Apache Software Foundation (ASF) under one
3  * or more contributor license agreements. See the NOTICE file
4  * distributed with this work for additional information
5  * regarding copyright ownership. The ASF licenses this file
6  * to you under the Apache License, Version 2.0 (the
7  * "License"); you may not use this file except in compliance
8  * with the License. You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing,
13  * software distributed under the License is distributed on an
14  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15  * KIND, either express or implied. See the License for the
16  * specific language governing permissions and limitations
17  * under the License.
18  *
19  */

20 package org.apache.directory.ldapstudio.proxy.view.wrappers;
21
22
23 import java.util.List JavaDoc;
24
25 import org.eclipse.swt.graphics.Image;
26
27
28 /**
29  * This interface defines an element that can be displayed in the LDAP Proxy TreeViewer.
30  *
31  * @author <a HREF="mailto:dev@directory.apache.org">Apache Directory Project</a>
32  * @version $Rev$, $Date$
33  */

34 public interface IWrapper
35 {
36     /**
37      * Returns the text for the label of the element.
38      *
39      * @return
40      * the text string used to label the element, or null if there is no text label for the element
41      */

42     public String JavaDoc getText();
43
44
45     /**
46      * Returns the image for the label of the element.
47      *
48      * @return
49      * the image used to label the element, or null if there is no image for the element
50      */

51     public Image getImage();
52
53
54     /**
55      * Returns the child elements of the element.
56      *
57      * @return
58      * a List of child elements
59      */

60     public List JavaDoc<IWrapper> getChildren();
61
62
63     /**
64      * Returns whether the element has children.
65      *
66      * @return
67      * true if the given element has children, and false if it has no children
68      */

69     public boolean hasChildren();
70
71
72     /**
73      * Returns the parent for the element, or null indicating that the parent can't be computed.
74      * In this case the tree-structured viewer can't expand a given node correctly if requested.
75      *
76      * @return
77      * the parent element, or null if it has none or if the parent cannot be computed
78      */

79     public IWrapper getParent();
80 }
81
Popular Tags