Upgrade to ExtJS 4.0.2 - Released 06/09/2011
[extjs.git] / docs / output / Ext.layout.container.Card.js
1 Ext.data.JsonP.Ext_layout_container_Card({
2   "allMixins": [
3
4   ],
5   "deprecated": null,
6   "docauthor": null,
7   "members": {
8     "cfg": [
9       {
10         "type": "Boolean",
11         "deprecated": null,
12         "alias": null,
13         "protected": false,
14         "tagname": "cfg",
15         "href": "AbstractContainer.html#Ext-layout-container-AbstractContainer-cfg-bindToOwnerCtComponent",
16         "static": false,
17         "filename": "/mnt/ebs/nightly/git/SDK/platform/src/layout/container/AbstractContainer.js",
18         "private": false,
19         "name": "bindToOwnerCtComponent",
20         "owner": "Ext.layout.container.AbstractContainer",
21         "doc": "<p>Flag to notify the ownerCt Component on afterLayout of a change</p>\n",
22         "linenr": 17,
23         "html_filename": "AbstractContainer.html"
24       },
25       {
26         "type": "Boolean",
27         "deprecated": null,
28         "alias": null,
29         "protected": false,
30         "tagname": "cfg",
31         "href": "AbstractContainer.html#Ext-layout-container-AbstractContainer-cfg-bindToOwnerCtContainer",
32         "static": false,
33         "filename": "/mnt/ebs/nightly/git/SDK/platform/src/layout/container/AbstractContainer.js",
34         "private": false,
35         "name": "bindToOwnerCtContainer",
36         "owner": "Ext.layout.container.AbstractContainer",
37         "doc": "<p>Flag to notify the ownerCt Container on afterLayout of a change</p>\n",
38         "linenr": 23,
39         "html_filename": "AbstractContainer.html"
40       },
41       {
42         "type": "Boolean",
43         "deprecated": null,
44         "alias": null,
45         "protected": false,
46         "tagname": "cfg",
47         "href": "AbstractCard.html#Ext-layout-container-AbstractCard-cfg-deferredRender",
48         "shortDoc": "True to render each contained item at the time it becomes active, false to render all contained items\nas soon as the ...",
49         "static": false,
50         "filename": "/mnt/ebs/nightly/git/SDK/platform/src/layout/container/AbstractCard.js",
51         "private": false,
52         "name": "deferredRender",
53         "owner": "Ext.layout.container.AbstractCard",
54         "doc": "<p>True to render each contained item at the time it becomes active, false to render all contained items\nas soon as the layout is rendered (defaults to false).  If there is a significant amount of content or\na lot of heavy controls being rendered into panels that are not displayed by default, setting this to\ntrue might improve performance.</p>\n",
55         "linenr": 40,
56         "html_filename": "AbstractCard.html"
57       },
58       {
59         "type": "String",
60         "deprecated": null,
61         "alias": null,
62         "protected": false,
63         "tagname": "cfg",
64         "href": "AbstractContainer.html#Ext-layout-container-AbstractContainer-cfg-itemCls",
65         "shortDoc": "An optional extra CSS class that will be added to the container. ...",
66         "static": false,
67         "filename": "/mnt/ebs/nightly/git/SDK/platform/src/layout/container/AbstractContainer.js",
68         "private": false,
69         "name": "itemCls",
70         "owner": "Ext.layout.container.AbstractContainer",
71         "doc": "<p>An optional extra CSS class that will be added to the container. This can be useful for adding\ncustomized styles to the container or any of its children using standard CSS rules. See\n<a href=\"#/api/Ext.Component\" rel=\"Ext.Component\" class=\"docClass\">Ext.Component</a>.ctCls also.</p>\n\n\n<p></p></p>\n",
72         "linenr": 29,
73         "html_filename": "AbstractContainer.html"
74       }
75     ],
76     "method": [
77       {
78         "deprecated": null,
79         "alias": null,
80         "protected": false,
81         "tagname": "method",
82         "href": "AbstractCard.html#Ext-layout-container-AbstractCard-method-getActiveItem",
83         "shortDoc": "Return the active (visible) component in the layout. ...",
84         "static": false,
85         "filename": "/mnt/ebs/nightly/git/SDK/platform/src/layout/container/AbstractCard.js",
86         "private": false,
87         "params": [
88
89         ],
90         "name": "getActiveItem",
91         "owner": "Ext.layout.container.AbstractCard",
92         "doc": "<p>Return the active (visible) component in the layout.</p>\n",
93         "linenr": 89,
94         "return": {
95           "type": "Ext.Component",
96           "doc": "\n"
97         },
98         "html_filename": "AbstractCard.html"
99       },
100       {
101         "deprecated": null,
102         "alias": null,
103         "protected": false,
104         "tagname": "method",
105         "href": "AbstractContainer.html#Ext-layout-container-AbstractContainer-method-getLayoutItems",
106         "shortDoc": "Returns an array of child components either for a render phase (Performed in the beforeLayout method of the layout's\n...",
107         "static": false,
108         "filename": "/mnt/ebs/nightly/git/SDK/platform/src/layout/container/AbstractContainer.js",
109         "private": false,
110         "params": [
111
112         ],
113         "name": "getLayoutItems",
114         "owner": "Ext.layout.container.AbstractContainer",
115         "doc": "<p>Returns an array of child components either for a render phase (Performed in the beforeLayout method of the layout's\nbase class), or the layout phase (onLayout).</p>\n\n",
116         "linenr": 49,
117         "return": {
118           "type": "Array",
119           "doc": "<p>of child components</p>\n"
120         },
121         "html_filename": "AbstractContainer.html"
122       },
123       {
124         "deprecated": null,
125         "alias": null,
126         "protected": false,
127         "tagname": "method",
128         "href": "AbstractCard.html#Ext-layout-container-AbstractCard-method-getNext",
129         "shortDoc": "Return the active (visible) component in the layout to the next card ...",
130         "static": false,
131         "filename": "/mnt/ebs/nightly/git/SDK/platform/src/layout/container/AbstractCard.js",
132         "private": false,
133         "params": [
134
135         ],
136         "name": "getNext",
137         "owner": "Ext.layout.container.AbstractCard",
138         "doc": "<p>Return the active (visible) component in the layout to the next card</p>\n",
139         "linenr": 148,
140         "return": {
141           "type": "Ext.Component",
142           "doc": "<p>The next component or false.</p>\n"
143         },
144         "html_filename": "AbstractCard.html"
145       },
146       {
147         "deprecated": null,
148         "alias": null,
149         "protected": false,
150         "tagname": "method",
151         "href": "AbstractCard.html#Ext-layout-container-AbstractCard-method-getPrev",
152         "shortDoc": "Return the active (visible) component in the layout to the previous card ...",
153         "static": false,
154         "filename": "/mnt/ebs/nightly/git/SDK/platform/src/layout/container/AbstractCard.js",
155         "private": false,
156         "params": [
157
158         ],
159         "name": "getPrev",
160         "owner": "Ext.layout.container.AbstractCard",
161         "doc": "<p>Return the active (visible) component in the layout to the previous card</p>\n",
162         "linenr": 172,
163         "return": {
164           "type": "Ext.Component",
165           "doc": "<p>The previous component or false.</p>\n"
166         },
167         "html_filename": "AbstractCard.html"
168       },
169       {
170         "deprecated": null,
171         "alias": null,
172         "protected": false,
173         "tagname": "method",
174         "href": "AbstractContainer.html#Ext-layout-container-AbstractContainer-method-getRenderTarget",
175         "shortDoc": "Returns the element into which rendering must take place. ...",
176         "static": false,
177         "filename": "/mnt/ebs/nightly/git/SDK/platform/src/layout/container/AbstractContainer.js",
178         "private": false,
179         "params": [
180
181         ],
182         "name": "getRenderTarget",
183         "owner": "Ext.layout.container.AbstractContainer",
184         "doc": "<p>Returns the element into which rendering must take place. Defaults to the owner Container's Ext.AbstractComponent.targetEl.</p>\n\n\n<p>May be overridden in layout managers which implement an inner element.</p>\n",
185         "linenr": 68,
186         "return": {
187           "type": "Ext.core.Element",
188           "doc": "\n"
189         },
190         "html_filename": "AbstractContainer.html"
191       },
192       {
193         "deprecated": null,
194         "alias": null,
195         "protected": true,
196         "tagname": "method",
197         "href": "Container.html#Ext-layout-container-Container-method-getRenderedItems",
198         "shortDoc": "Returns all items that are rendered ...",
199         "static": false,
200         "filename": "/mnt/ebs/nightly/git/SDK/extjs/src/layout/container/Container.js",
201         "private": false,
202         "params": [
203
204         ],
205         "name": "getRenderedItems",
206         "owner": "Ext.layout.container.Container",
207         "doc": "<p>Returns all items that are rendered</p>\n",
208         "linenr": 53,
209         "return": {
210           "type": "Array",
211           "doc": "<p>All matching items</p>\n"
212         },
213         "html_filename": "Container.html"
214       },
215       {
216         "deprecated": null,
217         "alias": null,
218         "protected": false,
219         "tagname": "method",
220         "href": "AbstractContainer.html#Ext-layout-container-AbstractContainer-method-getTarget",
221         "shortDoc": "Returns the owner component's resize element. ...",
222         "static": false,
223         "filename": "/mnt/ebs/nightly/git/SDK/platform/src/layout/container/AbstractContainer.js",
224         "private": false,
225         "params": [
226
227         ],
228         "name": "getTarget",
229         "owner": "Ext.layout.container.AbstractContainer",
230         "doc": "<p>Returns the owner component's resize element.</p>\n",
231         "linenr": 61,
232         "return": {
233           "type": "Ext.core.Element",
234           "doc": "\n"
235         },
236         "html_filename": "AbstractContainer.html"
237       },
238       {
239         "deprecated": null,
240         "alias": null,
241         "protected": true,
242         "tagname": "method",
243         "href": "Container.html#Ext-layout-container-Container-method-getVisibleItems",
244         "shortDoc": "Returns all items that are both rendered and visible ...",
245         "static": false,
246         "filename": "/mnt/ebs/nightly/git/SDK/extjs/src/layout/container/Container.js",
247         "private": false,
248         "params": [
249
250         ],
251         "name": "getVisibleItems",
252         "owner": "Ext.layout.container.Container",
253         "doc": "<p>Returns all items that are both rendered and visible</p>\n",
254         "linenr": 76,
255         "return": {
256           "type": "Array",
257           "doc": "<p>All matching items</p>\n"
258         },
259         "html_filename": "Container.html"
260       },
261       {
262         "deprecated": null,
263         "alias": null,
264         "protected": false,
265         "tagname": "method",
266         "href": "AbstractCard.html#Ext-layout-container-AbstractCard-method-next",
267         "shortDoc": "Sets the active (visible) component in the layout to the next card ...",
268         "static": false,
269         "filename": "/mnt/ebs/nightly/git/SDK/platform/src/layout/container/AbstractCard.js",
270         "private": false,
271         "params": [
272
273         ],
274         "name": "next",
275         "owner": "Ext.layout.container.AbstractCard",
276         "doc": "<p>Sets the active (visible) component in the layout to the next card</p>\n",
277         "linenr": 161,
278         "return": {
279           "type": "Ext.Component",
280           "doc": "<p>the activated component or false when nothing activated.</p>\n"
281         },
282         "html_filename": "AbstractCard.html"
283       },
284       {
285         "deprecated": null,
286         "alias": null,
287         "protected": false,
288         "tagname": "method",
289         "href": "AbstractCard.html#Ext-layout-container-AbstractCard-method-prev",
290         "shortDoc": "Sets the active (visible) component in the layout to the previous card ...",
291         "static": false,
292         "filename": "/mnt/ebs/nightly/git/SDK/platform/src/layout/container/AbstractCard.js",
293         "private": false,
294         "params": [
295
296         ],
297         "name": "prev",
298         "owner": "Ext.layout.container.AbstractCard",
299         "doc": "<p>Sets the active (visible) component in the layout to the previous card</p>\n",
300         "linenr": 185,
301         "return": {
302           "type": "Ext.Component",
303           "doc": "<p>the activated component or false when nothing activated.</p>\n"
304         },
305         "html_filename": "AbstractCard.html"
306       },
307       {
308         "deprecated": null,
309         "alias": null,
310         "protected": false,
311         "tagname": "method",
312         "href": "Card.html#Ext-layout-container-Card-method-setActiveItem",
313         "shortDoc": "Makes the given card active. ...",
314         "static": false,
315         "filename": "/mnt/ebs/nightly/git/SDK/extjs/src/layout/container/Card.js",
316         "private": false,
317         "params": [
318           {
319             "type": "Ext.Component/Number/String",
320             "optional": false,
321             "doc": "<p>The component, component <a href=\"#/api/Ext.Component-cfg-id\" rel=\"Ext.Component-cfg-id\" class=\"docClass\">id</a>,\n<a href=\"#/api/Ext.Component-cfg-itemId\" rel=\"Ext.Component-cfg-itemId\" class=\"docClass\">itemId</a>, or index of component.</p>\n",
322             "name": "newCard"
323           }
324         ],
325         "name": "setActiveItem",
326         "owner": "Ext.layout.container.Card",
327         "doc": "<p>Makes the given card active.</p>\n\n<pre><code>var card1 = Ext.create('Ext.panel.Panel', {itemId: 'card-1'});\nvar card2 = Ext.create('Ext.panel.Panel', {itemId: 'card-2'});\nvar panel = Ext.create('Ext.panel.Panel', {\n    layout: 'card',\n    activeItem: 0,\n    items: [card1, card2]\n});\n// These are all equivalent\npanel.getLayout().setActiveItem(card2);\npanel.getLayout().setActiveItem('card-2');\npanel.getLayout().setActiveItem(1);\n</code></pre>\n",
328         "linenr": 93,
329         "return": {
330           "type": "Ext.Component",
331           "doc": "<p>the activated component or false when nothing activated.\nFalse is returned also when trying to activate an already active card.</p>\n"
332         },
333         "html_filename": "Card.html"
334       }
335     ],
336     "property": [
337
338     ],
339     "cssVar": [
340
341     ],
342     "cssMixin": [
343
344     ],
345     "event": [
346
347     ]
348   },
349   "singleton": false,
350   "alias": null,
351   "superclasses": [
352     "Ext.layout.Layout",
353     "Ext.layout.container.AbstractContainer",
354     "Ext.layout.container.Container",
355     "Ext.layout.container.AbstractFit",
356     "Ext.layout.container.Fit",
357     "Ext.layout.container.AbstractCard"
358   ],
359   "protected": false,
360   "tagname": "class",
361   "mixins": [
362
363   ],
364   "href": "Card.html#Ext-layout-container-Card",
365   "subclasses": [
366
367   ],
368   "static": false,
369   "author": null,
370   "component": false,
371   "filename": "/mnt/ebs/nightly/git/SDK/extjs/src/layout/container/Card.js",
372   "private": false,
373   "alternateClassNames": [
374     "Ext.layout.CardLayout"
375   ],
376   "name": "Ext.layout.container.Card",
377   "doc": "<p>This layout manages multiple child Components, each fitted to the Container, where only a single child Component can be\nvisible at any given time.  This layout style is most commonly used for wizards, tab implementations, etc.\nThis class is intended to be extended or created via the layout:'card' <a href=\"#/api/Ext.container.Container-cfg-layout\" rel=\"Ext.container.Container-cfg-layout\" class=\"docClass\">Ext.container.Container.layout</a> config,\nand should generally not need to be created directly via the new keyword.</p>\n\n<p>The CardLayout's focal method is <a href=\"#/api/Ext.layout.container.Card-method-setActiveItem\" rel=\"Ext.layout.container.Card-method-setActiveItem\" class=\"docClass\">setActiveItem</a>.  Since only one panel is displayed at a time,\nthe only way to move from one Component to the next is by calling setActiveItem, passing the id or index of\nthe next panel to display.  The layout itself does not provide a user interface for handling this navigation,\nso that functionality must be provided by the developer.</p>\n\n<p>In the following example, a simplistic wizard setup is demonstrated.  A button bar is added\nto the footer of the containing panel to provide navigation buttons.  The buttons will be handled by a\ncommon navigation routine.  Note that other uses of a CardLayout (like a tab control) would require a\ncompletely different implementation.  For serious implementations, a better approach would be to extend\nCardLayout to provide the custom functionality needed.</p>\n\n<p><p><img src=\"doc-resources/Ext.layout.container.Card/Ext.layout.container.Card.png\" alt=\"Ext.layout.container.Card container layout\"></p></p>\n\n<p>Example usage:</p>\n\n<pre><code>var navigate = function(panel, direction){\n    // This routine could contain business logic required to manage the navigation steps.\n    // It would call setActiveItem as needed, manage navigation button state, handle any\n    // branching logic that might be required, handle alternate actions like cancellation\n    // or finalization, etc.  A complete wizard implementation could get pretty\n    // sophisticated depending on the complexity required, and should probably be\n    // done as a subclass of CardLayout in a real-world implementation.\n    var layout = panel.getLayout();\n    layout[direction]();\n    Ext.getCmp('move-prev').setDisabled(!layout.getPrev());\n    Ext.getCmp('move-next').setDisabled(!layout.getNext());\n};\n\nExt.create('Ext.panel.Panel', {\n    title: 'Example Wizard',\n    width: 300,\n    height: 200,\n    layout: 'card',\n    activeItem: 0, // make sure the active item is set on the container config!\n    bodyStyle: 'padding:15px',\n    defaults: {\n        // applied to each contained panel\n        border: false\n    },\n    // just an example of one possible navigation scheme, using buttons\n    bbar: [\n        {\n            id: 'move-prev',\n            text: 'Back',\n            handler: function(btn) {\n                navigate(btn.up(\"panel\"), \"prev\");\n            },\n            disabled: true\n        },\n        '-&gt;', // greedy spacer so that the buttons are aligned to each side\n        {\n            id: 'move-next',\n            text: 'Next',\n            handler: function(btn) {\n                navigate(btn.up(\"panel\"), \"next\");\n            }\n        }\n    ],\n    // the panels (or \"cards\") within the layout\n    items: [{\n        id: 'card-0',\n        html: '&lt;h1&gt;Welcome to the Wizard!&lt;/h1&gt;&lt;p&gt;Step 1 of 3&lt;/p&gt;'\n    },{\n        id: 'card-1',\n        html: '&lt;p&gt;Step 2 of 3&lt;/p&gt;'\n    },{\n        id: 'card-2',\n        html: '&lt;h1&gt;Congratulations!&lt;/h1&gt;&lt;p&gt;Step 3 of 3 - Complete&lt;/p&gt;'\n    }],\n    renderTo: Ext.getBody()\n});\n</code></pre>\n",
378   "mixedInto": [
379
380   ],
381   "linenr": 1,
382   "xtypes": [
383
384   ],
385   "html_filename": "Card.html",
386   "extends": "Ext.layout.container.AbstractCard"
387 });