1 11 package org.eclipse.ui.internal; 12 13 import org.eclipse.jface.resource.ImageDescriptor; 14 import org.eclipse.swt.graphics.Image; 15 import org.eclipse.ui.ISharedImages; 16 17 20 public class SharedImages implements ISharedImages { 21 26 public Image getImage(String symbolicName) { 27 Image image = WorkbenchImages.getImage(symbolicName); 28 if (image != null) { 29 return image; 30 } 31 32 ImageDescriptor desc = WorkbenchImages.getImageDescriptor(symbolicName); 34 if (desc != null) { 35 WorkbenchImages.getImageRegistry().put(symbolicName, desc); 36 return WorkbenchImages.getImageRegistry().get(symbolicName); 37 } 38 return null; 39 } 40 41 46 public ImageDescriptor getImageDescriptor(String symbolicName) { 47 return WorkbenchImages.getImageDescriptor(symbolicName); 48 } 49 } 50 | Popular Tags |