org.xnap.commons.gui.util
Class IconHelper

java.lang.Object
  extended by org.xnap.commons.gui.util.IconHelper

public class IconHelper
extends Object

Author:
Steffen Pingel

Nested Class Summary
static class IconHelper.EmptyIcon
          Provides an empty, transparent icon.
 
Field Summary
static ClassLoader classLoader
           
static String DEFAULT_ICON_PATH
          The default path to search for icons.
 
Constructor Summary
IconHelper()
           
 
Method Summary
static Icon getActionIcon(String filename)
           
static List<? extends Image> getApplicationIcons(String filename)
           
static Icon getButtonIcon(String filename)
           
static Icon getEmptyIcon(int size)
           
static Icon getIcon(String filename, int size)
           
static Icon getIcon(String filename, int size, boolean createEmptyIcon)
           
static ImageIcon getImage(int size, String filename)
           
static ImageIcon getImage(String filename)
          Searches iconPath for filename.
static ImageIcon getImageIcon(URL url)
           
static URL getImageURL(int size, String filename)
           
static Icon getListIcon(String filename)
           
static Icon getMenuIcon(String filename)
           
static Icon getStatusBarIcon(String filename)
           
static ImageIcon getSystemTrayIcon(String filename)
           
static Icon getTableIcon(String filename)
           
static Icon getTabTitleIcon(String filename)
           
static Icon getTitleIcon(String filename)
           
static Icon getToolBarIcon(String filename)
           
static Icon getTreeIcon(String filename)
           
static void setIconPath(String iconPath)
           
static void setSubDirectories(int[] subDirectories)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_ICON_PATH

public static final String DEFAULT_ICON_PATH
The default path to search for icons.

See Also:
Constant Field Values

classLoader

public static ClassLoader classLoader
Constructor Detail

IconHelper

public IconHelper()
Method Detail

getIcon

public static final Icon getIcon(String filename,
                                 int size,
                                 boolean createEmptyIcon)

getIcon

public static final Icon getIcon(String filename,
                                 int size)
Returns:
never returns null
See Also:
getIcon(String, int, boolean)

getImage

public static final ImageIcon getImage(String filename)
Searches iconPath for filename.

Returns:
null, if filename does not exists

getImage

public static final ImageIcon getImage(int size,
                                       String filename)

getImageURL

public static final URL getImageURL(int size,
                                    String filename)

getImageIcon

public static final ImageIcon getImageIcon(URL url)

getEmptyIcon

public static final Icon getEmptyIcon(int size)

getApplicationIcons

public static final List<? extends Image> getApplicationIcons(String filename)

getListIcon

public static final Icon getListIcon(String filename)

getButtonIcon

public static final Icon getButtonIcon(String filename)

getMenuIcon

public static final Icon getMenuIcon(String filename)

getStatusBarIcon

public static final Icon getStatusBarIcon(String filename)

getSystemTrayIcon

public static final ImageIcon getSystemTrayIcon(String filename)

getTableIcon

public static final Icon getTableIcon(String filename)

getTabTitleIcon

public static final Icon getTabTitleIcon(String filename)

getTreeIcon

public static final Icon getTreeIcon(String filename)

getToolBarIcon

public static final Icon getToolBarIcon(String filename)

getTitleIcon

public static final Icon getTitleIcon(String filename)

setIconPath

public static void setIconPath(String iconPath)

setSubDirectories

public static void setSubDirectories(int[] subDirectories)

getActionIcon

public static Icon getActionIcon(String filename)


Copyright © 2004-2007 XNap Commons Team. All Rights Reserved.