com.aelitis.azureus.ui.skin
Class SkinPropertiesImpl

java.lang.Object
  extended by com.aelitis.azureus.ui.skin.SkinPropertiesImpl
All Implemented Interfaces:
SkinProperties
Direct Known Subclasses:
SWTSkinPropertiesImpl

public class SkinPropertiesImpl
extends Object
implements SkinProperties

Implementation of SkinProperties using a IntegratedResourceBundle loaded from hard coded paths.

Three level lookup of keys:

  • (plugin) skin property file
  • defaults property file
  • Azureus MessageText class
    Additionally, checks each for platform specific keys.


    Values containing "{*}" are replaced with a lookup of *

    Author:
    TuxPaper

    Field Summary
    static String PATH_SKIN_DEFS
               
     
    Constructor Summary
    SkinPropertiesImpl()
               
    SkinPropertiesImpl(ClassLoader classLoader, String skinPath, String mainSkinFile)
               
     
    Method Summary
     void addProperty(String name, String value)
              Add a property key/value pair to the list
     void addResourceBundle(ResourceBundle subBundle, String skinPath)
               
     void addResourceBundle(ResourceBundle subBundle, String skinPath, ClassLoader loader)
               
     void clearCache()
               
     boolean getBooleanValue(String name, boolean def)
               
     ClassLoader getClassLoader()
               
     int[] getColorValue(String name)
               
     int getEmHeightPX()
               
     int getIntValue(String name, int def)
              Retrieve a property's int value
     String getReferenceID(String name)
               
     String[] getStringArray(String name)
               
     String[] getStringArray(String name, String[] params)
               
     String getStringValue(String name)
              Retrieve a string value
     String getStringValue(String name, String def)
               
     String getStringValue(String name, String[] params)
               
     String getStringValue(String name, String[] params, String def)
               
    protected  String getValue(String name, String[] params)
               
     boolean hasKey(String name)
               
    protected  void setEmHeightPX(int fontHeightInPX)
               
     
    Methods inherited from class java.lang.Object
    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
     

    Field Detail

    PATH_SKIN_DEFS

    public static final String PATH_SKIN_DEFS
    See Also:
    Constant Field Values
    Constructor Detail

    SkinPropertiesImpl

    public SkinPropertiesImpl()

    SkinPropertiesImpl

    public SkinPropertiesImpl(ClassLoader classLoader,
                              String skinPath,
                              String mainSkinFile)
    Method Detail

    addResourceBundle

    public void addResourceBundle(ResourceBundle subBundle,
                                  String skinPath)
    Specified by:
    addResourceBundle in interface SkinProperties
    skinPath - TODO

    addResourceBundle

    public void addResourceBundle(ResourceBundle subBundle,
                                  String skinPath,
                                  ClassLoader loader)
    Specified by:
    addResourceBundle in interface SkinProperties

    addProperty

    public void addProperty(String name,
                            String value)
    Description copied from interface: SkinProperties
    Add a property key/value pair to the list

    Specified by:
    addProperty in interface SkinProperties
    Parameters:
    name - Name of Property
    value - Value of Property

    hasKey

    public boolean hasKey(String name)
    Specified by:
    hasKey in interface SkinProperties
    Returns:

    getReferenceID

    public String getReferenceID(String name)
    Specified by:
    getReferenceID in interface SkinProperties
    Returns:

    getValue

    protected String getValue(String name,
                              String[] params)

    getIntValue

    public int getIntValue(String name,
                           int def)
    Description copied from interface: SkinProperties
    Retrieve a property's int value

    Specified by:
    getIntValue in interface SkinProperties
    Parameters:
    name - Name of property
    def - Default value if property not found
    Returns:
    value

    getColorValue

    public int[] getColorValue(String name)
    Specified by:
    getColorValue in interface SkinProperties

    getStringValue

    public String getStringValue(String name)
    Description copied from interface: SkinProperties
    Retrieve a string value

    Specified by:
    getStringValue in interface SkinProperties
    Parameters:
    name - Name of property
    Returns:
    the String value, or null if not found

    getStringValue

    public String getStringValue(String name,
                                 String def)
    Specified by:
    getStringValue in interface SkinProperties

    getStringArray

    public String[] getStringArray(String name)
    Specified by:
    getStringArray in interface SkinProperties

    getStringArray

    public String[] getStringArray(String name,
                                   String[] params)
    Specified by:
    getStringArray in interface SkinProperties

    getStringValue

    public String getStringValue(String name,
                                 String[] params)
    Specified by:
    getStringValue in interface SkinProperties

    getStringValue

    public String getStringValue(String name,
                                 String[] params,
                                 String def)
    Specified by:
    getStringValue in interface SkinProperties

    getBooleanValue

    public boolean getBooleanValue(String name,
                                   boolean def)
    Specified by:
    getBooleanValue in interface SkinProperties

    clearCache

    public void clearCache()
    Specified by:
    clearCache in interface SkinProperties

    getClassLoader

    public ClassLoader getClassLoader()
    Specified by:
    getClassLoader in interface SkinProperties
    Returns:

    setEmHeightPX

    protected void setEmHeightPX(int fontHeightInPX)

    getEmHeightPX

    public int getEmHeightPX()
    Specified by:
    getEmHeightPX in interface SkinProperties
    Returns: