org.jets3t.gui.skins
Class SkinUtils

java.lang.Object
  extended by org.jets3t.gui.skins.SkinUtils

public class SkinUtils
extends java.lang.Object

Utility methods for loading skin resources from settings in skin properties.


Constructor Summary
SkinUtils()
           
 
Method Summary
 java.awt.Color loadColor(java.util.Properties skinProperties, java.lang.String colorPropertyName)
          Loads a skin property setting for a color.
 javax.swing.ImageIcon loadIcon(java.util.Properties skinProperties, java.lang.String iconPathPropertyName)
          Loads a skin property setting for an icon image.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SkinUtils

public SkinUtils()
Method Detail

loadColor

public java.awt.Color loadColor(java.util.Properties skinProperties,
                                java.lang.String colorPropertyName)
Loads a skin property setting for a color.

Parameters:
skinProperties - contains skin property settings.
colorPropertyName - the name of the property expected to contain a color value.
Returns:
the parsed color value if the given property is available and valid, null otherwise.

loadIcon

public javax.swing.ImageIcon loadIcon(java.util.Properties skinProperties,
                                      java.lang.String iconPathPropertyName)
Loads a skin property setting for an icon image.

Parameters:
skinProperties - contains skin property settings.
iconPathPropertyName - the name of the property expected to contain the path to an icon image resource.
Returns:
an icon image resource when the path property is available and it points to a valid image resource, null otherwise.