KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > izforge > izpack > gui > IconsDatabase


1 /*
2  * IzPack - Copyright 2001-2007 Julien Ponge, All Rights Reserved.
3  *
4  * http://www.izforge.com/izpack/
5  * http://developer.berlios.de/projects/izpack/
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * 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 JavaDoc;
23
24 import javax.swing.ImageIcon JavaDoc;
25
26 /**
27  * The icons database class.
28  *
29  * @author Julien Ponge October 27, 2002
30  */

31 public class IconsDatabase extends TreeMap JavaDoc
32 {
33
34     private static final long serialVersionUID = 3257567287145083446L;
35
36     /** The constructor. */
37     public IconsDatabase()
38     {
39         super();
40     }
41
42     /**
43      * Convenience method to retrieve an element.
44      *
45      * @param key The icon key.
46      * @return The icon as an ImageIcon object.
47      */

48     public ImageIcon JavaDoc getImageIcon(String JavaDoc key)
49     {
50         return (ImageIcon JavaDoc) get(key);
51     }
52 }
53
Popular Tags