Yahoo! UI Library

element  2.5.2

Yahoo! UI Library > element > YAHOO.util.AttributeProvider

Show Private Show Protected

Class YAHOO.util.AttributeProvider - uses YAHOO.util.EventProvider

Provides and manages YAHOO.util.Attribute instances

Properties

_configs - private {Object}

A key-value map of Attribute configurations

Methods

configureAttribute

void configureAttribute ( key , map , init )
Sets or updates an Attribute instance's properties.
Parameters:
key <String> The attribute's name.
map <Object> A key-value map of attribute properties
init <Boolean> Whether or not this should become the intial config.
Returns: void
Deprecated Use setAttributeConfig

fireBeforeChangeEvent

void fireBeforeChangeEvent ( key , e )
Fires the attribute's beforeChange event.
Parameters:
key <String> The attribute's name.
e <Obj> The event object to pass to handlers.
Returns: void

fireChangeEvent

void fireChangeEvent ( key , e )
Fires the attribute's change event.
Parameters:
key <String> The attribute's name.
e <Obj> The event object to pass to the handlers.
Returns: void

get

void get ( key )
Returns the current value of the attribute.
Parameters:
key <String> The attribute whose value will be returned.
Returns: void

getAttributeConfig

private object getAttributeConfig ( key )
Returns the attribute's properties.
Parameters:
key <String> The attribute's name
Returns: object
A key-value map containing all of the attribute's properties.

getAttributeKeys

Array getAttributeKeys ( )
Returns an array of attribute names.
Returns: Array
An array of attribute names.

refresh

void refresh ( key , silent )
Sets the attribute's value to its current value.
Parameters:
key <String | Array> The attribute(s) to refresh
silent <Boolean> Whether or not to suppress change events
Returns: void

register

void register ( key , map )
Adds an Attribute to the AttributeProvider instance.
Parameters:
key <String> The attribute's name
map <Object> A key-value map containing the attribute's properties.
Returns: void
Deprecated Use setAttributeConfig

resetAttributeConfig

private void resetAttributeConfig ( key )
Resets an attribute to its intial configuration.
Parameters:
key <String> The attribute's name.
Returns: void

resetValue

Boolean resetValue ( key , silent )
Resets the specified attribute's value to its initial value.
Parameters:
key <String> The name of the attribute
silent <Boolean> Whether or not to suppress change events
Returns: Boolean
Whether or not the value was set

set

Boolean set ( key , value , silent )
Sets the value of a config.
Parameters:
key <String> The name of the attribute
value <Any> The value to apply to the attribute
silent <Boolean> Whether or not to suppress change events
Returns: Boolean
Whether or not the value was set.

setAttributeConfig

void setAttributeConfig ( key , map , init )
Sets or updates an Attribute instance's properties.
Parameters:
key <String> The attribute's name.
map <Object> A key-value map of attribute properties
init <Boolean> Whether or not this should become the intial config.
Returns: void

setAttributes

void setAttributes ( map , silent )
Sets multiple attribute values.
Parameters:
map <Object> A key-value map of attributes
silent <Boolean> Whether or not to suppress change events
Returns: void


Copyright © 2007 Yahoo! Inc. All rights reserved.