KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > j2ee > dd > api > 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.modules.j2ee.dd.api.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  * @author Milan Kuchtiak
28  */

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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