Package com.biglybt.ui.swt.skin
Class SWTSkinPropertiesClone
java.lang.Object
com.biglybt.ui.swt.skin.SWTSkinPropertiesClone
- All Implemented Interfaces:
SkinProperties
,SWTSkinProperties
,SWTSkinPropertiesParam
Simple extension of SWTSkinProperties that first checks the original
cloning id before checking the keys that it's cloning.
Cloned Skin Objects will be calling this class with a Config ID of "" plus whatever property name string they add on.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final boolean
private static final String
private final SWTSkinProperties
private final String
private final String[]
private final String
-
Constructor Summary
ConstructorsConstructorDescriptionSWTSkinPropertiesClone
(SWTSkinProperties properties, String sCloneConfigID, String[] sCloneParams) Initialize -
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) private void
void
boolean
getBooleanValue
(String name, boolean def) org.eclipse.swt.graphics.Color
Retrieve a color property in as a SWT Colororg.eclipse.swt.graphics.Color
int[]
getColorValue
(String name) getColorWithAlpha
(String name) int
int
getIntValue
(String name, int def) Retrieve a property's int valueString[]
int
getPxValue
(String name, int def) Get value in px, adjusted for dpigetReferenceID
(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) boolean
-
Field Details
-
IGNORE_NAME
- See Also:
-
DEBUG
private static final boolean DEBUG- See Also:
-
properties
-
sCloneConfigID
-
sTemplateConfigID
-
sCloneParams
-
-
Constructor Details
-
SWTSkinPropertiesClone
public SWTSkinPropertiesClone(SWTSkinProperties properties, String sCloneConfigID, String[] sCloneParams) Initialize- Parameters:
properties
- Where to read properties fromsCloneConfigID
- The config key that told us to clone something
-
-
Method Details
-
checkName
- Parameters:
name
-
-
getSkinID
- Specified by:
getSkinID
in interfaceSWTSkinProperties
-
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
-
getColorWithAlpha
- Specified by:
getColorWithAlpha
in interfaceSWTSkinProperties
- Parameters:
name
-- Returns:
-
getColor
Description copied from interface:SWTSkinProperties
Retrieve a color property in as a SWT Color- Specified by:
getColor
in interfaceSWTSkinProperties
- Parameters:
name
- Property Name- Returns:
- a Color, or null
-
getColorValue
- Specified by:
getColorValue
in interfaceSkinProperties
-
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
-
getStringArray
- Specified by:
getStringArray
in interfaceSkinProperties
-
getStringValue
- Specified by:
getStringValue
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
-
getStringArray
- Specified by:
getStringArray
in interfaceSkinProperties
-
getStringValue
- Specified by:
getStringValue
in interfaceSkinProperties
-
getStringValue
- Specified by:
getStringValue
in interfaceSkinProperties
-
getOriginalProperties
-
getParamValues
- Specified by:
getParamValues
in interfaceSWTSkinPropertiesParam
- Returns:
-
getBooleanValue
- Specified by:
getBooleanValue
in interfaceSkinProperties
-
clearCache
public void clearCache()- Specified by:
clearCache
in interfaceSkinProperties
-
hasKey
- Specified by:
hasKey
in interfaceSkinProperties
- Parameters:
name
-- Returns:
-
getColor
- Specified by:
getColor
in interfaceSWTSkinProperties
-
getEmHeightPX
public int getEmHeightPX()- Specified by:
getEmHeightPX
in interfaceSkinProperties
- Returns:
-
getPxValue
Description copied from interface:SWTSkinProperties
Get value in px, adjusted for dpi- Specified by:
getPxValue
in interfaceSWTSkinProperties
-
getReferenceID
- Specified by:
getReferenceID
in interfaceSkinProperties
- Parameters:
name
-- Returns:
-
addResourceBundle
- Specified by:
addResourceBundle
in interfaceSkinProperties
- Parameters:
subBundle
-skinPath
- TODO
-
addResourceBundle
- Specified by:
addResourceBundle
in interfaceSkinProperties
- Parameters:
subBundle
-skinPath
-loader
-
-
getClassLoader
- Specified by:
getClassLoader
in interfaceSkinProperties
- Returns:
-