org.tentackle.plaf
Interface IconProvider

All Known Implementing Classes:
TentackleIconProvider

public interface IconProvider

Provides icons and images depending on the look-and-feel.

Swing does not provide an abstraction layer for loading icons according to the current look and feel. As a consequence, applications either must stick to a single look and feel or will break the icon theme if the user selects another look and feel. An IconProvider implements such an abstraction as it loads icons (for a single namespace, aka "realm") according to the current LookAndFeel and the icon's name.

Author:
harald

Method Summary
 String getRealm()
          Gets the namespace (realm) this icon provider is responsible for.
 ImageIcon loadImageIcon(LookAndFeel plaf, String name)
          Loads an image icon for the given look and feel.
 

Method Detail

getRealm

String getRealm()
Gets the namespace (realm) this icon provider is responsible for.

Returns:
the realm

loadImageIcon

ImageIcon loadImageIcon(LookAndFeel plaf,
                        String name)
                        throws MissingResourceException
Loads an image icon for the given look and feel. This allows each look and feel to provide its own icon set. Furthermore, applications can add their own realm-provider (see PlafGlobal)

Parameters:
plaf - the look and feel
name - the icon's name (without extension like gif or png!)
Returns:
the loaded image icon
Throws:
MissingResourceException - if no such icon


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