KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > api > web > dd > common > IconInterface


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.api.web.dd.common;
21 /**
22  * Super interface for all DD elements having the icon property/properties.
23  *
24  *<p><b><font color="red"><em>Important note: Do not provide an implementation of this interface unless you are a DD API provider!</em></font></b>
25  *</p>
26  *
27  * @deprecated Use the API for web module deployment descriptor in j2ee/ddapi module.
28  * @author Milan Kuchtiak
29  */

30 public interface IconInterface {
31
32     /**
33      * Sets the small-icon element value for particular locale.<br>
34      * If locale=null the method sets the small-icon value for icon element where xml:lang attribute is not specified.<br>
35      * If icon=null method removes the small-icon element for a specified locale.<br>
36      *
37      * @param locale string representing the locale - the value for xml:lang attribute e.g. "fr"
38      * @param icon value for small-icon element
39      */

40     public void setSmallIcon(String JavaDoc locale, String JavaDoc icon) throws VersionNotSupportedException;
41     /**
42      * Sets the small-icon element value for icon element where xml:lang attribute is not specified.
43      *
44      * @param icon value for small-icon element
45      */

46     public void setSmallIcon(String JavaDoc icon);
47     /**
48      * Sets the large-icon element value for particular locale.<br>
49      * If locale=null the method sets the large-icon value for icon element where xml:lang attribute is not specified.<br>
50      * If icon=null method removes the large-icon element for a specified locale.<br>
51      *
52      * @param locale string representing the locale - the value for xml:lang attribute e.g. "fr"
53      * @param icon value for large-icon element
54      */

55     public void setLargeIcon(String JavaDoc locale, String JavaDoc icon) throws VersionNotSupportedException;
56     /**
57      * Sets the large-icon element value for icon element where xml:lang attribute is not specified.
58      *
59      * @param icon value for large-icon element
60      */

61     public void setLargeIcon(String JavaDoc icon);
62     /**
63      * Sets the multiple icon elements.
64      *
65      * @param locales array of locales (xml:lang attribute values for icon elements)
66      * @param smallIcons array of values for small-icon elements
67      * @param largeIcons array of values for large-icon elements
68      */

69     public void setAllIcons(String JavaDoc[] locales, String JavaDoc[] smallIcons, String JavaDoc[] largeIcons) throws VersionNotSupportedException;
70     /**
71      * Sets the icon element. Looking for icon element with the same xml:lang attribute.<br>
72      * If found the element will be replaced by new icon value.
73      *
74      * @param icon value for icon element
75      */

76     public void setIcon(org.netbeans.api.web.dd.Icon icon);
77     
78     /**
79      * Returns the small-icon element value for particular locale.<br>
80      * If locale=null method returns small-icon for default locale.
81      *
82      * @param locale string representing the locale - the value of xml:lang attribute e.g. "fr".
83      * @return small-icon element value or null if not specified for given locale
84      */

85     public String JavaDoc getSmallIcon(String JavaDoc locale) throws VersionNotSupportedException;
86     /**
87      * Returns the small-icon element value for default locale.
88      *
89      * @return small-icon element value or null if not specified for default locale
90      */

91     public String JavaDoc getSmallIcon();
92     /**
93      * Returns the large-icon element value for particular locale.<br>
94      * If locale=null method returns large-icon for default locale.
95      *
96      * @param locale string representing the locale - the value of xml:lang attribute e.g. "fr".
97      * @return large-icon element value or null if not specified for given locale
98      */

99     public String JavaDoc getLargeIcon(String JavaDoc locale) throws VersionNotSupportedException;
100     /**
101      * Returns the large-icon element value for default locale.
102      *
103      * @return large-icon element value or null if not specified for default locale
104      */

105     public String JavaDoc getLargeIcon();
106     /**
107      * Returns the icon element value for default locale.
108      *
109      * @return icon element value or null if not specified for default locale
110      */

111     public org.netbeans.api.web.dd.Icon getDefaultIcon();
112     /**
113      * Returns all icon elements in the form of <@link java.util.Map>.
114      *
115      * @return map of all icons in the form of [locale:String[]{smallIcon, largeIcon}]
116      */

117     public java.util.Map JavaDoc getAllIcons();
118     
119     /**
120      * Removes the small-icon element for particular locale.
121      * If locale=null the method removes the small-icon element for default locale.
122      *
123      * @param locale string representing the locale - the value of xml:lang attribute e.g. "fr"
124      */

125     public void removeSmallIcon(String JavaDoc locale) throws VersionNotSupportedException;
126     /**
127      * Removes the large-icon element for particular locale.
128      * If locale=null the method removes the large-icon element for default locale.
129      *
130      * @param locale string representing the locale - the value of xml:lang attribute e.g. "fr"
131      */

132     public void removeLargeIcon(String JavaDoc locale) throws VersionNotSupportedException;
133     /**
134      * Removes the icon element for particular locale.
135      * If locale=null the method removes the icon element for default locale.
136      *
137      * @param locale string representing the locale - the value of xml:lang attribute e.g. "fr"
138      */

139     public void removeIcon(String JavaDoc locale) throws VersionNotSupportedException;
140     /**
141      * Removes small-icon element for default locale.
142      */

143     public void removeSmallIcon();
144     /**
145      * Removes large-icon element for default locale.
146      */

147     public void removeLargeIcon();
148     /**
149      * Removes icon element for default locale.
150      */

151     public void removeIcon();
152     /**
153      * Removes all icon elements from DD element.
154      */

155     public void removeAllIcons();
156 }
157
Popular Tags