Package: | YAHOO.widget |
Class: | Tab |
Extends: | Element |
Defined In: | tabview.js |
Property | Defined By | |
---|---|---|
ACTIVE_CLASSNAME : String @default | Tab | |
The class name applied to active tabs. | ||
CLASSNAME : Object | Tab | |
The className to add when building from scratch. @default "navset" | ||
CONTENT_PARENT_CLASSNAME : Object | Tab | |
The className of the HTMLElement containing the TabView's label elements to look for when building from existing mark... | ||
DISABLED_CLASSNAME : String @default | Tab | |
The class name applied to disabled tabs. | ||
DOM_EVENTS : Object | Element | |
Dom events supported by the Element instance. | ||
LABEL_INNER_TAGNAME : String @default | Tab | |
The default tag name for a Tab's inner element. | ||
LOADING_CLASSNAME : String @default | Tab | |
The class name applied to dynamic tabs while loading. | ||
TAB_PARENT_CLASSNAME : Object | Tab | |
The className of the HTMLElement containing the TabView's tab elements to look for when building from existing markup... | ||
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. | ||
register : YAHOO.widget.Tab | Tab | |
The tab currently active. @config activeTab |
Method | Defined By | |
---|---|---|
Tab([element {HTMLElement ], Object properties ) |
Tab | |
DOMEventHandler(event e ) : void |
Tab | |
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 |
Tab | |
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 | Tab | |
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 |
Tab | |
Returns the Tab instance at the specified index. | ||
getTabIndex(YAHOO.widget.Tab tab ) : int |
Tab | |
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 |
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 | ||
removeTab(YAHOO.widget.Tab item ) : void |
Tab | |
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 | Tab | |
Provides a readable name for the TabView instance. |
Event | Defined By | |
---|---|---|
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... | ||
beforeActiveTabChange : () | Tab | |
Fires before the activeTab is changed. See: Element.addListener If handler returns false, the change will be cancelle... | ||
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... | ||
beforeOrientationChange : () | Tab | |
Fires before the orientation is changed. See: Element.addListener If handler returns false, the change will be cancel... |
public String
@default ACTIVE_CLASSNAME
public Object CLASSNAME
public Object CONTENT_PARENT_CLASSNAME
public String
@default DISABLED_CLASSNAME
public Object DOM_EVENTS
public String
@default LABEL_INNER_TAGNAME
public String
@default LOADING_CLASSNAME
public Object TAB_PARENT_CLASSNAME
public Object dataConnection
public object loadHandler
public YAHOO.widget.Tab register
public function Tab([element {HTMLElement
], Object properties
)
{HTMLElement
: elementproperties
: Objectpublic function DOMEventHandler(event e
)
e
: eventvoid
public function addClass(String className
)
className
: Stringvoid
public function addListener(String type
, Function fn
, Any obj
, Object scope
)
type
: Stringfn
: Functionobj
: Anyscope
: Objectvoid
public function addTab(YAHOO.widget.Tab tab
, Integer index
)
tab
: YAHOO.widget.Tabindex
: Integervoid
public function appendChild(Boolean deep
)
deep
: Booleanvoid
public function appendTo(HTMLElement |
, HTMLElement |
)
|
: HTMLElement|
: HTMLElementvoid
public function contentTransition()
void
public function fireQueue()
void
public function getElementsByClassName(String className
, [String tag
])
className
: Stringtag
: StringArray
public function getElementsByTagName(String tag
)
tag
: Stringvoid
public function getStyle(String property
)
property
: StringString
public function getTab(Integer index
)
index
: IntegerYAHOO.widget.Tab
public function getTabIndex(YAHOO.widget.Tab tab
)
tab
: YAHOO.widget.Tabint
public function hasChildNodes()
Boolean
public function hasClass(String className
)
className
: StringBoolean
public function initAttributes(Object attr
)
attr
: Objectvoid
public function insertBefore(HTMLElement element
, HTMLElement before
)
element
: HTMLElementbefore
: HTMLElementvoid
public function on(String type
, Function fn
, Any obj
, Object scope
)
type
: Stringfn
: Functionobj
: Anyscope
: Objectvoid
public function removeChild(HTMLElement child
)
child
: HTMLElementvoid
public function removeClass(String className
)
className
: Stringvoid
public function removeListener(String type
, Function fn
)
type
: Stringfn
: Functionvoid
public function removeTab(YAHOO.widget.Tab item
)
item
: YAHOO.widget.Tabvoid
public function replaceChild(HTMLElement newNode
, HTMLElement oldNode
)
newNode
: HTMLElementoldNode
: HTMLElementvoid
public function replaceClass(String oldClassName
, String newClassName
)
oldClassName
: StringnewClassName
: Stringvoid
public function setStyle(String property
, String value
)
property
: Stringvalue
: Stringvoid
public function toString()
String
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 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 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 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);