1 /***
2 * Created on Jun 7, 2005, Copyright UC Regents
3 */
4 package org.telscenter.pas.ui.icons;
5
6 import java.awt.Image;
7 import java.net.URL;
8 import java.util.MissingResourceException;
9
10 /***
11 * @author turadg
12 */
13 public class PasCommonIconProvider {
14
15 public static Image getImage(String filename) {
16 URL imageUrl = PasCommonIconProvider.class.getResource(filename);
17 if (imageUrl == null)
18 throw new MissingResourceException(filename + " not found by "+PasCommonIconProvider.class, PasCommonIconProvider.class.toString(), filename);
19 return java.awt.Toolkit.getDefaultToolkit().getImage(imageUrl);
20 }
21
22 }