BiTheme
This class represents a theme which consists of a css file
This class extends BiObject and therefore all methods and fields available for BiObject are also available for BiTheme .
Constructor
new BiTheme ( [ sName ] )
Parameters
| Name | Type | Optional | Default | Descripton |
sName | String | ![]() | The name of the theme |
Properties
| Name | Type | get | set | Descripton |
default | Boolean | ![]() | ![]() | Whether the theme is the default theme |
name | String | ![]() | The name of the theme |
Methods
| Name | Description |
addAppearance | Adds a state dependent appearance to the theme |
getAppearanceProperty | Returns a property value for the given appearance. |
getAppearanceStates | This returns the states that the appearance supports |
removeAppearance | Removes a state dependent appearance from the theme |
setAppearanceProperty | Sets a property value for a given appearance |
themeComponent | Abstract function to apply custom theming (requiring javascript) to a component. |
unthemeComponent | Abstract function used to remove all custom theming done by themeComponent function. |
Events
None.
Static Methods
None.
Static Fields
None.
Remarks
None.
Method Details
addAppearance
Adds a state dependent appearance to the theme
Syntax
object.addAppearance ( sAppearanceName,oStates ) Parameters
| Name | Type | Optional | Default | Descripton |
sAppearanceName | String | The name of the appearance | ||
oStates | String[] | The pseudo states that we need listeners for |
Return Type
void
getAppearanceProperty
Returns a property value for the given appearance.
Syntax
object.getAppearanceProperty ( sName,sPropertyName ) Parameters
| Name | Type | Optional | Default | Descripton |
sName | String | The appearance name | ||
sPropertyName | String | The name of the property |
Return Type
Object
getAppearanceStates
This returns the states that the appearance supports
Syntax
object.getAppearanceStates ( sName ) Parameters
| Name | Type | Optional | Default | Descripton |
sName | String | The name of the appearance |
Return Type
Object
removeAppearance
Removes a state dependent appearance from the theme
Syntax
object.removeAppearance ( sAppearanceName ) Parameters
| Name | Type | Optional | Default | Descripton |
sAppearanceName | String | The name of the appearance |
Return Type
void
setAppearanceProperty
Sets a property value for a given appearance
Syntax
object.setAppearanceProperty ( sName,sPropertyName,oValue ) Parameters
| Name | Type | Optional | Default | Descripton |
sName | String | The appearance name | ||
sPropertyName | String | The name of the property | ||
oValue | Object | The value to set |
Return Type
void
themeComponent
Abstract function to apply custom theming (requiring javascript) to a component.
Syntax
object.themeComponent ( oComponent ) Parameters
| Name | Type | Optional | Default | Descripton |
oComponent | | Component to apply theme to |
Return Type
void
unthemeComponent
Abstract function used to remove all custom theming done by themeComponent function.
Syntax
object.unthemeComponent ( oComponent ) Parameters
| Name | Type | Optional | Default | Descripton |
oComponent | | Component to remove theme styles from |
Return Type
void
