de.fesenmeyer.dbnormalizer.gui
Class IconManager

java.lang.Object
  extended by de.fesenmeyer.dbnormalizer.gui.IconManager

public final class IconManager
extends Object

Author:
DF

Field Summary
static String COLUMN_ICON
           
static String DBNORMALIZER_ICON
           
static String FOLDER_ICON
           
(package private)  HashMap<String,ImageIcon> imageIcons
           
private static IconManager INSTANCE
           
private static DBNormalizerLogger logger
           
static String TABLE_ICON
           
 
Constructor Summary
private IconManager()
           
 
Method Summary
private  ImageIcon createImageIcon(String path, String description)
          helper method to create an image icon.
 ImageIcon getIcon(String name)
          gets the image icon with the given name.
 Image getImage(String name)
           
static IconManager getInstance()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

private static DBNormalizerLogger logger

DBNORMALIZER_ICON

public static final String DBNORMALIZER_ICON
See Also:
Constant Field Values

TABLE_ICON

public static final String TABLE_ICON
See Also:
Constant Field Values

COLUMN_ICON

public static final String COLUMN_ICON
See Also:
Constant Field Values

FOLDER_ICON

public static final String FOLDER_ICON
See Also:
Constant Field Values

INSTANCE

private static IconManager INSTANCE

imageIcons

HashMap<String,ImageIcon> imageIcons
Constructor Detail

IconManager

private IconManager()
Method Detail

getInstance

public static IconManager getInstance()

getIcon

public ImageIcon getIcon(String name)
gets the image icon with the given name.

Parameters:
name - one of the constants defined in this class, for example DBNORMALIZER_ICON.
Returns:
returns the icon, if it could be created without error; returns null, otherwise.

getImage

public Image getImage(String name)

createImageIcon

private ImageIcon createImageIcon(String path,
                                  String description)
helper method to create an image icon.

Parameters:
path - the path of the icon (relative to the icons folder).
description - the description of the icon
Returns:
returns the image icon, if no error occurs; returns null, otherwise.