Package: | Ext |
Class: | TabPanelItem |
Extends: | Observable |
Defined In: | TabPanel.js |
Property | Defined By | |
---|---|---|
bodyEl : Ext.Element | TabPanelItem | |
The body element for this TabPanelItem. | ||
closeText : String | TabPanelItem | |
The text displayed in the tooltip for the close icon. | ||
id : String | TabPanelItem | |
The id for this TabPanelItem | ||
tabPanel : Ext.TabPanel | TabPanelItem | |
The Ext.TabPanel this TabPanelItem belongs to |
Method | Defined By | |
---|---|---|
activate() : void | TabPanelItem | |
Activates this TabPanelItem -- this does deactivate the currently active TabPanelItem. | ||
addEvents( Object object ) : void |
Observable | |
Used to define events on this Observable | ||
addListener( String eventName , Function handler , [Object scope ], [Object options ] ) : void |
Observable | |
Appends an event handler to this component | ||
disable() : void | TabPanelItem | |
Disables this TabPanelItem -- this does nothing if this is the active TabPanelItem. | ||
enable() : void | TabPanelItem | |
Enables this TabPanelItem if it was previously disabled. | ||
fireEvent( String eventName , Object... args ) : Boolean |
Observable | |
Fires the specified event with the passed parameters (minus the event name). | ||
getText() : String | TabPanelItem | |
Returns the text for this tab | ||
getUpdateManager() : Ext.UpdateManager | TabPanelItem | |
Gets the Ext.UpdateManager for the body of this TabPanelItem. Enables you to perform Ajax updates. | ||
hasListener( String eventName ) : Boolean |
Observable | |
Checks to see if this object has any listeners for a specified event | ||
hide() : void | TabPanelItem | |
Hides this TabPanelItem -- if you don't activate another TabPanelItem this could look odd. | ||
isActive() : Boolean | TabPanelItem | |
Returns true if this tab is the active tab. | ||
isHidden() : Boolean | TabPanelItem | |
Returns true if this tab is "hidden" | ||
on( String eventName , Function handler , [Object scope ], [Object options ] ) : void |
Observable | |
Appends an event handler to this element (shorthand for addListener) | ||
purgeListeners() : void | Observable | |
Removes all listeners for this object | ||
refresh() : void | TabPanelItem | |
Forces a content refresh from the URL specified in the setUrl method. Will fail silently if the setUrl method has not... | ||
removeListener( String eventName , Function handler , [Object scope ] ) : void |
Observable | |
Removes a listener | ||
setContent( String content , Boolean loadScripts ) : void |
TabPanelItem | |
Sets the content for this TabPanelItem. | ||
setHidden( Boolean hidden ) : void |
TabPanelItem | |
Show or hide the tab | ||
setText( String text ) : void |
TabPanelItem | |
Sets the text for the tab (Note: this also sets the tooltip text) | ||
setTooltip( String tooltip ) : void |
TabPanelItem | |
Set the tooltip for the tab. | ||
setUrl( String/Function url , [String/Object params ], [Boolean loadOnce ] ) : Ext.UpdateManager |
TabPanelItem | |
Set a URL to be used to load the content for this TabPanelItem. | ||
show() : void | TabPanelItem | |
Shows this TabPanelItem -- this does not deactivate the currently active TabPanelItem. | ||
un( String eventName , Function handler , [Object scope ] ) : void |
Observable | |
Removes a listener (shorthand for removeListener) |
Event | Defined By | |
---|---|---|
activate : ( Ext.TabPanel tabPanel , Ext.TabPanelItem this ) |
TabPanelItem | |
Fires when this tab becomes the active tab. | ||
beforeclose : ( Ext.TabPanelItem this , Object e ) |
TabPanelItem | |
Fires before this tab is closed. To cancel the close, set cancel to true on e (e.cancel = true). | ||
close : ( Ext.TabPanelItem this ) |
TabPanelItem | |
Fires when this tab is closed. | ||
deactivate : ( Ext.TabPanel tabPanel , Ext.TabPanelItem this ) |
TabPanelItem | |
Fires when this tab is no longer the active tab. |
public Ext.Element bodyEl
public String closeText
public String id
public Ext.TabPanel tabPanel
public function activate()
void
public function addEvents( Object object
)
object
: Objectvoid
public function addListener( String eventName
, Function handler
, [Object scope
], [Object options
] )
eventName
: Stringhandler
: Functionscope
: Objectoptions
: Object
Combining Options
Using the options argument, it is possible to combine different types of listeners:
A normalized, delayed, one-time listener that auto stops the event and passes a custom argument (forumId)
el.on('click', this.onClick, this, {
single: true,
delay: 100,
forumId: 4
});
Attaching multiple handlers in 1 call
The method also allows for a single argument to be passed which is a config object containing properties
which specify multiple handlers.
el.on({
'click': {
fn: this.onClick,
scope: this,
delay: 100
},
'mouseover': {
fn: this.onMouseOver,
scope: this
},
'mouseout': {
fn: this.onMouseOut,
scope: this
}
});
Or a shorthand syntax which passes the same scope object to all handlers:
el.on({
'click': this.onClick,
'mouseover': this.onMouseOver,
'mouseout': this.onMouseOut,
scope: this
});
void
public function disable()
void
public function enable()
void
public function fireEvent( String eventName
, Object... args
)
eventName
: Stringargs
: Object...Boolean
public function getText()
String
public function getUpdateManager()
Ext.UpdateManager
public function hasListener( String eventName
)
eventName
: StringBoolean
public function hide()
void
public function isActive()
Boolean
public function isHidden()
Boolean
public function on( String eventName
, Function handler
, [Object scope
], [Object options
] )
eventName
: Stringhandler
: Functionscope
: Objectoptions
: Objectvoid
public function purgeListeners()
void
public function refresh()
void
public function removeListener( String eventName
, Function handler
, [Object scope
] )
eventName
: Stringhandler
: Functionscope
: Objectvoid
public function setContent( String content
, Boolean loadScripts
)
content
: StringloadScripts
: Booleanvoid
public function setHidden( Boolean hidden
)
hidden
: Booleanvoid
public function setText( String text
)
text
: Stringvoid
public function setTooltip( String tooltip
)
tooltip
: Stringvoid
public function setUrl( String/Function url
, [String/Object params
], [Boolean loadOnce
] )
url
: String/Functionparams
: String/ObjectloadOnce
: BooleanExt.UpdateManager
public function show()
void
public function un( String eventName
, Function handler
, [Object scope
] )
eventName
: Stringhandler
: Functionscope
: Objectvoid
public event activate
tabPanel
: Ext.TabPanelthis
: Ext.TabPanelItempublic event beforeclose
this
: Ext.TabPanelIteme
: Objectpublic event close
this
: Ext.TabPanelItempublic event deactivate
tabPanel
: Ext.TabPanelthis
: Ext.TabPanelItem