01: /**
02: *
03: * Bonita
04: * Copyright (C) 1999 Bull S.A.
05: * Bull 68 route de versailles 78434 Louveciennes Cedex France
06: * Further information: bonita@objectweb.org
07: *
08: * This library is free software; you can redistribute it and/or
09: * modify it under the terms of the GNU Lesser General Public
10: * License as published by the Free Software Foundation; either
11: * version 2.1 of the License, or any later version.
12: *
13: * This library is distributed in the hope that it will be useful,
14: * but WITHOUT ANY WARRANTY; without even the implied warranty of
15: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16: * Lesser General Public License for more details.
17: *
18: * You should have received a copy of the GNU Lesser General Public
19: * License along with this library; if not, write to the Free Software
20: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
21: * USA
22: *
23: *
24: --------------------------------------------------------------------------
25: * $Id: IconManager.java,v 1.1 2004/07/30 14:57:57 mvaldes Exp $
26: *
27: --------------------------------------------------------------------------
28: */package hero.client.grapheditor;
29:
30: import java.awt.Image;
31: import java.awt.Toolkit;
32: import java.net.URL;
33:
34: public class IconManager {
35:
36: public static Image getIcon(String name) {
37: URL iconUrl = Thread.currentThread().getContextClassLoader()
38: .getResource(Frame.imageBase + name);
39: return Toolkit.getDefaultToolkit().getImage(iconUrl);
40: }
41:
42: public static URL getIconUrl(String name) {
43: return Thread.currentThread().getContextClassLoader()
44: .getResource(Frame.imageBase + name);
45: }
46:
47: public static String[] listAvailablesIcons() {
48: return new String[] { "publiee-icon.png", "classic-icon.png",
49: "waiting-icon.png", "locked-red-icon.png",
50: "locked-yellow-icon.png", "creation-icon.png",
51: "ok-icon.png", "archived-icon.png" };
52: }
53:
54: public static String getDefaultIcon() {
55: return "classic-icon.png";
56: }
57:
58: }
|