Package com.biglybt.ui.skin
Class SkinPropertiesImpl
java.lang.Object
com.biglybt.ui.skin.SkinPropertiesImpl
- All Implemented Interfaces:
SkinProperties
- Direct Known Subclasses:
SWTSkinPropertiesImpl
Implementation of SkinProperties using a IntegratedResourceBundle loaded from
hard coded paths.
(plugin) skin property file
defaults property file
the client's MessageText class
Additionally, checks each for platform specific keys.
Three level lookup of keys:
Additionally, checks each for platform specific keys.
Values containing "{*}" are replaced with a lookup of *
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ClassLoader
private static final boolean
private int
private static final String
private static final Pattern
private static final Pattern
static final String
private final IntegratedResourceBundle
private final String
-
Constructor Summary
ConstructorsConstructorDescriptionSkinPropertiesImpl
(ClassLoader classLoader, String skinPath, String mainSkinFile) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addProperty
(String name, String value) Add a property key/value pair to the listvoid
addResourceBundle
(ResourceBundle subBundle, String skinPath) void
addResourceBundle
(ResourceBundle subBundle, String skinPath, ClassLoader loader) void
boolean
getBooleanValue
(String name, boolean def) int[]
getColorValue
(String name) int
int
getIntValue
(String name, int def) Retrieve a property's int valuegetReferenceID
(String name) String[]
getStringArray
(String name) String[]
getStringArray
(String name, String[] params) getStringValue
(String name) Retrieve a string valuegetStringValue
(String name, String def) getStringValue
(String name, String[] params) getStringValue
(String name, String[] params, String def) protected String
private String
boolean
protected void
setEmHeightPX
(int fontHeightInPX)
-
Field Details
-
DARK_MODE
private static final boolean DARK_MODE -
PATH_SKIN_DEFS
- See Also:
-
FILE_SKIN_DEFS
- See Also:
-
PAT_PARAM_ALPHA
-
PAT_PARAM_NUM
-
skin_id
-
rb
-
classLoader
-
emHeightPX
private int emHeightPX
-
-
Constructor Details
-
SkinPropertiesImpl
public SkinPropertiesImpl() -
SkinPropertiesImpl
-
-
Method Details
-
getSkinID
-
addResourceBundle
- Specified by:
addResourceBundle
in interfaceSkinProperties
- Parameters:
subBundle
-skinPath
- TODO
-
addResourceBundle
- Specified by:
addResourceBundle
in interfaceSkinProperties
- Parameters:
subBundle
-skinPath
-loader
-
-
addProperty
Description copied from interface:SkinProperties
Add a property key/value pair to the list- Specified by:
addProperty
in interfaceSkinProperties
- Parameters:
name
- Name of Propertyvalue
- Value of Property
-
hasKey
- Specified by:
hasKey
in interfaceSkinProperties
- Parameters:
name
-- Returns:
-
getReferenceID
- Specified by:
getReferenceID
in interfaceSkinProperties
- Parameters:
name
-- Returns:
-
getValue
-
getValue
-
getIntValue
Description copied from interface:SkinProperties
Retrieve a property's int value- Specified by:
getIntValue
in interfaceSkinProperties
- Parameters:
name
- Name of propertydef
- Default value if property not found- Returns:
- value
-
getColorValue
- Specified by:
getColorValue
in interfaceSkinProperties
-
getStringValue
Description copied from interface:SkinProperties
Retrieve a string value- Specified by:
getStringValue
in interfaceSkinProperties
- Parameters:
name
- Name of property- Returns:
- the String value, or null if not found
-
getStringValue
- Specified by:
getStringValue
in interfaceSkinProperties
-
getStringArray
- Specified by:
getStringArray
in interfaceSkinProperties
-
getStringArray
- Specified by:
getStringArray
in interfaceSkinProperties
-
getStringValue
- Specified by:
getStringValue
in interfaceSkinProperties
-
getStringValue
- Specified by:
getStringValue
in interfaceSkinProperties
-
getBooleanValue
- Specified by:
getBooleanValue
in interfaceSkinProperties
-
clearCache
public void clearCache()- Specified by:
clearCache
in interfaceSkinProperties
-
getClassLoader
- Specified by:
getClassLoader
in interfaceSkinProperties
- Returns:
-
setEmHeightPX
protected void setEmHeightPX(int fontHeightInPX) -
getEmHeightPX
public int getEmHeightPX()- Specified by:
getEmHeightPX
in interfaceSkinProperties
- Returns:
-