KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > xml > api > model > GrammarResult


1 /*
2  * The contents of this file are subject to the terms of the Common Development
3  * and Distribution License (the License). You may not use this file except in
4  * compliance with the License.
5  *
6  * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
7  * or http://www.netbeans.org/cddl.txt.
8  *
9  * When distributing Covered Code, include this CDDL Header Notice in each file
10  * and include the License file at http://www.netbeans.org/cddl.txt.
11  * If applicable, add the following below the CDDL Header, with the fields
12  * enclosed by brackets [] replaced by your own identifying information:
13  * "Portions Copyrighted [year] [name of copyright owner]"
14  *
15  * The Original Software is NetBeans. The Initial Developer of the Original
16  * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
17  * Microsystems, Inc. All Rights Reserved.
18  */

19
20 package org.netbeans.modules.xml.api.model;
21
22 import org.w3c.dom.Node JavaDoc;
23 import javax.swing.Icon JavaDoc;
24
25 /**
26  * It represents additonal properties of a result option.
27  * <p>
28  * It enriches DOM Node with information useful for presenting
29  * query result option to a user. Also all children or siblings of this
30  * result must be <code>GrammarResult</code> instances.
31  * <p>
32  * It can have children representing mandatory content.
33  * However it is up to client if it uses the mandatory content.
34  * <p>
35  * As in whole package provide only readonly DOM level 1 implementation.
36  *
37  * @author Petr Kuzel
38  * @stereotype description
39  */

40 public interface GrammarResult extends Node JavaDoc {
41
42     //Node getNode() use instead of extends Node
43
//boolean isDefault()
44
//boolean isImplied()
45
//boolean isRequired()
46
//boolean isFixed()
47

48     /**
49      * @return name that is presented to user or <code>null</code> if
50      * <code>getNodeName()</code> is enough.
51      */

52     String JavaDoc getDisplayName();
53
54     /**
55      * @return provide additional information simplifing decision
56      * (suitable for tooltip) or <code>null</code>
57      */

58     String JavaDoc getDescription();
59
60     /**
61      * @param kind icon kind as given by BeanInfo
62      * @return an icon - a visual hint or <code>null</code>
63      */

64     Icon JavaDoc getIcon(int kind);
65
66     /**
67      * For elements provide hint whether element has empty content model.
68      * @return true element has empty content model (no childs) and can
69      * be completed in empty element form i.e. <code>&lt;ement/></code>.
70      * @since 6th Aug 2004
71      */

72     boolean isEmptyElement();
73 }
74
Popular Tags