| Package: | YAHOO.widget |
| Class: | TabView |
| Extends: | Element |
| Defined In: | tabview.js |
| Property | Defined By | |
|---|---|---|
| CLASSNAME : Object | TabView | |
| The className to add when building from scratch. | ||
| CONTENT_PARENT_CLASSNAME : Object | TabView | |
| The className of the HTMLElement containing the TabView's label elements to look for when building from existing mark... | ||
| DOM_EVENTS : Object | Element | |
| Dom events supported by the Element instance. | ||
| TAB_PARENT_CLASSNAME : Object | TabView | |
| The className of the HTMLElement containing the TabView's tab elements to look for when building from existing markup... | ||
| Method | Defined By | |
|---|---|---|
TabView([HTMLElement |], [Object attr]) |
TabView | |
DOMEventHandler(event e) : void |
TabView | |
| Routes childNode events. | ||
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... | ||
addTab(YAHOO.widget.Tab tab, Integer index) : void |
TabView | |
| Adds a Tab to the TabView instance. If no index is specified, the tab is added to the end of the tab list. | ||
appendChild(Boolean deep) : void |
Element | |
| Wrapper for HTMLElement method. | ||
appendTo(HTMLElement |, HTMLElement |) : void |
Element | |
| Appends the HTMLElement into either the supplied parentNode. | ||
| contentTransition() : void | TabView | |
| The transiton to use when switching between tabs. | ||
| 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. | ||
getTab(Integer index) : YAHOO.widget.Tab |
TabView | |
| Returns the Tab instance at the specified index. | ||
getTabIndex(YAHOO.widget.Tab tab) : int |
TabView | |
| Returns the index of given tab. | ||
| hasChildNodes() : Boolean | Element | |
| Wrapper for HTMLElement method. | ||
hasClass(String className) : Boolean |
Element | |
| Wrapper for Dom method. | ||
initAttributes(Object attr) : void |
TabView | |
| 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 | ||
removeTab(YAHOO.widget.Tab item) : void |
TabView | |
| Removes the specified Tab from the TabView. | ||
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 | TabView | |
| Provides a readable name for the TabView instance. | ||
| Event | Defined By | |
|---|---|---|
| activeTabChange : () | TabView | |
| Fires after the activeTab is changed. See: Element.addListener Event fields: <String> type activeTabChange <... | ||
| available : () | Element | |
| Fires when the Element's HTMLElement can be retrieved by Id. See: Element.addListener Event fields: <String> ty... | ||
| beforeActiveTabChange : () | TabView | |
| Fires before the activeTab is changed. See: Element.addListener If handler returns false, the change will be cancelle... | ||
| beforeOrientationChange : () | TabView | |
| Fires before the orientation is changed. See: Element.addListener If handler returns false, the change will be cancel... | ||
| contentReady : () | Element | |
| Fires when the Element's HTMLElement subtree is rendered. See: Element.addListener Event fields: <String> type ... | ||
| orientationChange : () | TabView | |
| Fires after the orientation is changed. See: Element.addListener Event fields: <String> type orientationChange ... | ||
public Object CLASSNAME
public Object CONTENT_PARENT_CLASSNAME
public Object DOM_EVENTS
public Object TAB_PARENT_CLASSNAME
public function TabView([HTMLElement |], [Object attr])
| : HTMLElementattr : Objectpublic function DOMEventHandler(event e)
e : eventvoidpublic function addClass(String className)
className : Stringvoidpublic function addListener(String type, Function fn, Any obj, Object scope)
type : Stringfn : Functionobj : Anyscope : Objectvoidpublic function addTab(YAHOO.widget.Tab tab, Integer index)
tab : YAHOO.widget.Tabindex : Integervoidpublic function appendChild(Boolean deep)
deep : Booleanvoidpublic function appendTo(HTMLElement |, HTMLElement |)
| : HTMLElement| : HTMLElementvoidpublic function contentTransition()
voidpublic 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 getTab(Integer index)
index : IntegerYAHOO.widget.Tabpublic function getTabIndex(YAHOO.widget.Tab tab)
tab : YAHOO.widget.Tabintpublic 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 removeTab(YAHOO.widget.Tab item)
item : YAHOO.widget.Tabvoidpublic 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 activeTabChange
See: Element.addListener
Event fields:
<String> type activeTabChange
<YAHOO.widget.Tab>
prevValue the formerly active tab
<YAHOO.widget.Tab>
newValue the new active tab
Usage:
var handler = function(e) {var previous = e.prevValue};
myTabs.addListener('activeTabChange', 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 beforeActiveTabChange
See: Element.addListener
If handler returns false, the change will be cancelled, and the value will not be set.
Event fields:
<String> type beforeActiveTabChange
<YAHOO.widget.Tab>
prevValue the currently active tab
<YAHOO.widget.Tab>
newValue the tab to be made active
Usage:
var handler = function(e) {var previous = e.prevValue};
myTabs.addListener('beforeActiveTabChange', handler);
public event beforeOrientationChange
See: Element.addListener
If handler returns false, the change will be cancelled, and the value will not be set.
Event fields:
<String> type beforeOrientationChange
<String>
prevValue the current orientation
<String>
newValue the new orientation to be applied
Usage:
var handler = function(e) {var previous = e.prevValue};
myTabs.addListener('beforeOrientationChange', 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 orientationChange
See: Element.addListener
Event fields:
<String> type orientationChange
<String>
prevValue the former orientation
<String>
newValue the new orientation
Usage:
var handler = function(e) {var previous = e.prevValue};
myTabs.addListener('orientationChange', handler);