1 /*******************************************************************************
2 * Copyright (c) 2000, 2008 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
9 * IBM Corporation - initial API and implementation
10 *******************************************************************************/
11 package org.eclipse.jdt.ui;
14 import org.eclipse.swt.graphics.Image;
16 import org.eclipse.jface.resource.ImageDescriptor;
18 import org.eclipse.jdt.internal.ui.JavaPluginImages;
21 * Standard images provided by the Java UI plug-in. This class offers access to the
22 * standard images in two forms:
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>
33 * This interface is not intended to be implemented by clients.
36 * @noimplement This interface is not intended to be implemented by clients.
37 * @noextend This interface is not intended to be extended by clients.
39 public interface ISharedImages {
42 * Key to access the shared image or image descriptor for a Java compilation unit.
44 public static final String IMG_OBJS_CUNIT= JavaPluginImages.IMG_OBJS_CUNIT;
47 * Key to access the shared image or image descriptor for a Java class file.
49 public static final String IMG_OBJS_CFILE= JavaPluginImages.IMG_OBJS_CFILE;
52 * Key to access the shared image or image descriptor for a JAR archive.
54 public static final String IMG_OBJS_JAR= JavaPluginImages.IMG_OBJS_JAR;
57 * Key to access the shared image or image descriptor for a JAR with source.
60 public static final String IMG_OBJS_JAR_WITH_SOURCE= JavaPluginImages.IMG_OBJS_JAR_WSRC;
63 * Key to access the shared image or image descriptor for external archives.
66 public static final String IMG_OBJS_EXTERNAL_ARCHIVE= JavaPluginImages.IMG_OBJS_EXTJAR;
69 * Key to access the shared image or image descriptor for external archives with source.
72 public static final String IMG_OBJS_EXTERNAL_ARCHIVE_WITH_SOURCE= JavaPluginImages.IMG_OBJS_EXTJAR_WSRC;
75 * Key to access the shared image or image descriptor for a classpath variable entry.
78 public static final String IMG_OBJS_CLASSPATH_VAR_ENTRY= JavaPluginImages.IMG_OBJS_ENV_VAR;
81 * Key to access the shared image or image descriptor for a library (class path container).
84 public static final String IMG_OBJS_LIBRARY= JavaPluginImages.IMG_OBJS_LIBRARY;
87 * Key to access the shared image or image descriptor for a package fragment root.
90 public static final String IMG_OBJS_PACKFRAG_ROOT= JavaPluginImages.IMG_OBJS_PACKFRAG_ROOT;
93 * Key to access the shared image or image descriptor for a package.
95 public static final String IMG_OBJS_PACKAGE= JavaPluginImages.IMG_OBJS_PACKAGE;
98 * Key to access the shared image or image descriptor for an empty package.
101 public static final String IMG_OBJS_EMPTY_PACKAGE= JavaPluginImages.IMG_OBJS_EMPTY_PACKAGE;
104 * Key to access the shared image or image descriptor for a logical package.
107 public static final String IMG_OBJS_LOGICAL_PACKAGE= JavaPluginImages.IMG_OBJS_LOGICAL_PACKAGE;
110 * Key to access the shared image or image descriptor for an empty logical package.
113 public static final String IMG_OBJS_EMPTY_LOGICAL_PACKAGE= JavaPluginImages.IMG_OBJS_EMPTY_LOGICAL_PACKAGE;
116 * Key to access the shared image or image descriptor for a class.
118 public static final String IMG_OBJS_CLASS= JavaPluginImages.IMG_OBJS_CLASS;
121 * Key to access the shared image or image descriptor for a class with default visibility.
124 public static final String IMG_OBJS_CLASS_DEFAULT= JavaPluginImages.IMG_OBJS_CLASS_DEFAULT;
127 * Key to access the shared image or image descriptor for a public inner class.
130 public static final String IMG_OBJS_INNER_CLASS_PUBLIC= JavaPluginImages.IMG_OBJS_INNER_CLASS_PUBLIC;
133 * Key to access the shared image or image descriptor for a inner class with default visibility.
136 public static final String IMG_OBJS_INNER_CLASS_DEFAULT= JavaPluginImages.IMG_OBJS_INNER_CLASS_DEFAULT;
139 * Key to access the shared image or image descriptor for a protected inner class.
142 public static final String IMG_OBJS_INNER_CLASS_PROTECTED= JavaPluginImages.IMG_OBJS_INNER_CLASS_PROTECTED;
145 * Key to access the shared image or image descriptor for a private inner class.
148 public static final String IMG_OBJS_INNER_CLASS_PRIVATE= JavaPluginImages.IMG_OBJS_INNER_CLASS_PRIVATE;
151 * Key to access the shared image or image descriptor for an interface.
153 public static final String IMG_OBJS_INTERFACE= JavaPluginImages.IMG_OBJS_INTERFACE;
156 * Key to access the shared image or image descriptor for an interface with default visibility.
159 public static final String IMG_OBJS_INTERFACE_DEFAULT= JavaPluginImages.IMG_OBJS_INTERFACE_DEFAULT;
162 * Key to access the shared image or image descriptor for a public inner interface.
165 public static final String IMG_OBJS_INNER_INTERFACE_PUBLIC= JavaPluginImages.IMG_OBJS_INNER_INTERFACE_PUBLIC;
168 * Key to access the shared image or image descriptor for an inner interface with default visibility.
171 public static final String IMG_OBJS_INNER_INTERFACE_DEFAULT= JavaPluginImages.IMG_OBJS_INNER_INTERFACE_DEFAULT;
174 * Key to access the shared image or image descriptor for a protected inner interface.
177 public static final String IMG_OBJS_INNER_INTERFACE_PROTECTED= JavaPluginImages.IMG_OBJS_INNER_INTERFACE_PROTECTED;
180 * Key to access the shared image or image descriptor for a private inner interface.
183 public static final String IMG_OBJS_INNER_INTERFACE_PRIVATE= JavaPluginImages.IMG_OBJS_INNER_INTERFACE_PRIVATE;
185 /** Key to access the shared image or image descriptor for a package declaration. */
186 public static final String IMG_OBJS_PACKDECL= JavaPluginImages.IMG_OBJS_PACKDECL;
188 /** Key to access the shared image or image descriptor for an import container. */
189 public static final String IMG_OBJS_IMPCONT= JavaPluginImages.IMG_OBJS_IMPCONT;
191 /** Key to access the shared image or image descriptor for an import statement. */
192 public static final String IMG_OBJS_IMPDECL= JavaPluginImages.IMG_OBJS_IMPDECL;
194 /** Key to access the shared image or image descriptor for a public member. */
195 public static final String IMG_OBJS_PUBLIC= JavaPluginImages.IMG_MISC_PUBLIC;
197 /** Key to access the shared image or image descriptor for a protected member. */
198 public static final String IMG_OBJS_PROTECTED= JavaPluginImages.IMG_MISC_PROTECTED;
200 /** Key to access the shared image or image descriptor for a private member. */
201 public static final String IMG_OBJS_PRIVATE= JavaPluginImages.IMG_MISC_PRIVATE;
203 /** Key to access the shared image or image descriptor for class members with default visibility. */
204 public static final String IMG_OBJS_DEFAULT= JavaPluginImages.IMG_MISC_DEFAULT;
207 * Key to access the shared image or image descriptor for a public field.
210 public static final String IMG_FIELD_PUBLIC= JavaPluginImages.IMG_FIELD_PUBLIC;
213 * Key to access the shared image or image descriptor for a protected field.
216 public static final String IMG_FIELD_PROTECTED= JavaPluginImages.IMG_FIELD_PROTECTED;
219 * Key to access the shared image or image descriptor for a private field.
222 public static final String IMG_FIELD_PRIVATE= JavaPluginImages.IMG_FIELD_PRIVATE;
225 * Key to access the shared image or image descriptor for a field with default visibility.
228 public static final String IMG_FIELD_DEFAULT= JavaPluginImages.IMG_FIELD_DEFAULT;
231 * Key to access the shared image or image descriptor for a local variable.
234 public static final String IMG_OBJS_LOCAL_VARIABLE= JavaPluginImages.IMG_OBJS_LOCAL_VARIABLE;
237 * Key to access the shared image or image descriptor for a enum type.
240 public static final String IMG_OBJS_ENUM= JavaPluginImages.IMG_OBJS_ENUM;
243 * Key to access the shared image or image descriptor for a enum type
244 * with default visibility.
247 public static final String IMG_OBJS_ENUM_DEFAULT= JavaPluginImages.IMG_OBJS_ENUM_DEFAULT;
250 * Key to access the shared image or image descriptor for a enum type
251 * with protected visibility.
254 public static final String IMG_OBJS_ENUM_PROTECTED= JavaPluginImages.IMG_OBJS_ENUM_PROTECTED;
257 * Key to access the shared image or image descriptor for a enum type
258 * with private visibility.
261 public static final String IMG_OBJS_ENUM_PRIVATE= JavaPluginImages.IMG_OBJS_ENUM_PRIVATE;
264 * Key to access the shared image or image descriptor for a annotation type.
267 public static final String IMG_OBJS_ANNOTATION= JavaPluginImages.IMG_OBJS_ANNOTATION;
270 * Key to access the shared image or image descriptor for a annotation type
271 * with default visibility.
274 public static final String IMG_OBJS_ANNOTATION_DEFAULT= JavaPluginImages.IMG_OBJS_ANNOTATION_DEFAULT;
277 * Key to access the shared image or image descriptor for a annotation type
278 * with protected visibility.
281 public static final String IMG_OBJS_ANNOTATION_PROTECTED= JavaPluginImages.IMG_OBJS_ANNOTATION_PROTECTED;
284 * Key to access the shared image or image descriptor for a annotation type
285 * with private visibility.
288 public static final String IMG_OBJS_ANNOTATION_PRIVATE= JavaPluginImages.IMG_OBJS_ANNOTATION_PRIVATE;
291 * Key to access the shared image or image descriptor for javadoc tags.
294 public static final String IMG_OBJS_JAVADOCTAG= JavaPluginImages.IMG_OBJS_JAVADOCTAG;
297 * Returns the shared image managed under the given key.
299 * Note that clients <b>must not</b> dispose the image returned by this method.
302 * @param key the image key; one of the <code>IMG_OBJS_* </code> constants
303 * @return the shared image managed under the given key, or <code>null</code>
306 public Image getImage(String key);
309 * Returns the image descriptor managed under the given key.
311 * @param key the image key; one of the <code>IMG_OBJS_* </code> constants
312 * @return the image descriptor managed under the given key, or <code>null</code>
315 public ImageDescriptor getImageDescriptor(String key);