Upgrade to ExtJS 4.0.1 - Released 05/18/2011
[extjs.git] / docs / output / Ext.layout.container.Anchor.js
1 Ext.data.JsonP.Ext_layout_container_Anchor({
2   "tagname": "class",
3   "name": "Ext.layout.container.Anchor",
4   "doc": "<p>This is a layout that enables anchoring of contained elements relative to the container's dimensions.\nIf the container is resized, all anchored items are automatically rerendered according to their\n<b><tt><a href=\"#/api/Ext.layout.container.Anchor-cfg-anchor\" rel=\"Ext.layout.container.Anchor-cfg-anchor\" class=\"docClass\">anchor</a></tt></b> rules.</p>\n\n<p>This class is intended to be extended or created via the layout: 'anchor' <a href=\"#/api/Ext.layout.container.AbstractContainer--layout\" rel=\"Ext.layout.container.AbstractContainer--layout\" class=\"docClass\">Ext.layout.container.AbstractContainer.layout</a>\nconfig, and should generally not need to be created directly via the new keyword.</p></p>\n\n<p>AnchorLayout does not have any direct config options (other than inherited ones). By default,\nAnchorLayout will calculate anchor measurements based on the size of the container itself. However, the\ncontainer using the AnchorLayout can supply an anchoring-specific config property of <b>anchorSize</b>.\nIf anchorSize is specifed, the layout will use it as a virtual container for the purposes of calculating\nanchor measurements based on it instead, allowing the container to be sized independently of the anchoring\nlogic if necessary.</p>\n\n<p><p><img src=\"doc-resources/Ext.layout.container.Anchor/Ext.layout.container.Anchor.png\" alt=\"Ext.layout.container.Anchor container layout\"></p></p>\n\n<p>For example:</p>\n\n<pre><code>Ext.create('Ext.Panel', {\n    width: 500,\n    height: 400,\n    title: \"AnchorLayout Panel\",\n    layout: 'anchor',\n    renderTo: Ext.getBody(),\n    items: [{\n        xtype: 'panel',\n        title: '75% Width and 20% Height',\n        anchor: '75% 20%'\n    },{\n        xtype: 'panel',\n        title: 'Offset -300 Width &amp; -200 Height',\n        anchor: '-300 -200'     \n    },{\n        xtype: 'panel',\n        title: 'Mixed Offset and Percent',\n        anchor: '-250 20%'\n    }]\n});\n</code></pre>\n",
5   "extends": "Ext.layout.container.Container",
6   "mixins": [
7
8   ],
9   "alternateClassNames": [
10     "Ext.layout.AnchorLayout"
11   ],
12   "xtype": null,
13   "author": null,
14   "docauthor": null,
15   "singleton": false,
16   "private": false,
17   "cfg": [
18     {
19       "tagname": "cfg",
20       "name": "anchor",
21       "member": "Ext.layout.container.Anchor",
22       "type": "String",
23       "doc": "<p>This configuation option is to be applied to <b>child <tt>items</tt></b> of a container managed by\nthis layout (ie. configured with <tt>layout:'anchor'</tt>).</p>\n\n\n<br/>\n\n\n\n\n<p>This value is what tells the layout how an item should be anchored to the container. <tt>items</tt>\nadded to an AnchorLayout accept an anchoring-specific config property of <b>anchor</b> which is a string\ncontaining two values: the horizontal anchor value and the vertical anchor value (for example, '100% 50%').\nThe following types of anchor values are supported:<div class=\"mdetail-params\"><ul>\n\n<li><b>Percentage</b> : Any value between 1 and 100, expressed as a percentage.<div class=\"sub-desc\">\nThe first anchor is the percentage width that the item should take up within the container, and the\nsecond is the percentage height.  For example:\n<pre><code>// two values specified\nanchor: '100% 50%' // render item complete width of the container and\n                   // 1/2 height of the container\n// one value specified\nanchor: '100%'     // the width value; the height will default to auto\n</code></pre></div></li>\n\n<li><b>Offsets</b> : Any positive or negative integer value.<div class=\"sub-desc\">\nThis is a raw adjustment where the first anchor is the offset from the right edge of the container,\nand the second is the offset from the bottom edge. For example:\n<pre><code>// two values specified\nanchor: '-50 -100' // render item the complete width of the container\n                   // minus 50 pixels and\n                   // the complete height minus 100 pixels.\n// one value specified\nanchor: '-50'      // anchor value is assumed to be the right offset value\n                   // bottom offset will default to 0\n</code></pre></div></li>\n\n<li><b>Sides</b> : Valid values are <tt>'right'</tt> (or <tt>'r'</tt>) and <tt>'bottom'</tt>\n(or <tt>'b'</tt>).<div class=\"sub-desc\">\nEither the container must have a fixed size or an anchorSize config value defined at render time in\norder for these to have any effect.</div></li>\n\n<li><b>Mixed</b> : <div class=\"sub-desc\">\nAnchor values can also be mixed as needed.  For example, to render the width offset from the container\nright edge by 50 pixels and 75% of the container's height use:\n<pre><code>anchor: '-50 75%'\n</code></pre></div></li>\n\n\n</ul></div>\n\n",
24       "private": false,
25       "filename": "/Users/nick/Projects/sencha/SDK/extjs/src/layout/container/Anchor.js",
26       "linenr": 54,
27       "html_filename": "Anchor.html",
28       "href": "Anchor.html#Ext-layout-container-Anchor-cfg-anchor",
29       "shortDoc": "This configuation option is to be applied to child items of a container managed by\nthis layout (ie. configured with l..."
30     },
31     {
32       "tagname": "cfg",
33       "name": "bindToOwnerCtComponent",
34       "member": "Ext.layout.container.AbstractContainer",
35       "type": "Boolean",
36       "doc": "<p>Flag to notify the ownerCt Component on afterLayout of a change</p>\n",
37       "private": false,
38       "filename": "/Users/nick/Projects/sencha/SDK/platform/src/layout/container/AbstractContainer.js",
39       "linenr": 24,
40       "html_filename": "AbstractContainer2.html",
41       "href": "AbstractContainer2.html#Ext-layout-container-AbstractContainer-cfg-bindToOwnerCtComponent"
42     },
43     {
44       "tagname": "cfg",
45       "name": "bindToOwnerCtContainer",
46       "member": "Ext.layout.container.AbstractContainer",
47       "type": "Boolean",
48       "doc": "<p>Flag to notify the ownerCt Container on afterLayout of a change</p>\n",
49       "private": false,
50       "filename": "/Users/nick/Projects/sencha/SDK/platform/src/layout/container/AbstractContainer.js",
51       "linenr": 30,
52       "html_filename": "AbstractContainer2.html",
53       "href": "AbstractContainer2.html#Ext-layout-container-AbstractContainer-cfg-bindToOwnerCtContainer"
54     },
55     {
56       "tagname": "cfg",
57       "name": "defaultAnchor",
58       "member": "Ext.layout.container.Anchor",
59       "type": "String",
60       "doc": "<p>default anchor for all child container items applied if no anchor or specific width is set on the child item.  Defaults to '100%'.</p>\n",
61       "private": false,
62       "filename": "/Users/nick/Projects/sencha/SDK/extjs/src/layout/container/Anchor.js",
63       "linenr": 104,
64       "html_filename": "Anchor.html",
65       "href": "Anchor.html#Ext-layout-container-Anchor-cfg-defaultAnchor",
66       "shortDoc": "default anchor for all child container items applied if no anchor or specific width is set on the child item.  Defaul..."
67     },
68     {
69       "tagname": "cfg",
70       "name": "itemCls",
71       "member": "Ext.layout.container.AbstractContainer",
72       "type": "String",
73       "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>.<a href=\"#/api/Ext.Component--ctCls\" rel=\"Ext.Component--ctCls\" class=\"docClass\">ctCls</a> also.</p>\n\n\n<p></p></p>\n",
74       "private": false,
75       "filename": "/Users/nick/Projects/sencha/SDK/platform/src/layout/container/AbstractContainer.js",
76       "linenr": 36,
77       "html_filename": "AbstractContainer2.html",
78       "href": "AbstractContainer2.html#Ext-layout-container-AbstractContainer-cfg-itemCls",
79       "shortDoc": "An optional extra CSS class that will be added to the container. This can be useful for adding\ncustomized styles to t..."
80     }
81   ],
82   "method": [
83     {
84       "tagname": "method",
85       "name": "getLayoutItems",
86       "member": "Ext.layout.container.AbstractContainer",
87       "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",
88       "params": [
89
90       ],
91       "return": {
92         "type": "Array",
93         "doc": "<p>of child components</p>\n"
94       },
95       "private": false,
96       "static": false,
97       "filename": "/Users/nick/Projects/sencha/SDK/platform/src/layout/container/AbstractContainer.js",
98       "linenr": 87,
99       "html_filename": "AbstractContainer2.html",
100       "href": "AbstractContainer2.html#Ext-layout-container-AbstractContainer-method-getLayoutItems",
101       "shortDoc": "Returns an array of child components either for a render phase (Performed in the beforeLayout method of the layout's\n..."
102     },
103     {
104       "tagname": "method",
105       "name": "getRenderTarget",
106       "member": "Ext.layout.container.AbstractContainer",
107       "doc": "<p>Returns the element into which rendering must take place. Defaults to the owner Container's <a href=\"#/api/Ext.AbstractComponent--targetEl\" rel=\"Ext.AbstractComponent--targetEl\" class=\"docClass\">Ext.AbstractComponent.targetEl</a>.</p>\n\n\n<p>May be overridden in layout managers which implement an inner element.</p>\n",
108       "params": [
109
110       ],
111       "return": {
112         "type": "Ext.core.Element",
113         "doc": "\n"
114       },
115       "private": false,
116       "static": false,
117       "filename": "/Users/nick/Projects/sencha/SDK/platform/src/layout/container/AbstractContainer.js",
118       "linenr": 106,
119       "html_filename": "AbstractContainer2.html",
120       "href": "AbstractContainer2.html#Ext-layout-container-AbstractContainer-method-getRenderTarget",
121       "shortDoc": "Returns the element into which rendering must take place. Defaults to the owner Container's Ext.AbstractComponent.tar..."
122     },
123     {
124       "tagname": "method",
125       "name": "getTarget",
126       "member": "Ext.layout.container.AbstractContainer",
127       "doc": "<p>Returns the owner component's resize element.</p>\n",
128       "params": [
129
130       ],
131       "return": {
132         "type": "Ext.core.Element",
133         "doc": "\n"
134       },
135       "private": false,
136       "static": false,
137       "filename": "/Users/nick/Projects/sencha/SDK/platform/src/layout/container/AbstractContainer.js",
138       "linenr": 99,
139       "html_filename": "AbstractContainer2.html",
140       "href": "AbstractContainer2.html#Ext-layout-container-AbstractContainer-method-getTarget",
141       "shortDoc": "<p>Returns the owner component's resize element.</p>\n"
142     }
143   ],
144   "property": [
145
146   ],
147   "event": [
148
149   ],
150   "filename": "/Users/nick/Projects/sencha/SDK/extjs/src/layout/container/Anchor.js",
151   "linenr": 1,
152   "html_filename": "Anchor.html",
153   "href": "Anchor.html#Ext-layout-container-Anchor",
154   "cssVar": [
155
156   ],
157   "cssMixin": [
158
159   ],
160   "component": false,
161   "superclasses": [
162     "Ext.layout.Layout",
163     "Ext.layout.container.AbstractContainer",
164     "Ext.layout.container.Container"
165   ],
166   "subclasses": [
167     "Ext.layout.container.Absolute"
168   ],
169   "mixedInto": [
170
171   ],
172   "allMixins": [
173
174   ]
175 });