* Christopher Lenz - initial implementation based on the internal Eclipse
* class of the same name, defined in multiple packages
*
- * $Id: ImageDescriptorRegistry.java,v 1.1 2004-09-02 18:26:28 jsurfer Exp $
+ * $Id: ImageDescriptorRegistry.java,v 1.2 2006-10-21 23:13:53 pombredanne Exp $
*/
package net.sourceforge.phpeclipse.ui.views.util;
* display, respectively.
*/
public ImageDescriptorRegistry() {
- this(Display.getCurrent() != null ?
- Display.getCurrent() : Display.getDefault());
+ this(Display.getCurrent() != null ? Display.getCurrent() : Display
+ .getDefault());
}
/**
* Creates a new image descriptor registry for the given display. All images
* managed by this registry will be disposed when the display gets disposed.
*
- * @param display the display the images managed by this registry are
- * allocated for
+ * @param display
+ * the display the images managed by this registry are allocated
+ * for
*/
public ImageDescriptorRegistry(Display display) {
display.disposeExec(new Runnable() {
public void run() {
dispose();
- }
+ }
});
}
-
+
/**
* Returns the image assiciated with the given image descriptor.
*
- * @param descriptor the image descriptor for which the registry manages an
- * image
+ * @param descriptor
+ * the image descriptor for which the registry manages an image
* @return the image associated with the image descriptor or <tt>null</tt>
* if the image descriptor can't create the requested image.
*/
/**
* Disposes all images managed by this registry.
- */
+ */
public void dispose() {
- for (Iterator i = registry.values().iterator(); i.hasNext(); ) {
+ for (Iterator i = registry.values().iterator(); i.hasNext();) {
((Image) i.next()).dispose();
}
registry.clear();
}
-
+
}