| Package: | YAHOO.widget |
| Class: | Tab |
| Extends: | Element |
| Defined In: | tabview.js |
| Property | Defined By | |
|---|---|---|
| ACTIVE_CLASSNAME : String | Tab | |
| The class name applied to active tabs. | ||
| DISABLED_CLASSNAME : String | Tab | |
| The class name applied to disabled tabs. | ||
| DOM_EVENTS : Object | Element | |
| Dom events supported by the Element instance. | ||
| LABEL_INNER_TAGNAME : String | Tab | |
| The default tag name for a Tab's inner element. | ||
| LOADING_CLASSNAME : String | Tab | |
| The class name applied to dynamic tabs while loading. | ||
| dataConnection : Object | Tab | |
| Provides a reference to the connection request object when data is loaded dynamically. | ||
| loadHandler : object | Tab | |
| Object containing success and failure callbacks for loading data. | ||
| Method | Defined By | |
|---|---|---|
Tab([element {HTMLElement/String}], Object properties) |
Tab | |
addClass(String className) : void |
Element | |
| Wrapper for Dom method. | ||
addListener(String type, Function fn, Any obj, Object scope) : void |
Element | |
| Adds a listener for the given event. These may be DOM or customEvent listeners. Any event that is fired via fireEve... | ||
appendChild(Boolean deep) : void |
Element | |
| Wrapper for HTMLElement method. | ||
appendTo(HTMLElement/Element parentNode, HTMLElement/Element before) : void |
Element | |
| Appends the HTMLElement into either the supplied parentNode. | ||
| fireQueue() : void | Element | |
| Apply any queued set calls. | ||
getElementsByClassName(String className, [String tag]) : Array |
Element | |
| Wrapper for Dom method. | ||
getElementsByTagName(String tag) : void |
Element | |
| Wrapper for HTMLElement method. | ||
getStyle(String property) : String |
Element | |
| Wrapper for Dom method. | ||
| hasChildNodes() : Boolean | Element | |
| Wrapper for HTMLElement method. | ||
hasClass(String className) : Boolean |
Element | |
| Wrapper for Dom method. | ||
initAttributes(Object attr) : void |
Tab | |
| Registers TabView specific properties. | ||
insertBefore(HTMLElement element, HTMLElement before) : void |
Element | |
| Wrapper for HTMLElement method. | ||
on(String type, Function fn, Any obj, Object scope) : void |
Element | |
| Alias for addListener | ||
removeChild(HTMLElement child) : void |
Element | |
| Wrapper for HTMLElement method. | ||
removeClass(String className) : void |
Element | |
| Wrapper for Dom method. | ||
removeListener(String type, Function fn) : void |
Element | |
| Remove an event listener | ||
replaceChild(HTMLElement newNode, HTMLElement oldNode) : void |
Element | |
| Wrapper for HTMLElement method. | ||
replaceClass(String oldClassName, String newClassName) : void |
Element | |
| Wrapper for Dom method. | ||
setStyle(String property, String value) : void |
Element | |
| Wrapper for Dom method. | ||
| toString() : String | Tab | |
| Provides a readable name for the tab. | ||
| Event | Defined By | |
|---|---|---|
| activeChange : () | Tab | |
| Fires after the active state is changed. See: Element.addListener Event fields: <String> type activeChange <... | ||
| available : () | Element | |
| Fires when the Element's HTMLElement can be retrieved by Id. See: Element.addListener Event fields: <String> ty... | ||
| beforeActiveChange : () | Tab | |
| Fires before the active state is changed. See: Element.addListener If handler returns false, the change will be cance... | ||
| beforeContentChange : () | Tab | |
| Fires before the tab content is changed. See: Element.addListener If handler returns false, the change will be cancel... | ||
| beforeLabelChange : () | Tab | |
| Fires before the tab label is changed. See: Element.addListener If handler returns false, the change will be cancelle... | ||
| contentChange : () | Tab | |
| Fires after the tab content is changed. See: Element.addListener Event fields: <String> type contentChange <... | ||
| contentReady : () | Element | |
| Fires when the Element's HTMLElement subtree is rendered. See: Element.addListener Event fields: <String> type ... | ||
| labelChange : () | Tab | |
| Fires after the tab label is changed. See: Element.addListener Event fields: <String> type labelChange <Stri... | ||
public String ACTIVE_CLASSNAME
public String DISABLED_CLASSNAME
public Object DOM_EVENTS
public String LABEL_INNER_TAGNAME
public String LOADING_CLASSNAME
public Object dataConnection
public object loadHandler
public function Tab([element {HTMLElement/String}], Object properties)
{HTMLElement/String} : elementproperties : Objectpublic function addClass(String className)
className : Stringvoidpublic function addListener(String type, Function fn, Any obj, Object scope)
type : Stringfn : Functionobj : Anyscope : Objectvoidpublic function appendChild(Boolean deep)
deep : Booleanvoidpublic function appendTo(HTMLElement/Element parentNode, HTMLElement/Element before)
parentNode : HTMLElement/Elementbefore : HTMLElement/Elementvoidpublic function fireQueue()
voidpublic function getElementsByClassName(String className, [String tag])
className : Stringtag : StringArraypublic function getElementsByTagName(String tag)
tag : Stringvoidpublic function getStyle(String property)
property : StringStringpublic function hasChildNodes()
Booleanpublic function hasClass(String className)
className : StringBooleanpublic function initAttributes(Object attr)
attr : Objectvoidpublic function insertBefore(HTMLElement element, HTMLElement before)
element : HTMLElementbefore : HTMLElementvoidpublic function on(String type, Function fn, Any obj, Object scope)
type : Stringfn : Functionobj : Anyscope : Objectvoidpublic function removeChild(HTMLElement child)
child : HTMLElementvoidpublic function removeClass(String className)
className : Stringvoidpublic function removeListener(String type, Function fn)
type : Stringfn : Functionvoidpublic function replaceChild(HTMLElement newNode, HTMLElement oldNode)
newNode : HTMLElementoldNode : HTMLElementvoidpublic function replaceClass(String oldClassName, String newClassName)
oldClassName : StringnewClassName : Stringvoidpublic function setStyle(String property, String value)
property : Stringvalue : Stringvoidpublic function toString()
Stringpublic event activeChange
See: Element.addListener
Event fields:
<String> type activeChange
<Boolean>
prevValue the previous value
<Boolean>
newValue the updated value
Usage:
var handler = function(e) {var previous = e.prevValue};
myTabs.addListener('activeChange', handler);
public event available
See: Element.addListener
Event fields:
<String> type available
<HTMLElement>
target the HTMLElement bound to this Element instance
Usage:
var handler = function(e) {var target = e.target};
myTabs.addListener('available', handler);
public event beforeActiveChange
See: Element.addListener
If handler returns false, the change will be cancelled, and the value will not be set.
Event fields:
<String> type beforeActiveChange
<Boolean>
prevValue the current value
<Boolean>
newValue the new value
Usage:
var handler = function(e) {var previous = e.prevValue};
myTabs.addListener('beforeActiveChange', handler);
public event beforeContentChange
See: Element.addListener
If handler returns false, the change will be cancelled, and the value will not be set.
Event fields:
<String> type beforeContentChange
<String>
prevValue the current value
<String>
newValue the new value
Usage:
var handler = function(e) {var previous = e.prevValue};
myTabs.addListener('beforeContentChange', handler);
public event beforeLabelChange
See: Element.addListener
If handler returns false, the change will be cancelled, and the value will not be set.
Event fields:
<String> type beforeLabelChange
<String>
prevValue the current value
<String>
newValue the new value
Usage:
var handler = function(e) {var previous = e.prevValue};
myTabs.addListener('beforeLabelChange', handler);
public event contentChange
See: Element.addListener
Event fields:
<String> type contentChange
<String>
prevValue the previous value
<Boolean>
newValue the updated value
Usage:
var handler = function(e) {var previous = e.prevValue};
myTabs.addListener('contentChange', handler);
public event contentReady
See: Element.addListener
Event fields:
<String> type contentReady
<HTMLElement>
target the HTMLElement bound to this Element instance
Usage:
var handler = function(e) {var target = e.target};
myTabs.addListener('contentReady', handler);
public event labelChange
See: Element.addListener
Event fields:
<String> type labelChange
<String>
prevValue the previous value
<String>
newValue the updated value
Usage:
var handler = function(e) {var previous = e.prevValue};
myTabs.addListener('labelChange', handler);