001/* 002 * IzPack - Copyright 2001-2005 Julien Ponge, All Rights Reserved. 003 * 004 * http://www.izforge.com/izpack/ 005 * http://developer.berlios.de/projects/izpack/ 006 * 007 * Licensed under the Apache License, Version 2.0 (the "License"); 008 * you may not use this file except in compliance with the License. 009 * You may obtain a copy of the License at 010 * 011 * http://www.apache.org/licenses/LICENSE-2.0 012 * 013 * Unless required by applicable law or agreed to in writing, software 014 * distributed under the License is distributed on an "AS IS" BASIS, 015 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 016 * See the License for the specific language governing permissions and 017 * limitations under the License. 018 */ 019 020package com.izforge.izpack.gui; 021 022import java.util.TreeMap; 023 024import javax.swing.ImageIcon; 025 026/** 027 * The icons database class. 028 * 029 * @author Julien Ponge October 27, 2002 030 */ 031public class IconsDatabase extends TreeMap 032{ 033 034 private static final long serialVersionUID = 3257567287145083446L; 035 036 /** The constructor. */ 037 public IconsDatabase() 038 { 039 super(); 040 } 041 042 /** 043 * Convenience method to retrieve an element. 044 * 045 * @param key The icon key. 046 * @return The icon as an ImageIcon object. 047 */ 048 public ImageIcon getImageIcon(String key) 049 { 050 return (ImageIcon) get(key); 051 } 052}