Class odf.LazyStyleProperties
Defined in: StyleParseUtils.js.
Constructor Attributes | Constructor Name and Description |
---|---|
odf.LazyStyleProperties(parent, getters)
Object that retrieves properties lazily and caches them.
|
Method Attributes | Method Name and Description |
---|---|
reset(p)
Give a new parent to the LazyStyleProperties.
|
|
value(name)
Retrieve a value by name.
|
Class Detail
odf.LazyStyleProperties(parent, getters)
Object that retrieves properties lazily and caches them.
If the element does not define the property it is retrieved from a parent
LazyStyleProperties object.
An object with getters functions is passed into the constructor. There must
be a getter function for each property.
- Parameters:
- {!odf.LazyStyleProperties|undefined} parent
- {!Object.} getters
Method Detail
{undefined}
reset(p)
Give a new parent to the LazyStyleProperties.
The cache is invalidated when this is done.
- Parameters:
- {!odf.LazyStyleProperties|undefined} p
- Returns:
- {undefined}
{*}
value(name)
Retrieve a value by name.
The getter for the value must be defined in the getters object.
If the getter returns undefined and a parent object is provided, the
value is gotten from the parent object.
- Parameters:
- {!string} name
- Returns:
- {*}