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

NameTypeOptionalDefaultDescripton
sNameStringcheckedThe name of the theme

Properties

NameTypegetsetDescripton
defaultBooleancheckedcheckedWhether the theme is the default theme
nameStringcheckedThe name of the theme

Methods

NameDescription
addAppearanceAdds a state dependent appearance to the theme
getAppearancePropertyReturns a property value for the given appearance.
getAppearanceStatesThis returns the states that the appearance supports
removeAppearanceRemoves a state dependent appearance from the theme
setAppearancePropertySets a property value for a given appearance
themeComponentAbstract function to apply custom theming (requiring javascript) to a component.
unthemeComponentAbstract 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

NameTypeOptionalDefaultDescripton
sAppearanceNameStringThe name of the appearance
oStatesString[]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

NameTypeOptionalDefaultDescripton
sNameStringThe appearance name
sPropertyNameStringThe name of the property

Return Type

Object

getAppearanceStates

This returns the states that the appearance supports

Syntax

object.getAppearanceStates ( sName )

Parameters

NameTypeOptionalDefaultDescripton
sNameStringThe name of the appearance

Return Type

Object

removeAppearance

Removes a state dependent appearance from the theme

Syntax

object.removeAppearance ( sAppearanceName )

Parameters

NameTypeOptionalDefaultDescripton
sAppearanceNameStringThe name of the appearance

Return Type

void

setAppearanceProperty

Sets a property value for a given appearance

Syntax

object.setAppearanceProperty ( sName,sPropertyName,oValue )

Parameters

NameTypeOptionalDefaultDescripton
sNameStringThe appearance name
sPropertyNameStringThe name of the property
oValueObjectThe value to set

Return Type

void

themeComponent

Abstract function to apply custom theming (requiring javascript) to a component.

Syntax

object.themeComponent ( oComponent )

Parameters

NameTypeOptionalDefaultDescripton
oComponentBiComponentComponent 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

NameTypeOptionalDefaultDescripton
oComponentBiComponentComponent to remove theme styles from

Return Type

void