Dialog which provides adjustments for working with a layout in a Dialog.
Add your neccessary layout config options to the dialogs config.
Example Usage (including a nested layout):
if(!dialog){
dialog = new Ext.LayoutDialog("download-dlg", {
modal: true,
width:600,
height:450,
shadow:true,
minWidth:500,
minHeight:350,
autoTabs:true,
proxyDrag:true,
// layout config merges with the dialog config
center:{
tabPosition: "top",
alwaysShowTabs: true
}
});
dialog.addKeyListener(27, dialog.hide, dialog);
dialog.setDefaultButton(dialog.addButton("Close", dialog.hide, dialog));
dialog.addButton("Build It!", this.getDownload, this);
// we can even add nested layouts
var innerLayout = new Ext.BorderLayout("dl-inner", {
east: {
initialSize: 200,
autoScroll:true,
split:true
},
center: {
autoScroll:true
}
});
innerLayout.beginUpdate();
innerLayout.add("east", new Ext.ContentPanel("dl-details"));
innerLayout.add("center", new Ext.ContentPanel("selection-panel"));
innerLayout.endUpdate(true);
var layout = dialog.getLayout();
layout.beginUpdate();
layout.add("center", new Ext.ContentPanel("standard-panel",
{title: "Download the Source", fitToFrame:true}));
layout.add("center", new Ext.NestedLayoutPanel(innerLayout,
{title: "Build your own ext.js"}));
layout.getRegion("center").showPanel(sp);
layout.endUpdate();
|
LayoutDialog(String/HTMLElement/Ext.Element el , Object config ) |
LayoutDialog |
|
|
addButton(String/Object config , Function handler , [Object scope ]) : Ext.Button |
BasicDialog |
Adds a button to the footer section of the dialog. |
|
addEvents(Object object ) : void |
Observable |
将对象中没有的事件从给出的对象中复制过来。 |
|
addKeyListener(Number/Array/Object key , Function fn , [Object scope ]) : Ext.BasicDialog |
BasicDialog |
Adds a key listener for when this dialog is displayed. This allows you to hook in a function that will be
executed i... |
|
addListener(String eventName , Function handler , [Object scope ], [Object options ]) : void |
Observable |
为该组件加入事件处理器函数 |
|
alignTo(String/HTMLElement/Ext.Element element , String position , [Array offsets ]) : Ext.BasicDialog |
BasicDialog |
Aligns the dialog to the specified element |
|
anchorTo(String/HTMLElement/Ext.Element element , String position , [Array offsets ], [Boolean/Number monitorScroll ]) : Ext.BasicDialog |
BasicDialog |
标记一个元素到另外一个元素,并当window resiz时重新对齐。 |
|
beginUpdate() : void |
LayoutDialog |
Deprecated. Begins an update of the layout and sets display to block and visibility to hidden. Use standard beginUpda... |
|
center() : Ext.BasicDialog |
BasicDialog |
Centers this dialog in the viewport |
|
collapse() : void |
BasicDialog |
Collapses the dialog to its minimized state (only the title bar is visible).
Equivalent to the user clicking the coll... |
|
destroy([Boolean removeEl ]) : void |
BasicDialog |
Destroys this dialog and all its supporting elements (including any tabs, shim,
shadow, proxy, mask, etc.) Also remo... |
|
endUpdate() : void |
LayoutDialog |
Deprecated. Ends update of the layout and resets display to none. Use standard beginUpdate/endUpdate on the layout. |
|
expand() : void |
BasicDialog |
Expands a collapsed dialog back to its normal state. Equivalent to the user
clicking the expand dialog button. |
|
fireEvent(String eventName , Object... args ) : Boolean |
Observable |
触发指定的事件, 并将参数传入(至少要有事件名称)。 |
|
focus() : void |
BasicDialog |
Focuses the dialog. If a defaultButton is set, it will receive focus, otherwise the
dialog itself will receive focus. |
|
getEl() : Ext.Element |
BasicDialog |
Returns the element for this dialog |
|
getLayout() : Ext.BorderLayout |
LayoutDialog |
Get the BorderLayout for this dialog |
|
getTabs() : Ext.TabPanel |
BasicDialog |
Returns the TabPanel component (creates it if it doesn't exist).
Note: If you wish to simply check for the existence ... |
|
hasListener(String eventName ) : Boolean |
Observable |
检查该对象是否拥有指定事件的侦听器 |
|
hide([Function callback ]) : Ext.BasicDialog |
BasicDialog |
Hides the dialog. |
|
initTabs() : Ext.TabPanel |
BasicDialog |
Reinitializes the tabs component, clearing out old tabs and finding new ones. |
|
isVisible() : Boolean |
BasicDialog |
Returns true if the dialog is visible |
|
moveTo(Number x , Number y ) : Ext.BasicDialog |
BasicDialog |
Moves the dialog's top-left corner to the specified point |
|
on(String eventName , Function handler , [Object options ]) : void |
Observable |
为该组件加入事件处理器函数, addListener 的简写方式 |
|
purgeListeners() : void |
Observable |
从对象身上移除所有的侦听器 |
|
removeListener(String eventName , Function handler , [Object scope ]) : void |
Observable |
移除侦听器 |
|
resizeTo(Number width , Number height ) : Ext.BasicDialog |
BasicDialog |
Resizes the dialog. |
|
restoreState() : Ext.BasicDialog |
BasicDialog |
Restores the previous state of the dialog if Ext.state is configured. |
|
setContentSize(Number width , Number height ) : Ext.BasicDialog |
BasicDialog |
Resizes the dialog to fit the specified content size. |
|
setDefaultButton(Ext.BasicDialog.Button btn ) : Ext.BasicDialog |
BasicDialog |
Sets the default button to be focused when the dialog is displayed. |
|
setTitle(String text ) : Ext.BasicDialog |
BasicDialog |
Sets the dialog title text |
|
show([String/HTMLElement/Ext.Element animateTarget ]) : Ext.BasicDialog |
BasicDialog |
Shows the dialog. |
|
toBack() : Ext.BasicDialog |
BasicDialog |
Sends this dialog to the back (under) of any other visible dialogs |
|
toFront() : Ext.BasicDialog |
BasicDialog |
Brings this dialog to the front of any other visible dialogs |
|
un(String eventName , Function handler , [Object scope ]) : void |
Observable |
移除侦听器, removeListener 的简写方式 |
|
beforehide : (Ext.BasicDialog this ) |
BasicDialog |
Fires before this dialog is hidden. |
|
beforeshow : (Ext.BasicDialog this ) |
BasicDialog |
Fires before this dialog is shown. |
|
hide : (Ext.BasicDialog this ) |
BasicDialog |
Fires when this dialog is hidden. |
|
keydown : (Ext.BasicDialog this , Ext.EventObject e ) |
BasicDialog |
Fires when a key is pressed |
|
move : (Ext.BasicDialog this , Number x , Number y ) |
BasicDialog |
Fires when this dialog is moved by the user. |
|
resize : (Ext.BasicDialog this , Number width , Number height ) |
BasicDialog |
Fires when this dialog is resized by the user. |
|
show : (Ext.BasicDialog this ) |
BasicDialog |
Fires when this dialog is shown. |
|
animateTarget : String/Element |
BasicDialog |
Id or element from which the dialog should animate while opening (defaults to null with no animation) |
|
autoCreate : Boolean/DomHelper |
BasicDialog |
True to auto create from scratch, or using a DomHelper Object (defaults to false) |
|
autoScroll : Boolean |
BasicDialog |
True to allow the dialog body contents to overflow and display scrollbars (defaults to false) |
|
autoTabs : Boolean |
BasicDialog |
If true, all elements with class 'x-dlg-tab' will get automatically converted to tabs (defaults to false) |
|
buttonAlign : String |
BasicDialog |
Valid values are "left," "center" and "right" (defaults to "right") |
|
closable : Boolean |
BasicDialog |
False to remove the built-in top-right corner close button (defaults to true) |
|
collapsible : Boolean |
BasicDialog |
False to remove the built-in top-right corner collapse button (defaults to true) |
|
constraintoviewport : Boolean |
BasicDialog |
True to keep the dialog constrained within the visible viewport boundaries (defaults to true) |
|
draggable : Boolean |
BasicDialog |
False to disable dragging of the dialog within the viewport (defaults to true) |
|
fixedcenter : Boolean |
BasicDialog |
True to ensure that anytime the dialog is shown or resized it gets centered (defaults to false) |
|
height : Number |
BasicDialog |
Height of the dialog in pixels (can also be set via CSS). Determined by browser if unspecified. |
|
minButtonWidth : Number |
BasicDialog |
Minimum width of all dialog buttons (defaults to 75) |
|
minHeight : Number |
BasicDialog |
The minimum allowable height for a resizable dialog (defaults to 80) |
|
minWidth : Number |
BasicDialog |
The minimum allowable width for a resizable dialog (defaults to 200) |
|
modal : Boolean |
BasicDialog |
True to show the dialog modally, preventing user interaction with the rest of the page (defaults to false) |
|
proxyDrag : Boolean |
BasicDialog |
True to drag a lightweight proxy element rather than the dialog itself, used when draggable = true (defaults to false) |
|
resizable : Boolean |
BasicDialog |
False to disable manual dialog resizing (defaults to true) |
|
resizeHandles : String |
BasicDialog |
Which resize handles to display - see the Ext.Resizable handles config property for valid values (defaults to 'all') |
|
shadow : Boolean/String |
BasicDialog |
True or "sides" for the default effect, "frame" for 4-way shadow, and "drop" for bottom-right shadow (defaults to false) |
|
shadowOffset : Number |
BasicDialog |
The number of pixels to offset the shadow if displayed (defaults to 5) |
|
shim : Boolean |
BasicDialog |
True to create an iframe shim that prevents selects from showing through (defaults to false) |
|
syncHeightBeforeShow : Boolean |
BasicDialog |
True to cause the dimensions to be recalculated before the dialog is shown (defaults to false) |
|
tabTag : String |
BasicDialog |
The tag name of tab elements, used when autoTabs = true (defaults to 'div') |
|
title : String |
BasicDialog |
Default text to display in the title bar (defaults to null) |
|
width : Number |
BasicDialog |
Width of the dialog in pixels (can also be set via CSS). Determined by browser if unspecified. |
|
x : Number |
BasicDialog |
The default top page coordinate of the dialog (defaults to center screen) |
|
y : Number |
BasicDialog |
The default left page coordinate of the dialog (defaults to center screen) |
animateTarget
animateTarget : String/Element
Id or element from which the dialog should animate while opening (defaults to null with no animation)
autoCreate
autoCreate : Boolean/DomHelper
True to auto create from scratch, or using a DomHelper Object (defaults to false)
autoScroll
autoScroll : Boolean
True to allow the dialog body contents to overflow and display scrollbars (defaults to false)
autoTabs
autoTabs : Boolean
If true, all elements with class 'x-dlg-tab' will get automatically converted to tabs (defaults to false)
buttonAlign
buttonAlign : String
Valid values are "left," "center" and "right" (defaults to "right")
closable
closable : Boolean
False to remove the built-in top-right corner close button (defaults to true)
collapsible
collapsible : Boolean
False to remove the built-in top-right corner collapse button (defaults to true)
constraintoviewport
constraintoviewport : Boolean
True to keep the dialog constrained within the visible viewport boundaries (defaults to true)
draggable
draggable : Boolean
False to disable dragging of the dialog within the viewport (defaults to true)
fixedcenter
fixedcenter : Boolean
True to ensure that anytime the dialog is shown or resized it gets centered (defaults to false)
height
height : Number
Height of the dialog in pixels (can also be set via CSS). Determined by browser if unspecified.
minButtonWidth
minButtonWidth : Number
Minimum width of all dialog buttons (defaults to 75)
minHeight
minHeight : Number
The minimum allowable height for a resizable dialog (defaults to 80)
minWidth
minWidth : Number
The minimum allowable width for a resizable dialog (defaults to 200)
modal
modal : Boolean
True to show the dialog modally, preventing user interaction with the rest of the page (defaults to false)
proxyDrag
proxyDrag : Boolean
True to drag a lightweight proxy element rather than the dialog itself, used when draggable = true (defaults to false)
resizable
resizable : Boolean
False to disable manual dialog resizing (defaults to true)
resizeHandles
resizeHandles : String
Which resize handles to display - see the
Ext.Resizable handles config property for valid values (defaults to 'all')
shadow
shadow : Boolean/String
True or "sides" for the default effect, "frame" for 4-way shadow, and "drop" for bottom-right shadow (defaults to false)
shadowOffset
shadowOffset : Number
The number of pixels to offset the shadow if displayed (defaults to 5)
shim
shim : Boolean
True to create an iframe shim that prevents selects from showing through (defaults to false)
syncHeightBeforeShow
syncHeightBeforeShow : Boolean
True to cause the dimensions to be recalculated before the dialog is shown (defaults to false)
tabTag
tabTag : String
The tag name of tab elements, used when autoTabs = true (defaults to 'div')
title
title : String
Default text to display in the title bar (defaults to null)
width
width : Number
Width of the dialog in pixels (can also be set via CSS). Determined by browser if unspecified.
x
x : Number
The default top page coordinate of the dialog (defaults to center screen)
y
y : Number
The default left page coordinate of the dialog (defaults to center screen)