Package: | Ext |
Class: | TabPanelItem |
Extends: | Observable |
Defined In: | TabPanel.js |
属性 | 定义对象 | |
---|---|---|
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 TabPanel this TabPanelItem belongs to |
方法 | 定义对象 | |
---|---|---|
activate() : void | TabPanelItem | |
Activate this TabPanelItem - this does deactivate the currently active TabPanelItem. | ||
addEvents(Object object ) : void |
Observable | |
将对象中没有的事件从给出的对象中复制过来。 | ||
addListener(String eventName , Function handler , [Object scope ], [Object options ]) : void |
Observable | |
为该组件加入事件处理器函数 | ||
disable() : void | TabPanelItem | |
Disable this TabPanelItem - this call is ignore if this is the active TabPanelItem. | ||
enable() : void | TabPanelItem | |
Enable this TabPanelItem if it was previously disabled. | ||
fireEvent(String eventName , Object... args ) : Boolean |
Observable | |
触发指定的事件, 并将参数传入(至少要有事件名称)。 | ||
getText() : String | TabPanelItem | |
Returns the text for this tab | ||
getUpdateManager() : Ext.UpdateManager | TabPanelItem | |
Get the Ext.UpdateManager for the body of this TabPanelItem. Enables you to perform Ajax updates. | ||
hasListener(String eventName ) : Boolean |
Observable | |
检查该对象是否拥有指定事件的侦听器 | ||
hide() : void | TabPanelItem | |
Hide 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 options ]) : void |
Observable | |
为该组件加入事件处理器函数, addListener 的简写方式 | ||
purgeListeners() : void | Observable | |
从对象身上移除所有的侦听器 | ||
refresh() : void | TabPanelItem | |
Force a content refresh from the URL specified in the setUrl() method. Will fail silently if the setUrl method has no... | ||
removeListener(String eventName , Function handler , [Object scope ]) : void |
Observable | |
移除侦听器 | ||
setContent(String content , Boolean loadScripts ) : void |
TabPanelItem | |
Set the content for this TabPanelItem. | ||
setText(String text ) : void |
TabPanelItem | |
Sets the text for the tab (Note: this also sets the tooltip) | ||
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 | |
Show this TabPanelItem - this does not deactivate the currently active TabPanelItem. | ||
un(String eventName , Function handler , [Object scope ]) : void |
Observable | |
移除侦听器, removeListener 的简写方式 |
事件 | 定义对象 | |
---|---|---|
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 cancal 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
组合选项
使用选项参数可以组合不同类型的监听器:
下面是一个标准的、延迟执行的、一次性的监听器,将会自动停止事件并传递一个自定义的参数(forumId)
el.on('click', this.onClick, this, { single: true, delay: 100, stopEvent : true, forumId: 4 });
这个方法也允许传递的单个参数是一个包含多个指定处理函数的设置对象。
一次调用多个处理函数
代码:
el.on({ 'click' : { fn: this.onClick scope: this, delay: 100 }, 'mouseover' : { fn: this.onMouseOver scope: this }, 'mouseout' : { fn: this.onMouseOut scope: this } });
或者简写为:
代码:
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 options
])
eventName
: Stringhandler
: Functionoptions
: 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 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