Package: | Ext |
Class: | BasicLayoutRegion |
Extends: | Observable |
Subclasses: | LayoutRegion |
Defined In: | BasicLayoutRegion.js |
属性 | 定义对象 | |
---|---|---|
panels : Ext.util.MixedCollection | BasicLayoutRegion | |
该区域中 panel 对象的集合。 |
方法 | 定义对象 | |
---|---|---|
add(ContentPanel... panel ) : Ext.ContentPanel |
BasicLayoutRegion | |
将给出的 ContentPanel 对象添加到区域中。 | ||
addEvents(Object object ) : void |
Observable | |
将区域对象中没有的事件从给出的对象中复制过来。 | ||
addListener(String eventName , Function handler , [Object scope ], [Object options ]) : void |
Observable | |
为组件添加一个事件监听器。 | ||
fireEvent(String eventName , Object... args ) : Boolean |
Observable | |
触发指定的事件并给出参数(至少要有事件名称)。 | ||
getActivePanel() : Ext.ContentPanel | BasicLayoutRegion | |
为区域取得活动的面板对象。 | ||
getEl() : Ext.Element | BasicLayoutRegion | |
返回区域对象的容器元素。 | ||
getPanel(Number/String/ContentPanel panel ) : Ext.ContentPanel |
BasicLayoutRegion | |
返回指定的面板对象,如果该对象不存在于该区域则返回“null”。 | ||
getPosition() : String | BasicLayoutRegion | |
返回该区域的位置(有效值为:“north/south/east/west/center”)。 | ||
hasListener(String eventName ) : Boolean |
Observable | |
检查对象是否拥有指定事件的监听器。。 | ||
hasPanel(Number/String/ContentPanel panel ) : Boolean |
BasicLayoutRegion | |
如果该区域中包含指定面板对象则返回“true”。 | ||
isVisible() : Boolean | BasicLayoutRegion | |
如果该区域当前可见则返回“true”。 | ||
on(String eventName , Function handler , [Object options ]) : void |
Observable | |
为组件添加一个事件监听器(addListener 的缩写)。 | ||
purgeListeners() : void | Observable | |
删除该对象所有的监听器。 | ||
remove(Number/String/ContentPanel panel , Boolean preservePanel ) : Ext.ContentPanel |
BasicLayoutRegion | |
删除指定的面板对象。 | ||
removeListener(String eventName , Function handler , [Object scope ]) : void |
Observable | |
删除一个监听器。 | ||
resizeTo(Number newSize ) : void |
BasicLayoutRegion | |
将区域对象调整为指定大小。 | ||
showPanel(Number/String/ContentPanel panelId ) : Ext.ContentPanel |
BasicLayoutRegion | |
显示指定面板对象。 | ||
un(String eventName , Function handler , [Object scope ]) : void |
Observable | |
删除一个监听器(removeListener 的缩写)。 |
事件 | 定义对象 | |
---|---|---|
beforeremove : (Ext.LayoutRegion this , Ext.ContentPanel panel , Object e ) |
BasicLayoutRegion | |
Fires before a panel is removed (or closed). To cancel the removal set "e.cancel = true" on the event argument. | ||
collapsed : (Ext.LayoutRegion this ) |
BasicLayoutRegion | |
Fires when this region is collapsed. | ||
expanded : (Ext.LayoutRegion this ) |
BasicLayoutRegion | |
Fires when this region is expanded. | ||
invalidated : (Ext.LayoutRegion this ) |
BasicLayoutRegion | |
Fires when the layout for this region is changed. | ||
panelactivated : (Ext.LayoutRegion this , Ext.ContentPanel panel ) |
BasicLayoutRegion | |
Fires when a panel is activated. | ||
paneladded : (Ext.LayoutRegion this , Ext.ContentPanel panel ) |
BasicLayoutRegion | |
Fires when a panel is added. | ||
panelremoved : (Ext.LayoutRegion this , Ext.ContentPanel panel ) |
BasicLayoutRegion | |
Fires when a panel is removed. | ||
resized : (Ext.LayoutRegion this , Number newSize ) |
BasicLayoutRegion | |
Fires when the user resizes this region. | ||
slidehide : (Ext.LayoutRegion this ) |
BasicLayoutRegion | |
Fires when this region slides out of view. | ||
slideshow : (Ext.LayoutRegion this ) |
BasicLayoutRegion | |
Fires when this region is slid into view. | ||
visibilitychange : (Ext.LayoutRegion this , Boolean visibility ) |
BasicLayoutRegion | |
Fires when this region is shown or hidden |
public Ext.util.MixedCollection panels
public function add(ContentPanel... panel
)
panel
: ContentPanel...
Ext.ContentPanel
public function addEvents(Object object
)
object
: Object
void
public function addListener(String eventName
, Function handler
, [Object scope
], [Object options
])
eventName
: String
handler
: Function
scope
: Object
options
: 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 fireEvent(String eventName
, Object... args
)
eventName
: String
args
: Object...
Boolean
public function getActivePanel()
Ext.ContentPanel
public function getEl()
Ext.Element
public function getPanel(Number/String/ContentPanel panel
)
panel
: Number/String/ContentPanel
Ext.ContentPanel
public function getPosition()
String
public function hasListener(String eventName
)
eventName
: String
Boolean
public function hasPanel(Number/String/ContentPanel panel
)
panel
: Number/String/ContentPanel
Boolean
public function isVisible()
Boolean
public function on(String eventName
, Function handler
, [Object options
])
eventName
: String
handler
: Function
options
: Object
void
public function purgeListeners()
void
public function remove(Number/String/ContentPanel panel
, Boolean preservePanel
)
panel
: Number/String/ContentPanel
preservePanel
: Boolean
Ext.ContentPanel
public function removeListener(String eventName
, Function handler
, [Object scope
])
eventName
: String
handler
: Function
scope
: Object
void
public function resizeTo(Number newSize
)
newSize
: Number
void
public function showPanel(Number/String/ContentPanel panelId
)
panelId
: Number/String/ContentPanel
Ext.ContentPanel
public function un(String eventName
, Function handler
, [Object scope
])
eventName
: String
handler
: Function
scope
: Object
void
public event beforeremove
this
: Ext.LayoutRegion
panel
: Ext.ContentPanel
e
: Object
public event collapsed
this
: Ext.LayoutRegion
public event expanded
this
: Ext.LayoutRegion
public event invalidated
this
: Ext.LayoutRegion
public event panelactivated
this
: Ext.LayoutRegion
panel
: Ext.ContentPanel
public event paneladded
this
: Ext.LayoutRegion
panel
: Ext.ContentPanel
public event panelremoved
this
: Ext.LayoutRegion
panel
: Ext.ContentPanel
public event resized
this
: Ext.LayoutRegion
newSize
: Number
public event slidehide
this
: Ext.LayoutRegion
public event slideshow
this
: Ext.LayoutRegion
public event visibilitychange
this
: Ext.LayoutRegion
visibility
: Boolean