Files
Phraseanet/www/include/jslibs/yui2.8/docs/YAHOO.util.Attribute.html
2011-02-16 16:09:48 +01:00

680 lines
39 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html xmlns:yui="http://yuilibrary.com/rdf/1.0/yui.rdf#">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<title>API: element YAHOO.util.Attribute (YUI Library)</title>
<link rel="stylesheet" type="text/css" href="assets/reset-fonts-grids-min.css" />
<link rel="stylesheet" type="text/css" href="assets/api.css" />
<script type="text/javascript" src="assets/api-js"></script>
<script type="text/javascript" src="assets/ac-js"></script>
</head>
<body id="yahoo-com">
<div id="doc3" class="yui-t2">
<div id="hd">
<h1><a href="http://developer.yahoo.com/yui/" title="Yahoo! UI Library">Yahoo! UI Library</a></h1>
<h3>element&nbsp; <span class="subtitle">2.8.2r1</span></h3>
<a href="./index.html" title="Yahoo! UI Library">Yahoo! UI Library</a>
&gt; <a href="./module_element.html" title="element">element</a>
&gt; YAHOO.util.Attribute
<form onsubmit="return false">
<div id="propertysearch">
Search: <input autocomplete="off" id="searchinput" />
<div id="searchresults">
&nbsp;
</div>
</div>
</form>
</div>
<div id="bd">
<div id="yui-main">
<div class="yui-b">
<form action="#" name="yui-classopts-form" method="get" id="yui-classopts-form">
<fieldset>
<legend>Filters</legend>
<span class="classopts"><input type="checkbox" name="show_private" id="show_private" /> <label for="show_private">Show Private</label></span>
<span class="classopts"><input type="checkbox" name="show_protected" id="show_protected" /> <label for="show_protected">Show Protected</label></span>
<span class="classopts"><input type="checkbox" name="show_deprecated" id="show_deprecated" /> <label for="show_deprecated">Show Deprecated</label></span>
</fieldset>
</form>
<h2>
Class <b property="yui:name">YAHOO.util.Attribute</b>
<span class="extends">
</span>
</h2>
<!-- class tree goes here -->
<div class="summary description" property="yui:description">
Provides Attribute configurations.
</div>
<div class="section constructor details" rel="yui:constructor" resource="#constructor">
<h3 id="constructor">Constructor</h3>
<div class="content">
<div class="detail">
<strong property="yui:name">YAHOO.util.Attribute</strong>
<code>
(
hash
,
The
)
</code>
<div class="description">
<dl rel="yui:parameters">
<dt>Parameters:</dt>
<dd rel="yui:parameter">
<code><span property="yui:name">hash</span>
&lt;<span property="yui:type">Object</span>&gt;
</code>
<span property="yui:description"> The intial Attribute.</span>
</dd>
<dd rel="yui:parameter">
<code><span property="yui:name">The</span>
&lt;<span property="yui:type">YAHOO.util.AttributeProvider</span>&gt;
</code>
<span property="yui:description"> owner of the Attribute instance.</span>
</dd>
</dl>
</div>
</div>
</div>
</div>
<div rel="yui:properties" resource="#properties">
<div class="section field details">
<h3 id="properties">Properties</h3>
<div class="content">
<div class="private" rel="yui:property" resource="#property__initialConfig">
<h4><a name="property__initialConfig" property="yui:name">_initialConfig</a>
- <code>private <span property="yui:type">Object</span></code>
</h4>
<div class="detail">
<div class="description" property="yui:description">
The attribute's initial configuration.
</div>
</div>
<hr />
</div>
<div class="private" rel="yui:property" resource="#property__written">
<h4><a name="property__written" property="yui:name">_written</a>
- <code>private <span property="yui:type">Boolean</span></code>
</h4>
<div class="detail">
<div class="description" property="yui:description">
Whether or not the attribute's value has been set.
</div>
</div>
<hr />
</div>
<div class="" rel="yui:property" resource="#property_getter">
<h4><a name="property_getter" property="yui:name">getter</a>
- <code><span property="yui:type">Function</span></code>
</h4>
<div class="detail">
<div class="description" property="yui:description">
The function to use when getting the attribute's value.
The getter receives the new value as the first arg and the attribute name as the 2nd
The return value of the getter will be used as the return from get().
</div>
</div>
<hr />
</div>
<div class="" rel="yui:property" resource="#property_method">
<h4><a name="property_method" property="yui:name">method</a>
- <code><span property="yui:type">Function</span></code>
</h4>
<div class="detail">
<div class="description" property="yui:description">
A function to call when setting the attribute's value.
The method receives the new value as the first arg and the attribute name as the 2nd
</div>
</div>
<hr />
</div>
<div class="" rel="yui:property" resource="#property_name">
<h4><a name="property_name" property="yui:name">name</a>
- <code><span property="yui:type">String</span></code>
</h4>
<div class="detail">
<div class="description" property="yui:description">
The name of the attribute.
</div>
</div>
<hr />
</div>
<div class="" rel="yui:property" resource="#property_owner">
<h4><a name="property_owner" property="yui:name">owner</a>
- <code><span property="yui:type">YAHOO.util.AttributeProvider</span></code>
</h4>
<div class="detail">
<div class="description" property="yui:description">
The owner of the attribute.
</div>
</div>
<hr />
</div>
<div class="" rel="yui:property" resource="#property_readOnly">
<h4><a name="property_readOnly" property="yui:name">readOnly</a>
- <code><span property="yui:type">Boolean</span></code>
</h4>
<div class="detail">
<div class="description" property="yui:description">
Whether or not the attribute is read only.
</div>
</div>
<hr />
</div>
<div class="" rel="yui:property" resource="#property_setter">
<h4><a name="property_setter" property="yui:name">setter</a>
- <code><span property="yui:type">Function</span></code>
</h4>
<div class="detail">
<div class="description" property="yui:description">
The function to use when setting the attribute's value.
The setter receives the new value as the first arg and the attribute name as the 2nd
The return value of the setter replaces the value passed to set().
</div>
</div>
<hr />
</div>
<div class="" rel="yui:property" resource="#property_validator">
<h4><a name="property_validator" property="yui:name">validator</a>
- <code><span property="yui:type">Function</span></code>
</h4>
<div class="detail">
<div class="description" property="yui:description">
The validator to use when setting the attribute's value.
</div>
</div>
<hr />
</div>
<div class="" rel="yui:property" resource="#property_value">
<h4><a name="property_value" property="yui:name">value</a>
- <code><span property="yui:type">String</span></code>
</h4>
<div class="detail">
<div class="description" property="yui:description">
The value of the attribute.
</div>
</div>
<hr />
</div>
<div class="" rel="yui:property" resource="#property_writeOnce">
<h4><a name="property_writeOnce" property="yui:name">writeOnce</a>
- <code><span property="yui:type">Boolean</span></code>
</h4>
<div class="detail">
<div class="description" property="yui:description">
Whether or not the attribute can only be written once.
</div>
</div>
<hr />
</div>
</div>
</div>
</div>
<div rel="yui:methods" resource="#methods">
<div class="section method details">
<h3 id="methods">Methods</h3>
<div class="content">
<div class="" rel="yui:method" resource="#method_configure">
<h4>
<a name="method_configure">configure</a></h4>
<div class="detail" >
<code>
void
<strong property="yui:name">configure</strong>
(
map
,
init
)
</code>
<div class="description" property="yui:description">
Allows for configuring the Attribute's properties.
</div>
<div class="description">
<dl rel="yui:parameters">
<dt>Parameters:</dt>
<dd rel="yui:parameter">
<code><span property="yui:name">map</span>
&lt;<span property="yui:type">Object</span>&gt;
</code>
<span property="yui:description"> A key-value map of Attribute properties.</span>
</dd>
<dd rel="yui:parameter">
<code><span property="yui:name">init</span>
&lt;<span property="yui:type">Boolean</span>&gt;
</code>
<span property="yui:description"> Whether or not this should become the initial config.</span>
</dd>
</dl>
</div>
</div>
<hr />
</div>
<div class="" rel="yui:method" resource="#method_getValue">
<h4>
<a name="method_getValue">getValue</a></h4>
<div class="detail" >
<code>
any
<strong property="yui:name">getValue</strong>
(
)
</code>
<div class="description" property="yui:description">
Retrieves the current value of the attribute.
</div>
<div class="description">
<dl>
<dt>Returns:
<code property="yui:return">
any
</code></dt>
<dd property="yui:returnInfo">The current value of the attribute.</dd>
</dl>
</div>
</div>
<hr />
</div>
<div class="" rel="yui:method" resource="#method_refresh">
<h4>
<a name="method_refresh">refresh</a></h4>
<div class="detail" >
<code>
Boolean
<strong property="yui:name">refresh</strong>
(
)
</code>
<div class="description" property="yui:description">
Resets the value to the current value.
Useful when values may have gotten out of sync with actual properties.
</div>
<div class="description">
<dl>
<dt>Returns:
<code property="yui:return">
Boolean
</code></dt>
<dd property="yui:returnInfo">Whether or not the value was set.</dd>
</dl>
</div>
</div>
<hr />
</div>
<div class="" rel="yui:method" resource="#method_resetConfig">
<h4>
<a name="method_resetConfig">resetConfig</a></h4>
<div class="detail" >
<code>
void
<strong property="yui:name">resetConfig</strong>
(
)
</code>
<div class="description" property="yui:description">
Resets the attribute config to the initial config state.
</div>
<div class="description">
</div>
</div>
<hr />
</div>
<div class="" rel="yui:method" resource="#method_resetValue">
<h4>
<a name="method_resetValue">resetValue</a></h4>
<div class="detail" >
<code>
Boolean
<strong property="yui:name">resetValue</strong>
(
)
</code>
<div class="description" property="yui:description">
Resets the value to the initial config value.
</div>
<div class="description">
<dl>
<dt>Returns:
<code property="yui:return">
Boolean
</code></dt>
<dd property="yui:returnInfo">Whether or not the value was set.</dd>
</dl>
</div>
</div>
<hr />
</div>
<div class="" rel="yui:method" resource="#method_setValue">
<h4>
<a name="method_setValue">setValue</a></h4>
<div class="detail" >
<code>
Boolean
<strong property="yui:name">setValue</strong>
(
value
,
silent
)
</code>
<div class="description" property="yui:description">
Sets the value of the attribute and fires beforeChange and change events.
</div>
<div class="description">
<dl rel="yui:parameters">
<dt>Parameters:</dt>
<dd rel="yui:parameter">
<code><span property="yui:name">value</span>
&lt;<span property="yui:type">Any</span>&gt;
</code>
<span property="yui:description"> The value to apply to the attribute.</span>
</dd>
<dd rel="yui:parameter">
<code><span property="yui:name">silent</span>
&lt;<span property="yui:type">Boolean</span>&gt;
</code>
<span property="yui:description"> If true the change events will not be fired.</span>
</dd>
</dl>
<dl>
<dt>Returns:
<code property="yui:return">
Boolean
</code></dt>
<dd property="yui:returnInfo">Whether or not the value was set.</dd>
</dl>
</div>
</div>
<hr />
</div>
</div>
</div>
</div>
<div rel="yui:events" resource="#events">
</div>
<div rel="yui:attributes" resource="#configattributes">
</div>
</div>
</div>
<div class="yui-b">
<div class="nav">
<div id="moduleList" class="module">
<h4>Modules</h4>
<ul class="content">
<li class=""><a href="module_animation.html" title="animation">animation</a></li>
<li class=""><a href="module_autocomplete.html" title="autocomplete">autocomplete</a></li>
<li class=""><a href="module_button.html" title="button">button</a></li>
<li class=""><a href="module_calendar.html" title="calendar">calendar</a></li>
<li class=""><a href="module_carousel.html" title="carousel">carousel</a></li>
<li class=""><a href="module_charts.html" title="charts">charts</a></li>
<li class=""><a href="module_colorpicker.html" title="colorpicker">colorpicker</a></li>
<li class=""><a href="module_connection.html" title="connection">connection</a></li>
<li class=""><a href="module_container.html" title="container">container</a></li>
<li class=""><a href="module_cookie.html" title="cookie">cookie</a></li>
<li class=""><a href="module_datasource.html" title="datasource">datasource</a></li>
<li class=""><a href="module_datatable.html" title="datatable">datatable</a></li>
<li class=""><a href="module_datemath.html" title="datemath">datemath</a></li>
<li class=""><a href="module_dom.html" title="dom">dom</a></li>
<li class=""><a href="module_dragdrop.html" title="dragdrop">dragdrop</a></li>
<li class=""><a href="module_editor.html" title="editor">editor</a></li>
<li class="selected"><a href="module_element.html" title="element">element</a></li>
<li class=""><a href="module_element-delegate.html" title="element-delegate">element-delegate</a></li>
<li class=""><a href="module_event.html" title="event">event</a></li>
<li class=""><a href="module_event-delegate.html" title="event-delegate">event-delegate</a></li>
<li class=""><a href="module_event-mouseenter.html" title="event-mouseenter">event-mouseenter</a></li>
<li class=""><a href="module_event-simulate.html" title="event-simulate">event-simulate</a></li>
<li class=""><a href="module_get.html" title="get">get</a></li>
<li class=""><a href="module_history.html" title="history">history</a></li>
<li class=""><a href="module_imagecropper.html" title="imagecropper">imagecropper</a></li>
<li class=""><a href="module_imageloader.html" title="imageloader">imageloader</a></li>
<li class=""><a href="module_json.html" title="json">json</a></li>
<li class=""><a href="module_layout.html" title="layout">layout</a></li>
<li class=""><a href="module_logger.html" title="logger">logger</a></li>
<li class=""><a href="module_menu.html" title="menu">menu</a></li>
<li class=""><a href="module_paginator.html" title="paginator">paginator</a></li>
<li class=""><a href="module_profiler.html" title="profiler">profiler</a></li>
<li class=""><a href="module_profilerviewer.html" title="profilerviewer">profilerviewer</a></li>
<li class=""><a href="module_progressbar.html" title="progressbar">progressbar</a></li>
<li class=""><a href="module_resize.html" title="resize">resize</a></li>
<li class=""><a href="module_selector.html" title="selector">selector</a></li>
<li class=""><a href="module_slider.html" title="slider">slider</a></li>
<li class=""><a href="module_storage.html" title="Storage">Storage</a></li>
<li class=""><a href="module_stylesheet.html" title="stylesheet">stylesheet</a></li>
<li class=""><a href="module_swf.html" title="swf">swf</a></li>
<li class=""><a href="module_swfdetect.html" title="swfdetect">swfdetect</a></li>
<li class=""><a href="module_swfstore.html" title="swfstore">swfstore</a></li>
<li class=""><a href="module_tabview.html" title="tabview">tabview</a></li>
<li class=""><a href="module_treeview.html" title="treeview">treeview</a></li>
<li class=""><a href="module_uploader.html" title="uploader">uploader</a></li>
<li class=""><a href="module_yahoo.html" title="yahoo">yahoo</a></li>
<li class=""><a href="module_yuiloader.html" title="yuiloader">yuiloader</a></li>
<li class=""><a href="module_yuitest.html" title="yuitest">yuitest</a></li>
</ul>
</div>
<div id="classList" class="module">
<h4>Classes</h4>
<ul class="content">
<li class="selected"><a href="YAHOO.util.Attribute.html" title="YAHOO.util.Attribute">YAHOO.util.Attribute</a></li>
<li class=""><a href="YAHOO.util.AttributeProvider.html" title="YAHOO.util.AttributeProvider">YAHOO.util.AttributeProvider</a></li>
<li class=""><a href="YAHOO.util.Element.html" title="YAHOO.util.Element">YAHOO.util.Element</a></li>
</ul>
</div>
<div id="fileList" class="module">
<h4>Files</h4>
<ul class="content">
<li class=""><a href="Attribute.js.html" title="Attribute.js">Attribute.js</a></li>
<li class=""><a href="AttributeProvider.js.html" title="AttributeProvider.js">AttributeProvider.js</a></li>
<li class=""><a href="Element.js.html" title="Element.js">Element.js</a></li>
</ul>
</div>
<div id="propertyList" class="module">
<h4>Properties</h4>
<ul class="content">
<li class="private"><a href="#property__initialConfig" title="_initialConfig">_initialConfig</a></li>
<li class="private"><a href="#property__written" title="_written">_written</a></li>
<li class=""><a href="#property_getter" title="getter">getter</a></li>
<li class=""><a href="#property_method" title="method">method</a></li>
<li class=""><a href="#property_name" title="name">name</a></li>
<li class=""><a href="#property_owner" title="owner">owner</a></li>
<li class=""><a href="#property_readOnly" title="readOnly">readOnly</a></li>
<li class=""><a href="#property_setter" title="setter">setter</a></li>
<li class=""><a href="#property_validator" title="validator">validator</a></li>
<li class=""><a href="#property_value" title="value">value</a></li>
<li class=""><a href="#property_writeOnce" title="writeOnce">writeOnce</a></li>
</ul>
</div>
<div id="methodsList" class="module">
<h4>Methods</h4>
<ul class="content">
<li class=""><a href="#method_configure" title="configure">configure</a></li>
<li class=""><a href="#method_getValue" title="getValue">getValue</a></li>
<li class=""><a href="#method_refresh" title="refresh">refresh</a></li>
<li class=""><a href="#method_resetConfig" title="resetConfig">resetConfig</a></li>
<li class=""><a href="#method_resetValue" title="resetValue">resetValue</a></li>
<li class=""><a href="#method_setValue" title="setValue">setValue</a></li>
</ul>
</div>
</div>
</div>
</div>
<div id="ft">
<hr />
Copyright &copy; 2010 Yahoo! Inc. All rights reserved.
</div>
</div>
<script type="text/javascript">
var ALL_YUI_PROPS = [{"access": "", "host": "YAHOO.util.Attribute", "name": "configure", "url": "YAHOO.util.Attribute.html#method_configure", "type": "method"}, {"access": "", "host": "YAHOO.util.Attribute", "name": "getter", "url": "YAHOO.util.Attribute.html#property_getter", "type": "property"}, {"access": "", "host": "YAHOO.util.Attribute", "name": "getValue", "url": "YAHOO.util.Attribute.html#method_getValue", "type": "method"}, {"access": "private", "host": "YAHOO.util.Attribute", "name": "_initialConfig", "url": "YAHOO.util.Attribute.html#property__initialConfig", "type": "property"}, {"access": "", "host": "YAHOO.util.Attribute", "name": "method", "url": "YAHOO.util.Attribute.html#property_method", "type": "property"}, {"access": "", "host": "YAHOO.util.Attribute", "name": "name", "url": "YAHOO.util.Attribute.html#property_name", "type": "property"}, {"access": "", "host": "YAHOO.util.Attribute", "name": "owner", "url": "YAHOO.util.Attribute.html#property_owner", "type": "property"}, {"access": "", "host": "YAHOO.util.Attribute", "name": "readOnly", "url": "YAHOO.util.Attribute.html#property_readOnly", "type": "property"}, {"access": "", "host": "YAHOO.util.Attribute", "name": "refresh", "url": "YAHOO.util.Attribute.html#method_refresh", "type": "method"}, {"access": "", "host": "YAHOO.util.Attribute", "name": "resetConfig", "url": "YAHOO.util.Attribute.html#method_resetConfig", "type": "method"}, {"access": "", "host": "YAHOO.util.Attribute", "name": "resetValue", "url": "YAHOO.util.Attribute.html#method_resetValue", "type": "method"}, {"access": "", "host": "YAHOO.util.Attribute", "name": "setter", "url": "YAHOO.util.Attribute.html#property_setter", "type": "property"}, {"access": "", "host": "YAHOO.util.Attribute", "name": "setValue", "url": "YAHOO.util.Attribute.html#method_setValue", "type": "method"}, {"access": "", "host": "YAHOO.util.Attribute", "name": "validator", "url": "YAHOO.util.Attribute.html#property_validator", "type": "property"}, {"access": "", "host": "YAHOO.util.Attribute", "name": "value", "url": "YAHOO.util.Attribute.html#property_value", "type": "property"}, {"access": "", "host": "YAHOO.util.Attribute", "name": "writeOnce", "url": "YAHOO.util.Attribute.html#property_writeOnce", "type": "property"}, {"access": "private", "host": "YAHOO.util.Attribute", "name": "_written", "url": "YAHOO.util.Attribute.html#property__written", "type": "property"}];
</script>
</body>
</html>