1 /*** 2 * Created on Oct 17, 2005, Copyright UC Regents 3 */ 4 package org.telscenter.pas.steps.quickEditors.icons; 5 6 import java.awt.Image; 7 import java.net.URL; 8 9 import javax.swing.ImageIcon; 10 11 /*** 12 * @author anthonyperritano 13 * @author turadg 14 */ 15 public class ToolIconProvider { 16 17 /*** 18 * non-instantiable 19 */ 20 private ToolIconProvider() { 21 } 22 23 public static Image getImage(String filename) { 24 URL imageUrl = ToolIconProvider.class.getResource(filename); 25 return java.awt.Toolkit.getDefaultToolkit().getImage(imageUrl); 26 } 27 28 public static ImageIcon getImageIcon(String filename) { 29 URL imageUrl = ToolIconProvider.class.getResource(filename); 30 return new ImageIcon(imageUrl); 31 } 32 }