Print Friendly

# Class YAHOO.util.AttributeProvider

Package: | YAHOO.util
Class: | AttributeProvider
Extends: | Object
Defined In: | tabview.js

Provides and manages YAHOO.util.Attribute instances @uses YAHOO.util.EventProvider

## Public Properties

This class has no public properties.

## Public Methods

Method | Defined By
--- | ---
| configureAttribute(`String key`, `Object map`, `Boolean init`) : void | AttributeProvider
Sets or updates an Attribute instance's properties.
| fireBeforeChangeEvent(`String key`, `Obj e`) : void | AttributeProvider
Fires the attribute's beforeChange event.
| fireChangeEvent(`String key`, `Obj e`) : void | AttributeProvider
Fires the attribute's change event.
| get(`String key`) : void | AttributeProvider
Returns the current value of the attribute.
| getAttributeKeys() : Array | AttributeProvider
Returns an array of attribute names.
| refresh(`String/Array key`, `Boolean silent`) : void | AttributeProvider
Sets the attribute's value to its current value.
| register(`String key`, `Object map`) : void | AttributeProvider
Adds an Attribute to the AttributeProvider instance.
| resetValue(`String key`, `Boolean silent`) : Boolean | AttributeProvider
Resets the specified attribute's value to its initial value.
| set(`String key`, `Any value`, `Boolean silent`) : Boolean | AttributeProvider
Sets the value of a config.
| setAttributes(`Object map`, `Boolean silent`) : void | AttributeProvider
Sets multiple attribute values.

## Public Events

This class has no public events.

## Method Details

### configureAttribute

`public function configureAttribute(`String key`, `Object map`, `Boolean 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`

This method is defined by AttributeProvider.

### fireBeforeChangeEvent

`public function fireBeforeChangeEvent(`String key`, `Obj 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`

This method is defined by AttributeProvider.

### fireChangeEvent

`public function fireChangeEvent(`String key`, `Obj 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`

This method is defined by AttributeProvider.

### get

`public function get(`String key`)`
Returns the current value of the attribute.
Parameters:

- `key` : String
  The attribute whose value will be returned.

Returns:

- `void`

This method is defined by AttributeProvider.

### getAttributeKeys

`public function getAttributeKeys()`
Returns an array of attribute names.
Parameters:

- None.

Returns:

- `Array`
  An array of attribute names.

This method is defined by AttributeProvider.

### refresh

`public function refresh(`String/Array key`, `Boolean 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`

This method is defined by AttributeProvider.

### register

`public function register(`String key`, `Object 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`

This method is defined by AttributeProvider.

### resetValue

`public function resetValue(`String key`, `Boolean 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

This method is defined by AttributeProvider.

### set

`public function set(`String key`, `Any value`, `Boolean 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.

This method is defined by AttributeProvider.

### setAttributes

`public function setAttributes(`Object map`, `Boolean 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`

This method is defined by AttributeProvider.

yui-ext - Copyright © 2006 Jack Slocum. | Yahoo! UI - Copyright © 2006 Yahoo! Inc.
All rights reserved.