KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jdt > ui > ISharedImages


1 /*******************************************************************************
2  * Copyright (c) 2000, 2006 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.jdt.ui;
12
13
14 import org.eclipse.swt.graphics.Image;
15
16 import org.eclipse.jface.resource.ImageDescriptor;
17
18 import org.eclipse.jdt.internal.ui.JavaPluginImages;
19
20 /**
21  * Standard images provided by the Java UI plug-in. This class offers access to the
22  * standard images in two forms:
23  * <ul>
24  * <li>Use <code>ISharedImages.getImage(IMG_OBJS_<i>FOO</i>)</code>
25  * to access the shared standard <code>Image</code> object (caller must not
26  * dispose of image).</li>
27  * <li>Use <code>ISharedImages.getImageDescriptor(IMG_OBJS_<i>FOO</i>)</code>
28  * to access the standard <code>ImageDescriptor</code> object (caller is
29  * responsible for disposing of any <code>Image</code> objects it creates using
30  * this descriptor).</li>
31  * </ul>
32  * <p>
33  * This interface is not intended to be implemented by clients.
34  * </p>
35  */

36 public interface ISharedImages {
37             
38     /**
39      * Key to access the shared image or image descriptor for a Java compilation unit.
40      */

41     public static final String JavaDoc IMG_OBJS_CUNIT= JavaPluginImages.IMG_OBJS_CUNIT;
42     
43     /**
44      * Key to access the shared image or image descriptor for a Java class file.
45      */

46     public static final String JavaDoc IMG_OBJS_CFILE= JavaPluginImages.IMG_OBJS_CFILE;
47     
48     /**
49      * Key to access the shared image or image descriptor for a JAR archive.
50      */

51     public static final String JavaDoc IMG_OBJS_JAR= JavaPluginImages.IMG_OBJS_JAR;
52     
53     /**
54      * Key to access the shared image or image descriptor for a JAR with source.
55      * @since 3.0
56      */

57     public static final String JavaDoc IMG_OBJS_JAR_WITH_SOURCE= JavaPluginImages.IMG_OBJS_JAR_WSRC;
58             
59     /**
60      * Key to access the shared image or image descriptor for external archives.
61      * @since 2.1
62      */

63     public static final String JavaDoc IMG_OBJS_EXTERNAL_ARCHIVE= JavaPluginImages.IMG_OBJS_EXTJAR;
64     
65     /**
66      * Key to access the shared image or image descriptor for external archives with source.
67      * @since 2.1
68      */

69     public static final String JavaDoc IMG_OBJS_EXTERNAL_ARCHIVE_WITH_SOURCE= JavaPluginImages.IMG_OBJS_EXTJAR_WSRC;
70
71     /**
72      * Key to access the shared image or image descriptor for a classpath variable entry.
73      * @since 3.2
74      */

75     public static final String JavaDoc IMG_OBJS_CLASSPATH_VAR_ENTRY= JavaPluginImages.IMG_OBJS_ENV_VAR;
76
77     /**
78      * Key to access the shared image or image descriptor for a library (class path container).
79      * @since 3.0
80      */

81     public static final String JavaDoc IMG_OBJS_LIBRARY= JavaPluginImages.IMG_OBJS_LIBRARY;
82     
83     /**
84      * Key to access the shared image or image descriptor for a package fragment root.
85      * @since 3.0
86      */

87     public static final String JavaDoc IMG_OBJS_PACKFRAG_ROOT= JavaPluginImages.IMG_OBJS_PACKFRAG_ROOT;
88     
89     /**
90      * Key to access the shared image or image descriptor for a package.
91      */

92     public static final String JavaDoc IMG_OBJS_PACKAGE= JavaPluginImages.IMG_OBJS_PACKAGE;
93     
94     /**
95      * Key to access the shared image or image descriptor for an empty package.
96      * @since 3.0
97      */

98     public static final String JavaDoc IMG_OBJS_EMPTY_PACKAGE= JavaPluginImages.IMG_OBJS_EMPTY_PACKAGE;
99
100     /**
101      * Key to access the shared image or image descriptor for a logical package.
102      * @since 3.0
103      */

104     public static final String JavaDoc IMG_OBJS_LOGICAL_PACKAGE= JavaPluginImages.IMG_OBJS_LOGICAL_PACKAGE;
105     
106     /**
107      * Key to access the shared image or image descriptor for an empty logical package.
108      * @since 3.0
109      */

110     public static final String JavaDoc IMG_OBJS_EMPTY_LOGICAL_PACKAGE= JavaPluginImages.IMG_OBJS_EMPTY_LOGICAL_PACKAGE;
111     
112     /**
113      * Key to access the shared image or image descriptor for a class.
114      */

115     public static final String JavaDoc IMG_OBJS_CLASS= JavaPluginImages.IMG_OBJS_CLASS;
116     
117     /**
118      * Key to access the shared image or image descriptor for a class with default visibility.
119      * @since 3.0
120      */

121     public static final String JavaDoc IMG_OBJS_CLASS_DEFAULT= JavaPluginImages.IMG_OBJS_CLASS_DEFAULT;
122     
123     /**
124      * Key to access the shared image or image descriptor for a public inner class.
125      * @since 3.0
126      */

127     public static final String JavaDoc IMG_OBJS_INNER_CLASS_PUBLIC= JavaPluginImages.IMG_OBJS_INNER_CLASS_PUBLIC;
128     
129     /**
130      * Key to access the shared image or image descriptor for a inner class with default visibility.
131      * @since 3.0
132      */

133     public static final String JavaDoc IMG_OBJS_INNER_CLASS_DEFAULT= JavaPluginImages.IMG_OBJS_INNER_CLASS_DEFAULT;
134     
135     /**
136      * Key to access the shared image or image descriptor for a protected inner class.
137      * @since 3.0
138      */

139     public static final String JavaDoc IMG_OBJS_INNER_CLASS_PROTECTED= JavaPluginImages.IMG_OBJS_INNER_CLASS_PROTECTED;
140     
141     /**
142      * Key to access the shared image or image descriptor for a private inner class.
143      * @since 3.0
144      */

145     public static final String JavaDoc IMG_OBJS_INNER_CLASS_PRIVATE= JavaPluginImages.IMG_OBJS_INNER_CLASS_PRIVATE;
146     
147     /**
148      * Key to access the shared image or image descriptor for an interface.
149      */

150     public static final String JavaDoc IMG_OBJS_INTERFACE= JavaPluginImages.IMG_OBJS_INTERFACE;
151     
152     /**
153      * Key to access the shared image or image descriptor for an interface with default visibility.
154      * @since 3.0
155      */

156     public static final String JavaDoc IMG_OBJS_INTERFACE_DEFAULT= JavaPluginImages.IMG_OBJS_INTERFACE_DEFAULT;
157     
158     /**
159      * Key to access the shared image or image descriptor for a public inner interface.
160      * @since 3.0
161      */

162     public static final String JavaDoc IMG_OBJS_INNER_INTERFACE_PUBLIC= JavaPluginImages.IMG_OBJS_INNER_INTERFACE_PUBLIC;
163     
164     /**
165      * Key to access the shared image or image descriptor for an inner interface with default visibility.
166      * @since 3.0
167      */

168     public static final String JavaDoc IMG_OBJS_INNER_INTERFACE_DEFAULT= JavaPluginImages.IMG_OBJS_INNER_INTERFACE_DEFAULT;
169     
170     /**
171      * Key to access the shared image or image descriptor for a protected inner interface.
172      * @since 3.0
173      */

174     public static final String JavaDoc IMG_OBJS_INNER_INTERFACE_PROTECTED= JavaPluginImages.IMG_OBJS_INNER_INTERFACE_PROTECTED;
175     
176     /**
177      * Key to access the shared image or image descriptor for a private inner interface.
178      * @since 3.0
179      */

180     public static final String JavaDoc IMG_OBJS_INNER_INTERFACE_PRIVATE= JavaPluginImages.IMG_OBJS_INNER_INTERFACE_PRIVATE;
181
182     /** Key to access the shared image or image descriptor for a package declaration. */
183     public static final String JavaDoc IMG_OBJS_PACKDECL= JavaPluginImages.IMG_OBJS_PACKDECL;
184     
185     /** Key to access the shared image or image descriptor for an import container. */
186     public static final String JavaDoc IMG_OBJS_IMPCONT= JavaPluginImages.IMG_OBJS_IMPCONT;
187     
188     /** Key to access the shared image or image descriptor for an import statement. */
189     public static final String JavaDoc IMG_OBJS_IMPDECL= JavaPluginImages.IMG_OBJS_IMPDECL;
190     
191     /** Key to access the shared image or image descriptor for a public member. */
192     public static final String JavaDoc IMG_OBJS_PUBLIC= JavaPluginImages.IMG_MISC_PUBLIC;
193     
194     /** Key to access the shared image or image descriptor for a protected member. */
195     public static final String JavaDoc IMG_OBJS_PROTECTED= JavaPluginImages.IMG_MISC_PROTECTED;
196     
197     /** Key to access the shared image or image descriptor for a private member. */
198     public static final String JavaDoc IMG_OBJS_PRIVATE= JavaPluginImages.IMG_MISC_PRIVATE;
199     
200     /** Key to access the shared image or image descriptor for class members with default visibility. */
201     public static final String JavaDoc IMG_OBJS_DEFAULT= JavaPluginImages.IMG_MISC_DEFAULT;
202     
203     /**
204      * Key to access the shared image or image descriptor for a public field.
205      * @since 3.0
206      */

207     public static final String JavaDoc IMG_FIELD_PUBLIC= JavaPluginImages.IMG_FIELD_PUBLIC;
208     
209     /**
210      * Key to access the shared image or image descriptor for a protected field.
211      * @since 3.0
212      */

213     public static final String JavaDoc IMG_FIELD_PROTECTED= JavaPluginImages.IMG_FIELD_PROTECTED;
214     
215     /**
216      * Key to access the shared image or image descriptor for a private field.
217      * @since 3.0
218      */

219     public static final String JavaDoc IMG_FIELD_PRIVATE= JavaPluginImages.IMG_FIELD_PRIVATE;
220     
221     /**
222      * Key to access the shared image or image descriptor for a field with default visibility.
223      * @since 3.0
224      */

225     public static final String JavaDoc IMG_FIELD_DEFAULT= JavaPluginImages.IMG_FIELD_DEFAULT;
226         
227     /**
228      * Key to access the shared image or image descriptor for a local variable.
229      * @since 3.0
230      */

231     public static final String JavaDoc IMG_OBJS_LOCAL_VARIABLE= JavaPluginImages.IMG_OBJS_LOCAL_VARIABLE;
232     
233     /**
234      * Key to access the shared image or image descriptor for a enum type.
235      * @since 3.1
236      */

237     public static final String JavaDoc IMG_OBJS_ENUM= JavaPluginImages.IMG_OBJS_ENUM;
238     
239     /**
240      * Key to access the shared image or image descriptor for a enum type
241      * with default visibility.
242      * @since 3.1
243      */

244     public static final String JavaDoc IMG_OBJS_ENUM_DEFAULT= JavaPluginImages.IMG_OBJS_ENUM_DEFAULT;
245     
246     /**
247      * Key to access the shared image or image descriptor for a enum type
248      * with protected visibility.
249      * @since 3.1
250      */

251     public static final String JavaDoc IMG_OBJS_ENUM_PROTECTED= JavaPluginImages.IMG_OBJS_ENUM_PROTECTED;
252     
253     /**
254      * Key to access the shared image or image descriptor for a enum type
255      * with private visibility.
256      * @since 3.1
257      */

258     public static final String JavaDoc IMG_OBJS_ENUM_PRIVATE= JavaPluginImages.IMG_OBJS_ENUM_PRIVATE;
259     
260     /**
261      * Key to access the shared image or image descriptor for a annotation type.
262      * @since 3.1
263      */

264     public static final String JavaDoc IMG_OBJS_ANNOTATION= JavaPluginImages.IMG_OBJS_ANNOTATION;
265     
266     /**
267      * Key to access the shared image or image descriptor for a annotation type
268      * with default visibility.
269      * @since 3.1
270      */

271     public static final String JavaDoc IMG_OBJS_ANNOTATION_DEFAULT= JavaPluginImages.IMG_OBJS_ANNOTATION_DEFAULT;
272     
273     /**
274      * Key to access the shared image or image descriptor for a annotation type
275      * with protected visibility.
276      * @since 3.1
277      */

278     public static final String JavaDoc IMG_OBJS_ANNOTATION_PROTECTED= JavaPluginImages.IMG_OBJS_ANNOTATION_PROTECTED;
279     
280     /**
281      * Key to access the shared image or image descriptor for a annotation type
282      * with private visibility.
283      * @since 3.1
284      */

285     public static final String JavaDoc IMG_OBJS_ANNOTATION_PRIVATE= JavaPluginImages.IMG_OBJS_ANNOTATION_PRIVATE;
286     
287     /**
288      * Key to access the shared image or image descriptor for javadoc tags.
289      * @since 3.2
290      */

291     public static final String JavaDoc IMG_OBJS_JAVADOCTAG= JavaPluginImages.IMG_OBJS_JAVADOCTAG;
292     
293     /**
294      * Returns the shared image managed under the given key.
295      * <p>
296      * Note that clients <b>must not</b> dispose the image returned by this method.
297      * </p>
298      *
299      * @param key the image key; one of the <code>IMG_OBJS_* </code> constants
300      * @return the shared image managed under the given key, or <code>null</code>
301      * if none
302      */

303     public Image getImage(String JavaDoc key);
304     
305     /**
306      * Returns the image descriptor managed under the given key.
307      *
308      * @param key the image key; one of the <code>IMG_OBJS_* </code> constants
309      * @return the image descriptor managed under the given key, or <code>null</code>
310      * if none
311      */

312     public ImageDescriptor getImageDescriptor(String JavaDoc key);
313 }
314
Popular Tags