X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/6a7e4474cba9d8be4b2ec445e10f1691f7277c50..HEAD:/examples/layout-browser/layout-browser.html diff --git a/examples/layout-browser/layout-browser.html b/examples/layout-browser/layout-browser.html index cc37672b..92b0035c 100644 --- a/examples/layout-browser/layout-browser.html +++ b/examples/layout-browser/layout-browser.html @@ -1,31 +1,17 @@ + ExtJS Layout Examples - - - + + - - + - + - - - - - - - - - - - - - @@ -34,7 +20,6 @@ -
@@ -51,7 +36,7 @@
-

Ext.layout.AbsoluteLayout

+

Ext.layout.container.Absolute

This is a simple layout style that allows you to position items within a container using CSS-style absolute positioning via XY coordinates.

Sample Config:

@@ -64,10 +49,10 @@ items:[{ html: 'Positioned at x:50, y:50' }] -

API Reference

+

API Reference

-

Ext.layout.Accordion

+

Ext.layout.container.Accordion

Displays one panel at a time in a stacked layout. No special config properties are required other than the layout — all panels added to the container will be converted to accordion panels.

Sample Config:

@@ -93,10 +78,10 @@ items:[{ color:#555; } -

API Reference

+

API Reference

-

Ext.layout.AnchorLayout

+

Ext.layout.container.Anchor

Provides anchoring of contained items to the container's edges. This type of layout is most commonly seen within FormPanels (or any container with a FormLayout) where fields are sized relative to the container without hard-coding their dimensions.

@@ -119,10 +104,10 @@ items: [{ anchor: '-10, -262' }] -

API Reference

+

API Reference

-

Ext.layout.BorderLayout

+

Ext.layout.container.Border

This Layout Browser page is already a border layout, and this example shows a separate border layout nested within a region of the page's border layout. Border layouts can be nested with just about any level of complexity that you might need.

@@ -157,10 +142,10 @@ items: [{ margins: '5 0 0 0' }] -

API Reference

+

API Reference

-

Ext.layout.CardLayout (TabPanel)

+

Ext.layout.container.Card (TabPanel)

The TabPanel component is an excellent example of a sophisticated card layout. Each tab is just a panel managed by the card layout such that only one is visible at a time. In this case, configuration is simple since we aren't actually building a card layout from scratch. Don't forget to set the @@ -180,12 +165,12 @@ items:[{ html: 'This is tab 3 content.' }] -

CardLayout API Reference

-

TabPanel API Reference

+

Card layout API Reference

+

TabPanel API Reference

-

Ext.layout.CardLayout (Wizard)

-

You can use a CardLayout to create your own custom wizard-style screen. The layout is a standard +

Ext.layout.container.Card (Wizard)

+

You can use a Card layout to create your own custom wizard-style screen. The layout is a standard CardLayout with a Toolbar at the bottom, and the developer must supply the navigation function that implements the wizard's business logic (see the code in basic.js for details).

Sample Config:

@@ -210,10 +195,10 @@ items: [{ html: 'Step 3' }] -

API Reference

+

API Reference

-

Ext.layout.ColumnLayout

+

Ext.layout.container.Column

This is a useful layout style when you need multiple columns that can have varying content height. Any fixed-width column widths are calculated first, then any percentage-width columns specified using the columnWidth config will be calculated based on remaining container width. Percentages @@ -235,10 +220,10 @@ items: [{ html: 'Content' }] -

API Reference

+

API Reference

-

Ext.layout.FitLayout

+

Ext.layout.container.Fit

A very simple layout that simply fills the container with a single panel. This is usually the best default layout choice when you have no other specific layout requirements.

Sample Config:

@@ -250,53 +235,18 @@ items: { border: false } -

API Reference

-
-
-

Ext.layout.FormLayout

-

FormLayout has specific logic to deal with form fields, labels, etc. While you can use a FormLayout in - a standard panel, you will normally want to use a FormPanel directly in order to get form-specific functionality - like validation, submission, etc. FormPanels use a FormLayout internally so the layout config is not needed - (and the layout may not render correctly if overridden).

-

Sample Config:

-

-xtype: 'form', // FormPanel
-labelWidth: 75,
-width: 350,
-defaultType: 'textfield',
-items: [{
-        fieldLabel: 'First Name',
-        name: 'first',
-        allowBlank:false
-    },{
-        fieldLabel: 'Last Name',
-        name: 'last'
-    },{
-        fieldLabel: 'Company',
-        name: 'company'
-    },{
-        fieldLabel: 'Email',
-        name: 'email',
-        vtype:'email'
-    }
-],
-buttons: [
-    {text: 'Save'},
-    {text: 'Cancel'}
-]
-            
-

API Reference

+

API Reference

-

Ext.layout.TableLayout

+

Ext.layout.container.Table

Outputs a standard HTML table as the layout container. This is sometimes useful for complex layouts where cell spanning is required, or when you want to allow the contents to flow naturally based on standard browser table layout rules.

Sample Config:


-layout:'table',
-layoutConfig: {
-    columns: 3
+layout: {
+    type: 'table',
+    columns: 4
 },
 items: [
     {html:'1,1',rowspan:3},
@@ -307,17 +257,17 @@ items: [
     {html:'3,3'}
 ]
             
-

API Reference

+

API Reference

-

Ext.layout.VBoxLayout

+

Ext.layout.container.VBox

A layout that allows for the vertical and horizontal stretching of child items, much like the container layout with size management.

Sample Config:


-layout:'vbox',
-layoutConfig: {
+layout: {
+    type: 'vbox'
     align : 'stretch',
     pack  : 'start',
 },
@@ -327,19 +277,19 @@ items: [
     {html:'panel 3', flex:2}
 ]
             
-

API Reference

+

API Reference

-

Ext.layout.HBoxLayout

+

Ext.layout.container.HBox

A layout that allows for the vertical and horizontal stretching of child items, much like the column layout but can stretch items vertically.

Sample Config:


-layout:'hbox',
-layoutConfig: {
-    align : 'stretch',
-    pack  : 'start',
+layout: {
+    type: 'hbox',
+    pack: 'start',
+    align: 'stretch'
 },
 items: [
     {html:'panel 1', flex:1},
@@ -347,39 +297,15 @@ items: [
     {html:'panel 3', flex:2}
 ]
             
-

API Reference

+

API Reference

-
-

Ext.ux.layout.RowLayout

-

This is a custom layout that is useful when you need a layout style with multiple rows of content. - Any fixed-height rows are calculated first, then any percentage-height rows specified using the - rowHeight config will be calculated based on remaining container height. Percentages - should add up to 1 (100%) in order to fill the container. Standard panel widths (fixed or - percentage) are also supported.

-

Sample Config:

-

-layout:'ux.row',
-items: [{
-    title: 'Height = 25%',
-    rowHeight: .25,
-    width: '50%'
-},{
-    title: 'Height = 100px',
-    height: 100,
-    width: 300
-},{
-    title: 'Height = 75%',
-    rowHeight: .75
-}]
-            
-
-

Ext.ux.layout.CenterLayout

+

Ext.ux.layout.Center

This is a custom layout for centering contents within a container. The only requirement is - that the container have a single child panel with a width specified (fixed or percentage). + that the container have a single child panel with a fixed width or a percentage ratio specified. The child panel can then contain any content, including other components, that will display centered within the main container. To make the centered panel non-visual, remove the title and add border:false to the child config.

@@ -388,7 +314,7 @@ items: [{ layout:'ux.center', items: { title: 'Centered Panel', - width: '75%', + widthRatio: 0.75, html: 'Some content' }