01: /*
02: * IzPack - Copyright 2001-2008 Julien Ponge, All Rights Reserved.
03: *
04: * http://izpack.org/
05: * http://izpack.codehaus.org/
06: *
07: * Licensed under the Apache License, Version 2.0 (the "License");
08: * you may not use this file except in compliance with the License.
09: * You may obtain a copy of the License at
10: *
11: * http://www.apache.org/licenses/LICENSE-2.0
12: *
13: * Unless required by applicable law or agreed to in writing, software
14: * distributed under the License is distributed on an "AS IS" BASIS,
15: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16: * See the License for the specific language governing permissions and
17: * limitations under the License.
18: */
19:
20: package com.izforge.izpack.gui;
21:
22: import java.util.TreeMap;
23:
24: import javax.swing.ImageIcon;
25:
26: /**
27: * The icons database class.
28: *
29: * @author Julien Ponge October 27, 2002
30: */
31: public class IconsDatabase extends TreeMap {
32:
33: private static final long serialVersionUID = 3257567287145083446L;
34:
35: /** The constructor. */
36: public IconsDatabase() {
37: super ();
38: }
39:
40: /**
41: * Convenience method to retrieve an element.
42: *
43: * @param key The icon key.
44: * @return The icon as an ImageIcon object.
45: */
46: public ImageIcon getImageIcon(String key) {
47: return (ImageIcon) get(key);
48: }
49: }
|