| Package: | Ext |
| Class: | SplitLayoutRegion |
| Extends: | LayoutRegion |
| Defined In: | SplitLayoutRegion.js |
| 属性 | 定义对象 | |
|---|---|---|
| bodyEl : Ext.Element | LayoutRegion | |
| This regions body element | ||
| collapsedEl : Ext.Element | LayoutRegion | |
| This region's collapsed element | ||
| el : Ext.Element | LayoutRegion | |
| This regions container element | ||
| panels : Ext.util.MixedCollection | BasicLayoutRegion | |
| A collection of panels in this region. | ||
| split : Ext.SplitBar | SplitLayoutRegion | |
| The SplitBar for this region | ||
| titleTextEl : HTMLElement | LayoutRegion | |
| This regions title text element | ||
| 方法 | 定义对象 | |
|---|---|---|
add(ContentPanel... panel) : Ext.ContentPanel |
BasicLayoutRegion | |
| Add the passed ContentPanel(s) | ||
addEvents(Object object) : void |
Observable | |
| 将对象中没有的事件从给出的对象中复制过来。 | ||
addListener(String eventName, Function handler, [Object scope], [Object options]) : void |
Observable | |
| 为该组件加入事件处理器函数 | ||
collapse([Boolean skipAnim]) : void |
LayoutRegion | |
| Collapses this region. | ||
expand(Ext.EventObject e, [Boolean skipAnim]) : void |
LayoutRegion | |
| Expand this region if it was previously collapsed. | ||
fireEvent(String eventName, Object... args) : Boolean |
Observable | |
| 触发指定的事件, 并将参数传入(至少要有事件名称)。 | ||
| getActivePanel() : Ext.ContentPanel | BasicLayoutRegion | |
| Get the active panel for this region. | ||
| getEl() : Ext.Element | BasicLayoutRegion | |
| Returns the container element for this region. | ||
getPanel(Number/String/ContentPanel panel) : Ext.ContentPanel |
BasicLayoutRegion | |
| Returns the panel specified or null if it's not in this region. | ||
| getPosition() : String | BasicLayoutRegion | |
| Returns this regions position (north/south/east/west/center). | ||
| getSplitBar() : Ext.SplitBar | SplitLayoutRegion | |
| Returns the SplitBar for this region. | ||
| getTabs() : Ext.TabPanel | LayoutRegion | |
| Returns the TabPanel component used by this region | ||
hasListener(String eventName) : Boolean |
Observable | |
| 检查该对象是否拥有指定事件的侦听器 | ||
hasPanel(Number/String/ContentPanel panel) : Boolean |
BasicLayoutRegion | |
| Returns true if the panel is in this region. | ||
| hide() : void | LayoutRegion | |
| Hides this region. | ||
hidePanel(Number/String/ContentPanel panel) : void |
LayoutRegion | |
| Hides the tab for the specified panel. | ||
| isVisible() : Boolean | BasicLayoutRegion | |
| Returns true if this region is currently visible. | ||
on(String eventName, Function handler, [Object options]) : void |
Observable | |
| 为该组件加入事件处理器函数, addListener 的简写方式 | ||
| purgeListeners() : void | Observable | |
| 从对象身上移除所有的侦听器 | ||
remove(Number/String/ContentPanel panel, Boolean preservePanel) : Ext.ContentPanel |
BasicLayoutRegion | |
| Removes the specified panel. If preservePanel is not true (either here or in the config), the panel is destroyed. | ||
removeListener(String eventName, Function handler, [Object scope]) : void |
Observable | |
| 移除侦听器 | ||
resizeTo(Number newSize) : void |
BasicLayoutRegion | |
| Resizes the region to the specified size. For vertical regions (west, east) this adjusts the width, for horizontal (... | ||
| setCollapsedTitle() : void | LayoutRegion | |
| Updates the collapsed text for north/south regions (used with collapsedTitle config option) | ||
| show() : void | LayoutRegion | |
| Shows this region if it was previously hidden. | ||
showPanel(Number/String/ContentPanel panelId) : Ext.ContentPanel |
BasicLayoutRegion | |
| Show the specified panel. | ||
un(String eventName, Function handler, [Object scope]) : void |
Observable | |
| 移除侦听器, removeListener 的简写方式 | ||
unhidePanel(Number/String/ContentPanel panel) : void |
LayoutRegion | |
| Unhides the tab for a previously hidden panel. | ||
| 事件 | 定义对象 | |
|---|---|---|
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 | ||
| 设置选项 | 定义对象 | |
|---|---|---|
| alwaysShowTabs : Boolean | LayoutRegion | |
| True to always display tabs even when only 1 panel (defaults to false) | ||
| animate : Boolean | LayoutRegion | |
| True to animate expand/collapse (defaults to false) | ||
| autoHide : Boolean | LayoutRegion | |
| False to disable autoHide when the mouse leaves the "floated" region (defaults to true) | ||
| autoScroll : Boolean | LayoutRegion | |
| True to enable overflow scrolling (defaults to false) | ||
| closeOnTab : Boolean | LayoutRegion | |
| True to place the close icon on the tabs instead of the region titlebar (defaults to false) | ||
| cmargins : Object | LayoutRegion | |
| Margins for the element when collapsed (defaults to: north/south {top: 2, left: 0, right:0, bottom: 2} or east/west {... | ||
| collapsed : Boolean | LayoutRegion | |
| True to set the initial display to collapsed (defaults to false) | ||
| collapsedTitle : String | LayoutRegion | |
| Optional string message to display in the collapsed block of a north or south region | ||
| collapsible : Boolean | LayoutRegion | |
| False to disable collapsing (defaults to true) | ||
| disableTabTips : Boolean | LayoutRegion | |
| True to disable tab tooltips | ||
| floatable : Boolean | LayoutRegion | |
| False to disable floating (defaults to true) | ||
| hidden : Boolean | LayoutRegion | |
| True to start the region hidden | ||
| hideTabs : Boolean | LayoutRegion | |
| True to hide the tab strip (defaults to false) | ||
| hideWhenEmpty : Boolean | LayoutRegion | |
| True to hide the region when it has no panels | ||
| margins : Object | LayoutRegion | |
| Margins for the element (defaults to {top: 0, left: 0, right:0, bottom: 0}) | ||
| minTabWidth : Number | LayoutRegion | |
| The minimum tab width (defaults to 40) | ||
| preferredTabWidth : Number | LayoutRegion | |
| The preferred tab width (defaults to 150) | ||
| preservePanels : Boolean | LayoutRegion | |
| True to preserve removed panels so they can be readded later (defaults to false) | ||
| resizeTabs : Boolean | LayoutRegion | |
| True to enable automatic tab resizing. This will resize the tabs so they are all the same size and fit within the spa... | ||
| showPin : Boolean | LayoutRegion | |
| True to show a pin button | ||
| tabPosition : String | LayoutRegion | |
| "top" or "bottom" (defaults to "bottom") | ||
| title : String | LayoutRegion | |
| The title for the region (overrides panel titles) | ||
| titlebar : Boolean | LayoutRegion | |
| True to display a title bar (defaults to true) | ||
public Ext.Element bodyEl
public Ext.Element collapsedEl
public Ext.util.MixedCollection panels
public Ext.SplitBar split
public HTMLElement titleTextEl
public function add(ContentPanel... panel)
panel : ContentPanel...Ext.ContentPanelpublic function addEvents(Object object)
object : Objectvoidpublic 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 });
voidpublic function collapse([Boolean skipAnim])
skipAnim : Booleanvoidpublic function expand(Ext.EventObject e, [Boolean skipAnim])
e : Ext.EventObjectskipAnim : Booleanvoidpublic function fireEvent(String eventName, Object... args)
eventName : Stringargs : Object...Booleanpublic function getActivePanel()
Ext.ContentPanelpublic function getEl()
Ext.Elementpublic function getPanel(Number/String/ContentPanel panel)
panel : Number/String/ContentPanelExt.ContentPanelpublic function getPosition()
Stringpublic function getSplitBar()
Ext.SplitBarpublic function getTabs()
Ext.TabPanelpublic function hasListener(String eventName)
eventName : StringBooleanpublic function hasPanel(Number/String/ContentPanel panel)
panel : Number/String/ContentPanelBooleanpublic function hide()
voidpublic function hidePanel(Number/String/ContentPanel panel)
panel : Number/String/ContentPanelvoidpublic function isVisible()
Booleanpublic function on(String eventName, Function handler, [Object options])
eventName : Stringhandler : Functionoptions : Objectvoidpublic function purgeListeners()
voidpublic function remove(Number/String/ContentPanel panel, Boolean preservePanel)
panel : Number/String/ContentPanelpreservePanel : BooleanExt.ContentPanelpublic function removeListener(String eventName, Function handler, [Object scope])
eventName : Stringhandler : Functionscope : Objectvoidpublic function resizeTo(Number newSize)
newSize : Numbervoidpublic function setCollapsedTitle()
voidpublic function show()
voidpublic function showPanel(Number/String/ContentPanel panelId)
panelId : Number/String/ContentPanelExt.ContentPanelpublic function un(String eventName, Function handler, [Object scope])
eventName : Stringhandler : Functionscope : Objectvoidpublic function unhidePanel(Number/String/ContentPanel panel)
panel : Number/String/ContentPanelvoidpublic event beforeremove
this : Ext.LayoutRegionpanel : Ext.ContentPanele : Objectpublic event collapsed
this : Ext.LayoutRegionpublic event expanded
this : Ext.LayoutRegionpublic event invalidated
this : Ext.LayoutRegionpublic event panelactivated
this : Ext.LayoutRegionpanel : Ext.ContentPanelpublic event paneladded
this : Ext.LayoutRegionpanel : Ext.ContentPanelpublic event panelremoved
this : Ext.LayoutRegionpanel : Ext.ContentPanelpublic event resized
this : Ext.LayoutRegionnewSize : Numberpublic event slidehide
this : Ext.LayoutRegionpublic event slideshow
this : Ext.LayoutRegionpublic event visibilitychange
this : Ext.LayoutRegionvisibility : BooleanalwaysShowTabs : Boolean
animate : Boolean
autoHide : Boolean
autoScroll : Boolean
closeOnTab : Boolean
cmargins : Object
collapsed : Boolean
collapsedTitle : String
collapsible : Boolean
disableTabTips : Boolean
floatable : Boolean
hidden : Boolean
hideTabs : Boolean
hideWhenEmpty : Boolean
margins : Object
minTabWidth : Number
preferredTabWidth : Number
preservePanels : Boolean
resizeTabs : Boolean
tabPosition : String
title : String
titlebar : Boolean