Namespace YAHOO.util.AttributeProvider
YAHOO.util
Provides and manages YAHOO.util.Attribute instances
Defined in: tabview.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Provides and manages YAHOO.util.Attribute instances
|
Field Attributes | Field Name and Description |
---|---|
<private> |
A key-value map of Attribute configurations
|
Method Attributes | Method Name and Description |
---|---|
configureAttribute(key, map, init)
Sets or updates an Attribute instance's properties.
|
|
fireBeforeChangeEvent(key, e)
Fires the attribute's beforeChange event.
|
|
fireChangeEvent(key, e)
Fires the attribute's change event.
|
|
get(key)
Returns the current value of the attribute.
|
|
<private> |
getAttributeConfig(key)
Returns the attribute's properties.
|
Returns an array of attribute names.
|
|
refresh(key, silent)
Sets the attribute's value to its current value.
|
|
register(key, map)
Adds an Attribute to the AttributeProvider instance.
|
|
<private> |
resetAttributeConfig(key)
Resets an attribute to its intial configuration.
|
resetValue(key, silent)
Resets the specified attribute's value to its initial value.
|
|
set(key, value, silent)
Sets the value of a config.
|
|
setAttributes(map, silent)
Sets multiple attribute values.
|
Field Detail
<private>
_configs
A key-value map of Attribute configurations
Method Detail
configureAttribute(key, map, init)
Sets or updates an Attribute instance's properties.
- Parameters:
- {String} key
- The attribute's name.
- {Object} map
- A key-value map of attribute properties
- {Boolean} init
- Whether or not this should become the intial config.
fireBeforeChangeEvent(key, e)
Fires the attribute's beforeChange event.
- Parameters:
- {String} key
- The attribute's name.
- {Obj} e
- The event object to pass to handlers.
fireChangeEvent(key, e)
Fires the attribute's change event.
- Parameters:
- {String} key
- The attribute's name.
- {Obj} e
- The event object to pass to the handlers.
get(key)
Returns the current value of the attribute.
- Parameters:
- {String} key
- The attribute whose value will be returned.
<private>
{object}
getAttributeConfig(key)
Returns the attribute's properties.
- Parameters:
- {String} key
- The attribute's name
- Returns:
- {object} A key-value map containing all of the attribute's properties.
{Array}
getAttributeKeys()
Returns an array of attribute names.
- Returns:
- {Array} An array of attribute names.
refresh(key, silent)
Sets the attribute's value to its current value.
- Parameters:
- {String | Array} key
- The attribute(s) to refresh
- {Boolean} silent
- Whether or not to suppress change events
register(key, map)
Adds an Attribute to the AttributeProvider instance.
- Parameters:
- {String} key
- The attribute's name
- {Object} map
- A key-value map containing the attribute's properties.
<private>
resetAttributeConfig(key)
Resets an attribute to its intial configuration.
- Parameters:
- {String} key
- The attribute's name.
{Boolean}
resetValue(key, silent)
Resets the specified attribute's value to its initial value.
- Parameters:
- {String} key
- The name of the attribute
- {Boolean} silent
- Whether or not to suppress change events
- Returns:
- {Boolean} Whether or not the value was set
{Boolean}
set(key, value, silent)
Sets the value of a config.
- Parameters:
- {String} key
- The name of the attribute
- {Any} value
- The value to apply to the attribute
- {Boolean} silent
- Whether or not to suppress change events
- Returns:
- {Boolean} Whether or not the value was set.
setAttributes(map, silent)
Sets multiple attribute values.
- Parameters:
- {Object} map
- A key-value map of attributes
- {Boolean} silent
- Whether or not to suppress change events