org.tentackle.plaf
Class TentackleIconProvider

java.lang.Object
  extended by org.tentackle.plaf.TentackleIconProvider
All Implemented Interfaces:
IconProvider

public class TentackleIconProvider
extends Object
implements IconProvider

Default implementation of an IconProvider. This provider loads the icons for the "plaf"-realm of all supported plafs.

Author:
harald

Constructor Summary
TentackleIconProvider()
          Creates a new TentackleIconProvider
 
Method Summary
 String getRealm()
          Gets the namespace for this icon provider.
 ImageIcon loadImageIcon(LookAndFeel plaf, String name)
          Loads the icon.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TentackleIconProvider

public TentackleIconProvider()
Creates a new TentackleIconProvider

Method Detail

getRealm

public String getRealm()
Gets the namespace for this icon provider.

Specified by:
getRealm in interface IconProvider
Returns:
the namespace for the plaf-space

loadImageIcon

public ImageIcon loadImageIcon(LookAndFeel plaf,
                               String name)
                        throws MissingResourceException
Loads the icon. All plaf-icons by default are PNG files. If there is no PNG file, a GIF-file is tried. They are located in "org/tentackle/plaf//icons". If the look and feel is not a TentackleLookAndFeel the icons are loaded from a fallback set in "org/tentackle/plaf/icons".

Specified by:
loadImageIcon in interface IconProvider
Parameters:
plaf - the plaf
name - the name if the icon
Returns:
the icon
Throws:
MissingResourceException - if no such icon


Copyright © 2001-2008 Harald Krake, Bergstr. 48, 78098 Triberg, Germany, harald@krake.de