com.aelitis.azureus.ui.swt.skin
Class SWTSkinPropertiesParamImpl

java.lang.Object
  extended by com.aelitis.azureus.ui.swt.skin.SWTSkinPropertiesParamImpl
All Implemented Interfaces:
SkinProperties, SWTSkinProperties, SWTSkinPropertiesParam

public class SWTSkinPropertiesParamImpl
extends java.lang.Object
implements SWTSkinPropertiesParam

SWTSkinProperties delegator that always passes a set of parameters to string requests.

Author:
TuxPaper

Constructor Summary
SWTSkinPropertiesParamImpl(SWTSkinProperties properties, java.lang.String[] sCloneParams)
           
 
Method Summary
 void addProperty(java.lang.String name, java.lang.String value)
          Add a property key/value pair to the list
 void addResourceBundle(java.util.ResourceBundle subBundle, java.lang.String skinPath)
           
 void addResourceBundle(java.util.ResourceBundle subBundle, java.lang.String skinPath, java.lang.ClassLoader loader)
           
 void clearCache()
           
 boolean getBooleanValue(java.lang.String name, boolean def)
           
 java.lang.ClassLoader getClassLoader()
           
 org.eclipse.swt.graphics.Color getColor(java.lang.String name)
          Retrieve a color property in as a SWT Color
 org.eclipse.swt.graphics.Color getColor(java.lang.String name, org.eclipse.swt.graphics.Color def)
           
 int[] getColorValue(java.lang.String name)
           
 SWTColorWithAlpha getColorWithAlpha(java.lang.String sID)
           
 int getEmHeightPX()
           
 int getIntValue(java.lang.String name, int def)
          Retrieve a property's int value
 java.lang.String[] getParamValues()
           
 int getPxValue(java.lang.String name, int def)
          Get value in px, adjusted for dpi
 java.lang.String getReferenceID(java.lang.String name)
           
 java.lang.String[] getStringArray(java.lang.String name)
           
 java.lang.String[] getStringArray(java.lang.String name, java.lang.String[] params)
           
 java.lang.String getStringValue(java.lang.String name)
          Retrieve a string value
 java.lang.String getStringValue(java.lang.String name, java.lang.String def)
           
 java.lang.String getStringValue(java.lang.String name, java.lang.String[] params)
           
 java.lang.String getStringValue(java.lang.String name, java.lang.String[] params, java.lang.String def)
           
 boolean hasKey(java.lang.String name)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SWTSkinPropertiesParamImpl

public SWTSkinPropertiesParamImpl(SWTSkinProperties properties,
                                  java.lang.String[] sCloneParams)
Parameters:
properties -
Method Detail

addProperty

public void addProperty(java.lang.String name,
                        java.lang.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

getColor

public org.eclipse.swt.graphics.Color getColor(java.lang.String name)
Description copied from interface: SWTSkinProperties
Retrieve a color property in as a SWT Color

Specified by:
getColor in interface SWTSkinProperties
Parameters:
name - Property Name
Returns:
a Color, or null

getColorWithAlpha

public SWTColorWithAlpha getColorWithAlpha(java.lang.String sID)
Specified by:
getColorWithAlpha in interface SWTSkinProperties
Returns:

getColorValue

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

getIntValue

public int getIntValue(java.lang.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

getStringArray

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

getStringArray

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

getStringValue

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

getStringValue

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

getStringValue

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

getStringValue

public java.lang.String getStringValue(java.lang.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

getBooleanValue

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

getParamValues

public java.lang.String[] getParamValues()
Specified by:
getParamValues in interface SWTSkinPropertiesParam
Returns:

clearCache

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

hasKey

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

getColor

public org.eclipse.swt.graphics.Color getColor(java.lang.String name,
                                               org.eclipse.swt.graphics.Color def)
Specified by:
getColor in interface SWTSkinProperties

getEmHeightPX

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

getPxValue

public int getPxValue(java.lang.String name,
                      int def)
Description copied from interface: SWTSkinProperties
Get value in px, adjusted for dpi

Specified by:
getPxValue in interface SWTSkinProperties

getReferenceID

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

addResourceBundle

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

addResourceBundle

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

getClassLoader

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