~ubuntu-branches/ubuntu/natty/otrs2/natty-updates

« back to all changes in this revision

Viewing changes to var/httpd/htdocs/yui/2.7.0/as-docs/com/yahoo/astra/layout/LayoutContainer.html

  • Committer: Package Import Robot
  • Author(s): Patrick Matthäi
  • Date: 2010-08-09 19:43:44 UTC
  • mfrom: (1.1.12)
  • Revision ID: package-import@ubuntu.com-20100809194344-absef1ut5mfj3qhv
Tags: 2.4.7+dfsg1-1
* Strip out yui from the source in the dfsg version.
  Closes: #591196
* Depend on libjs-yui and link to this package, instead of using the embedded
  yui version. This changes make the flash ticket statistics unuseable!
  Closes: #592146

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2
 
<html>
3
 
<head>
4
 
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
 
<link rel="stylesheet" href="../../../../style.css" type="text/css" media="screen">
6
 
<link rel="stylesheet" href="../../../../print.css" type="text/css" media="print">
7
 
<meta content="LayoutContainer,com.yahoo.astra.layout.LayoutContainer,autoMask,contentHeight,contentWidth,layoutMode,invalidateLayout,validateLayout" name="keywords">
8
 
<title>com.yahoo.astra.layout.LayoutContainer</title>
9
 
</head>
10
 
<body>
11
 
<script type="text/javascript" language="javascript" src="../../../../asdoc.js"></script><script type="text/javascript" language="javascript" src="../../../../cookies.js"></script><script type="text/javascript" language="javascript">
12
 
<!--
13
 
                                asdocTitle = 'LayoutContainer - YUI Flash Component Documentation';
14
 
                                var baseRef = '../../../../';
15
 
                                window.onload = configPage;
16
 
                        --></script>
17
 
<table style="display:none" id="titleTable" cellspacing="0" cellpadding="0" class="titleTable">
18
 
<tr>
19
 
<td align="left" class="titleTableTitle">YUI Flash Component Documentation</td><td align="right" class="titleTableTopNav"><a onclick="loadClassListFrame('../../../../all-classes.html')" href="../../../../package-summary.html">All&nbsp;Packages</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../../../all-classes.html')" href="../../../../class-summary.html">All&nbsp;Classes</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../../../index-list.html')" href="../../../../all-index-A.html">Index</a>&nbsp;|&nbsp;<a href="../../../../index.html?com/yahoo/astra/layout/LayoutContainer.html&amp;com/yahoo/astra/layout/class-list.html" id="framesLink1">Frames</a><a onclick="parent.location=document.location" href="" style="display:none" id="noFramesLink1">No&nbsp;Frames</a></td><td rowspan="3" align="right" class="titleTableLogo"><img alt="Adobe Logo" title="Adobe Logo" class="logoImage" src="../../../../images/logo.jpg"></td>
20
 
</tr>
21
 
<tr class="titleTableRow2">
22
 
<td align="left" id="subTitle" class="titleTableSubTitle">Class&nbsp;LayoutContainer</td><td align="right" id="subNav" class="titleTableSubNav"><a href="#propertySummary">Properties</a>&nbsp;| <a href="#methodSummary">Methods</a>&nbsp;| <a href="#eventSummary">Events</a></td>
23
 
</tr>
24
 
<tr class="titleTableRow3">
25
 
<td colspan="2">&nbsp;</td>
26
 
</tr>
27
 
</table>
28
 
<script type="text/javascript" language="javascript">
29
 
<!--
30
 
if (!isEclipse() || window.name != ECLIPSE_FRAME_NAME) {titleBar_setSubTitle("Class LayoutContainer"); titleBar_setSubNav(false,true,false,false,true,false,true,false,false,false,false,false,false,false);}
31
 
--></script>
32
 
<div class="MainContent">
33
 
<table cellspacing="0" cellpadding="0" class="classHeaderTable">
34
 
<tr>
35
 
<td class="classHeaderTableLabel">Package</td><td><a onclick="javascript:loadClassListFrame('class-list.html')" href="package-detail.html">com.yahoo.astra.layout</a></td>
36
 
</tr>
37
 
<tr>
38
 
<td class="classHeaderTableLabel">Class</td><td class="classSignature">public class LayoutContainer</td>
39
 
</tr>
40
 
<tr>
41
 
<td class="classHeaderTableLabel">Inheritance</td><td class="inheritanceList">LayoutContainer <img class="inheritArrow" alt="Inheritance" title="Inheritance" src="../../../../images/inherit-arrow.gif"> flash.display.Sprite</td>
42
 
</tr>
43
 
<tr>
44
 
<td class="classHeaderTableLabel">Implements</td><td><a href="ILayoutContainer.html">ILayoutContainer</a></td>
45
 
</tr>
46
 
</table>
47
 
<p></p>
48
 
  Children of this display object are subject to being positioned, and
49
 
  possibly resized, based on a specified layout algorithm. LayoutContainer
50
 
  integrates with LayoutManager to refresh its the layout of its children
51
 
  when properties on the container itself change or when one of its
52
 
  children dispatches a registered invalidating event. This is the default
53
 
  implementation of ILayoutContainer.
54
 
  
55
 
  <p></p>
56
 
<br>
57
 
<span class="label">Example</span>
58
 
<br>The following code demonstrates the usage of LayoutContainer:
59
 
  <div class='listing'><pre>
60
 
  // create an instance of a layout mode
61
 
  var mode:ILayoutMode = new BoxLayout();
62
 
  mode.direction = "horizontal";
63
 
  mode.horizontalGap = 10;
64
 
  
65
 
  // one may pass the mode to the constructor or the layoutMode property.
66
 
  // note: by default, a LayoutContainer will automatically determine
67
 
  // its size based on its content.
68
 
  var container:LayoutContainer = new LayoutContainer( mode );
69
 
  this.addChild(container);
70
 
  
71
 
  for( var i:int = 0; i < 5; i++ )
72
 
  {
73
 
      var square:Shape = new Shape();
74
 
      square.graphics.beginFill(0xcccccc);
75
 
      square.graphics.drawRect(0, 0, 25, 25);
76
 
      square.graphics.endFill();
77
 
      container.addChild(square);
78
 
  }
79
 
  </pre></div>
80
 
  
81
 
  <p><strong>Important Note:</strong> LayoutContainer leaves certain
82
 
  functionality to the implementor to complete. No scrollbars or other user
83
 
  interface controls will appear when the contents are larger than the
84
 
  LayoutContainer's dimensions.</p>
85
 
  
86
 
  <p>This limitation is deliberate and by design. The philosophy behind
87
 
  this choice centers on allowing an ActionScript developer to use these
88
 
  classes as a basis for implementing layout controls for nearly any user
89
 
  interface library available for Flash Player.</p>
90
 
  
91
 
  <p>For a reference implementation of full-featured UI controls that
92
 
  implement masking and scrolling, please take a look at the Layout
93
 
  Containers available in the <a href="http://developer.yahoo.com/flash/astra-flash/">Yahoo! Astra Components for Flash CS3</a>.</p> 
94
 
  
95
 
  <p></p>
96
 
<p>
97
 
<span class="classHeaderTableLabel">See also</span>
98
 
</p>
99
 
<div class="seeAlso">
100
 
<a href="LayoutManager.html" target="">LayoutManager</a>
101
 
<br>
102
 
<a href="ILayoutContainer.html" target="">ILayoutContainer</a>
103
 
<br>
104
 
<a href="modes/package-detail.html" target="">Available Layout Modes (com.yahoo.astra.layout.modes)</a>
105
 
</div>
106
 
<br>
107
 
<hr>
108
 
</div>
109
 
<a name="propertySummary"></a>
110
 
<div class="summarySection">
111
 
<div class="summaryTableTitle">Public Properties</div>
112
 
<table id="summaryTableProperty" class="summaryTable " cellpadding="3" cellspacing="0">
113
 
<tr>
114
 
<th>&nbsp;</th><th colspan="2">Property</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
115
 
</tr>
116
 
<tr class="">
117
 
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#autoMask">autoMask</a> : Boolean<div class="summaryTableDescription">
118
 
   If true, the conent will automatically update the scrollRect to fit
119
 
   the dimensions.</div>
120
 
</td><td class="summaryTableOwnerCol">LayoutContainer</td>
121
 
</tr>
122
 
<tr class="">
123
 
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#contentHeight">contentHeight</a> : Number<div class="summaryTableDescription">[read-only]
124
 
   
125
 
   The height of the content displayed by the layout container.</div>
126
 
</td><td class="summaryTableOwnerCol">LayoutContainer</td>
127
 
</tr>
128
 
<tr class="">
129
 
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#contentWidth">contentWidth</a> : Number<div class="summaryTableDescription">[read-only]
130
 
   
131
 
   The width of the content displayed by the layout container.</div>
132
 
</td><td class="summaryTableOwnerCol">LayoutContainer</td>
133
 
</tr>
134
 
<tr class="">
135
 
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#layoutMode">layoutMode</a> : <a href="modes/ILayoutMode.html">ILayoutMode</a>
136
 
<div class="summaryTableDescription">
137
 
   
138
 
   The layout algorithm used to display children of the layout container.</div>
139
 
</td><td class="summaryTableOwnerCol">LayoutContainer</td>
140
 
</tr>
141
 
</table>
142
 
</div>
143
 
<a name="methodSummary"></a>
144
 
<div class="summarySection">
145
 
<div class="summaryTableTitle">Public Methods</div>
146
 
<table id="summaryTableMethod" class="summaryTable " cellpadding="3" cellspacing="0">
147
 
<tr>
148
 
<th>&nbsp;</th><th colspan="2">Method</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
149
 
</tr>
150
 
<tr class="">
151
 
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
152
 
<div class="summarySignature">
153
 
<a class="signatureLink" href="#LayoutContainer()">LayoutContainer</a>(mode:<a href="modes/ILayoutMode.html">ILayoutMode</a> = null)</div>
154
 
<div class="summaryTableDescription">
155
 
   Constructor.</div>
156
 
</td><td class="summaryTableOwnerCol">LayoutContainer</td>
157
 
</tr>
158
 
<tr class="">
159
 
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
160
 
<div class="summarySignature">
161
 
<a class="signatureLink" href="#invalidateLayout()">invalidateLayout</a>():void</div>
162
 
<div class="summaryTableDescription">
163
 
   
164
 
   Informs the layout container that it should update the layout of its
165
 
   children.</div>
166
 
</td><td class="summaryTableOwnerCol">LayoutContainer</td>
167
 
</tr>
168
 
<tr class="">
169
 
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
170
 
<div class="summarySignature">
171
 
<a class="signatureLink" href="#validateLayout()">validateLayout</a>():void</div>
172
 
<div class="summaryTableDescription">
173
 
   
174
 
   Immediately updates the layout of the container's children.</div>
175
 
</td><td class="summaryTableOwnerCol">LayoutContainer</td>
176
 
</tr>
177
 
</table>
178
 
</div>
179
 
<a name="eventSummary"></a>
180
 
<div class="summarySection">
181
 
<div class="summaryTableTitle">Events</div>
182
 
<table id="summaryTableEvent" class="summaryTable " cellpadding="3" cellspacing="0">
183
 
<tr>
184
 
<th>&nbsp;</th><th colspan="2">Event</th><th>Summary</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
185
 
</tr>
186
 
<tr class="">
187
 
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
188
 
<div class="summarySignature">
189
 
<a class="signatureLink" href="#event:layoutChange">layoutChange</a>
190
 
</div>
191
 
</td><td class="summaryTableDescription summaryTableCol">
192
 
   Dispatched when this container's layout changes.</td><td class="summaryTableOwnerCol">LayoutContainer</td>
193
 
</tr>
194
 
</table>
195
 
</div>
196
 
<script type="text/javascript" language="javascript">
197
 
<!--
198
 
showHideInherited();
199
 
--></script>
200
 
<div class="MainContent">
201
 
<a name="propertyDetail"></a>
202
 
<div class="detailSectionHeader">Property detail</div>
203
 
<a name="autoMask"></a>
204
 
<table cellspacing="0" cellpadding="0" class="detailHeader">
205
 
<tr>
206
 
<td class="detailHeaderName">autoMask</td><td class="detailHeaderType">property</td>
207
 
</tr>
208
 
</table>
209
 
<div class="detailBody">
210
 
<code>autoMask:Boolean</code>&nbsp;&nbsp;[read-write]<p>
211
 
   If true, the conent will automatically update the scrollRect to fit
212
 
   the dimensions. Uses explicit dimensions if width or height is set by
213
 
   the developer. Otherwise, uses the content dimensions. If false, it
214
 
   is up to the implementor to set the mask or scrollRect.
215
 
   </p><span class="label">Implementation</span>
216
 
<br>
217
 
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function get autoMask():Boolean</code>
218
 
<br>
219
 
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function set autoMask(value:Boolean):void</code>
220
 
<br>
221
 
</div>
222
 
<a name="contentHeight"></a>
223
 
<table cellspacing="0" cellpadding="0" class="detailHeader">
224
 
<tr>
225
 
<td class="detailHeaderName">contentHeight</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
226
 
</tr>
227
 
</table>
228
 
<div class="detailBody">
229
 
<code>contentHeight:Number</code>&nbsp;&nbsp;[read-only]<p>
230
 
   
231
 
   The height of the content displayed by the layout container.
232
 
   </p><span class="label">Implementation</span>
233
 
<br>
234
 
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function get contentHeight():Number</code>
235
 
<br>
236
 
</div>
237
 
<a name="contentWidth"></a>
238
 
<table cellspacing="0" cellpadding="0" class="detailHeader">
239
 
<tr>
240
 
<td class="detailHeaderName">contentWidth</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
241
 
</tr>
242
 
</table>
243
 
<div class="detailBody">
244
 
<code>contentWidth:Number</code>&nbsp;&nbsp;[read-only]<p>
245
 
   
246
 
   The width of the content displayed by the layout container.
247
 
   </p><span class="label">Implementation</span>
248
 
<br>
249
 
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function get contentWidth():Number</code>
250
 
<br>
251
 
</div>
252
 
<a name="layoutMode"></a>
253
 
<table cellspacing="0" cellpadding="0" class="detailHeader">
254
 
<tr>
255
 
<td class="detailHeaderName">layoutMode</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
256
 
</tr>
257
 
</table>
258
 
<div class="detailBody">
259
 
<code>layoutMode:<a href="modes/ILayoutMode.html">ILayoutMode</a></code>&nbsp;&nbsp;[read-write]<p>
260
 
   
261
 
   The layout algorithm used to display children of the layout container.
262
 
   
263
 
   </p><span class="label">Implementation</span>
264
 
<br>
265
 
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function get layoutMode():<a href="modes/ILayoutMode.html">ILayoutMode</a></code>
266
 
<br>
267
 
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function set layoutMode(value:<a href="modes/ILayoutMode.html">ILayoutMode</a>):void</code>
268
 
<br>
269
 
</div>
270
 
<a name="constructorDetail"></a>
271
 
<div class="detailSectionHeader">Constructor detail</div>
272
 
<a name="LayoutContainer()"></a>
273
 
<table cellspacing="0" cellpadding="0" class="detailHeader">
274
 
<tr>
275
 
<td class="detailHeaderName">LayoutContainer</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">constructor</td>
276
 
</tr>
277
 
</table>
278
 
<div class="detailBody">
279
 
<code>public function LayoutContainer(mode:<a href="modes/ILayoutMode.html">ILayoutMode</a> = null)</code><p>
280
 
   Constructor.
281
 
   
282
 
   </p><span class="label">Parameters</span>
283
 
<table border="0" cellspacing="0" cellpadding="0">
284
 
<tr>
285
 
<td width="20px"></td><td><code><span class="label">mode</span>:<a href="modes/ILayoutMode.html">ILayoutMode</a></code> (default = <code>null</code>)<code></code> &mdash;  The ILayoutMode implementation to use.
286
 
   </td>
287
 
</tr>
288
 
</table>
289
 
</div>
290
 
<a name="methodDetail"></a>
291
 
<div class="detailSectionHeader">Method detail</div>
292
 
<a name="invalidateLayout()"></a>
293
 
<table cellspacing="0" cellpadding="0" class="detailHeader">
294
 
<tr>
295
 
<td class="detailHeaderName">invalidateLayout</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td>
296
 
</tr>
297
 
</table>
298
 
<div class="detailBody">
299
 
<code>public function invalidateLayout():void</code><p>
300
 
   
301
 
   Informs the layout container that it should update the layout of its
302
 
   children.
303
 
   </p></div>
304
 
<a name="validateLayout()"></a>
305
 
<table cellspacing="0" cellpadding="0" class="detailHeader">
306
 
<tr>
307
 
<td class="detailHeaderName">validateLayout</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
308
 
</tr>
309
 
</table>
310
 
<div class="detailBody">
311
 
<code>public function validateLayout():void</code><p>
312
 
   
313
 
   Immediately updates the layout of the container's children.
314
 
   </p></div>
315
 
<div class="detailSectionHeader">Event detail</div>
316
 
<a name="event:layoutChange"></a>
317
 
<table cellspacing="0" cellpadding="0" class="detailHeader">
318
 
<tr>
319
 
<td class="detailHeaderName">layoutChange</td><td class="detailHeaderType">event&nbsp;</td>
320
 
</tr>
321
 
</table>
322
 
<div class="detailBody">
323
 
<span class="label">Event object type: </span><a href="events/LayoutEvent.html"><code>com.yahoo.astra.layout.events.LayoutEvent</code></a>
324
 
<br>
325
 
<span class="label">LayoutEvent.type property = </span><a href="events/LayoutEvent.html#LAYOUT_CHANGE"><code>com.yahoo.astra.layout.events.LayoutEvent.LAYOUT_CHANGE</code></a>
326
 
<br><p>
327
 
   Dispatched when this container's layout changes.
328
 
     </p><p>
329
 
   The <code>LayoutEvent.LAYOUT_CHANGE</code> event type constant indicates that
330
 
   the layout of an ILayoutContainer needs to be redrawn.
331
 
   
332
 
   </p></div>
333
 
<br>
334
 
<br>
335
 
<hr>
336
 
<br>
337
 
<p></p>
338
 
<center class="copyright"> 
339
 
</center>
340
 
</div>
341
 
</body>
342
 
</html>
343
 
<!-- -->