<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: The FlowBox</title>
	<atom:link href="http://www.addicted2flash.com/2008/11/the-flowlayout/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.addicted2flash.com/2008/11/the-flowlayout/</link>
	<description>tim richter</description>
	<lastBuildDate>Fri, 20 Aug 2010 06:53:37 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
	<item>
		<title>By: tim</title>
		<link>http://www.addicted2flash.com/2008/11/the-flowlayout/comment-page-1/#comment-55</link>
		<dc:creator>tim</dc:creator>
		<pubDate>Thu, 28 Jan 2010 14:57:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.addicted2flash.com/?p=264#comment-55</guid>
		<description>Hi Gernot,
first of all thanks for your post.
The alignment of components depends on the container you use. The application class configured with &lt;code&gt;ABSOLUTE&lt;/code&gt; constraint uses &lt;code&gt;CanvasLayout&lt;/code&gt; internally. This layout is meant to layout all components absolute using &lt;code&gt;CanvasLayoutConstraint&lt;/code&gt;. With this class you can specify absolute spacing from the component to the bounds of the container. But it does &lt;b&gt;not&lt;/b&gt; use the alignment settings.</description>
		<content:encoded><![CDATA[<p>Hi Gernot,<br />
first of all thanks for your post.<br />
The alignment of components depends on the container you use. The application class configured with <code>ABSOLUTE</code> constraint uses <code>CanvasLayout</code> internally. This layout is meant to layout all components absolute using <code>CanvasLayoutConstraint</code>. With this class you can specify absolute spacing from the component to the bounds of the container. But it does <b>not</b> use the alignment settings.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gernot</title>
		<link>http://www.addicted2flash.com/2008/11/the-flowlayout/comment-page-1/#comment-54</link>
		<dc:creator>Gernot</dc:creator>
		<pubDate>Wed, 27 Jan 2010 15:36:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.addicted2flash.com/?p=264#comment-54</guid>
		<description>Here&#039;s a short example what  I mean. The problem is the page class:

package
{
	import com.addicted2flash.layout.component.Application;
	import com.addicted2flash.layout.component.FlowBox;
	import com.addicted2flash.layout.util.Alignment;
	import com.addicted2flash.layout.util.Flow;

	/**
	 * ...
	 * @author Gernot Cseh
	 */
	[SWF(backgroundColor=&quot;#650000&quot;,width=&quot;800&quot;,height=&quot;600&quot;,frameRate=&quot;60&quot;)]
	public class Main extends Application
	{
		private var _page : Page;

		public function Main() : void
		{
			super( ABSOLUTE );

			_page = new Page();
			_page.getRegion(Page.NORTH).add( new SimpleComponent( 830, 200 ) );
			_page.getRegion(Page.WEST).add( new SimpleComponent( 250, 500 ) );
			_page.getRegion(Page.WEST).add( new SimpleComponent( 250, 250 ) );
			_page.getRegion(Page.SOUTH).add( new SimpleComponent( 750, 200 ) );
			_page.getRegion(Page.EAST).add( new SimpleComponent( 500, 250 ) );

			container.add( _page );
		}
	}
}


import com.addicted2flash.layout.component.FlowBox;
import com.addicted2flash.layout.component.HBox;
import com.addicted2flash.layout.component.VBox;
import com.addicted2flash.layout.core.Container;
import com.addicted2flash.layout.strategy.ILayout;
import com.addicted2flash.layout.util.Alignment;
import com.addicted2flash.layout.util.Flow;
import de.polygonal.ds.Vector;
import flash.display.Sprite;
import flash.utils.Dictionary;

internal class Page extends FlowBox {

	public static const NORTH : int = 0x01;
	public static const EAST : int  = 0x02;
	public static const SOUTH : int = 0x04;
	public static const WEST : int  = 0x08;
	
	protected var _regions : Dictionary = new Dictionary(true);
	
	public function Page()
	{
		super( Flow.LEFT_TO_RIGHT, Alignment.TOP &#124; Alignment.CENTER ); // here&#039;s the problem... do I have to do Alignment.TOP &#124; Alignment.CENTER ???

		desiredWidth         = 750;
		desiredPercentHeight = 1;
		
		
		setupRegions();
	}
	
	protected function setupRegions() : void
	{
		var northRegion : HBox = new HBox();
		northRegion.desiredWidth = 750;
		northRegion.maximumWidth = 750;
		
		var eastRegion : VBox = new VBox();
		eastRegion.desiredWidth = 500;
		eastRegion.maximumWidth = 500;
		
		var southRegion : HBox = new HBox();
		southRegion.desiredWidth = 750;
		southRegion.maximumWidth = 750;
		
		var westRegion : VBox = new VBox();
		westRegion.desiredWidth = 250;
		westRegion.maximumWidth = 250;
		
		addRegion(NORTH, northRegion);
		addRegion(WEST,  westRegion);
		addRegion(EAST,  eastRegion);
		addRegion(SOUTH, southRegion);	
	}
	
	public function addRegion(label:int, region:Container) : void
	{
		add(region);
		
		_regions[label] = region;
	}
	
	public function getRegion(label:int) : Container
	{
		return _regions[label] as Container;
	}

}</description>
		<content:encoded><![CDATA[<p>Here&#8217;s a short example what  I mean. The problem is the page class:</p>
<p>package<br />
{<br />
	import com.addicted2flash.layout.component.Application;<br />
	import com.addicted2flash.layout.component.FlowBox;<br />
	import com.addicted2flash.layout.util.Alignment;<br />
	import com.addicted2flash.layout.util.Flow;</p>
<p>	/**<br />
	 * &#8230;<br />
	 * @author Gernot Cseh<br />
	 */<br />
	[SWF(backgroundColor="#650000",width="800",height="600",frameRate="60")]<br />
	public class Main extends Application<br />
	{<br />
		private var _page : Page;</p>
<p>		public function Main() : void<br />
		{<br />
			super( ABSOLUTE );</p>
<p>			_page = new Page();<br />
			_page.getRegion(Page.NORTH).add( new SimpleComponent( 830, 200 ) );<br />
			_page.getRegion(Page.WEST).add( new SimpleComponent( 250, 500 ) );<br />
			_page.getRegion(Page.WEST).add( new SimpleComponent( 250, 250 ) );<br />
			_page.getRegion(Page.SOUTH).add( new SimpleComponent( 750, 200 ) );<br />
			_page.getRegion(Page.EAST).add( new SimpleComponent( 500, 250 ) );</p>
<p>			container.add( _page );<br />
		}<br />
	}<br />
}</p>
<p>import com.addicted2flash.layout.component.FlowBox;<br />
import com.addicted2flash.layout.component.HBox;<br />
import com.addicted2flash.layout.component.VBox;<br />
import com.addicted2flash.layout.core.Container;<br />
import com.addicted2flash.layout.strategy.ILayout;<br />
import com.addicted2flash.layout.util.Alignment;<br />
import com.addicted2flash.layout.util.Flow;<br />
import de.polygonal.ds.Vector;<br />
import flash.display.Sprite;<br />
import flash.utils.Dictionary;</p>
<p>internal class Page extends FlowBox {</p>
<p>	public static const NORTH : int = 0&#215;01;<br />
	public static const EAST : int  = 0&#215;02;<br />
	public static const SOUTH : int = 0&#215;04;<br />
	public static const WEST : int  = 0&#215;08;</p>
<p>	protected var _regions : Dictionary = new Dictionary(true);</p>
<p>	public function Page()<br />
	{<br />
		super( Flow.LEFT_TO_RIGHT, Alignment.TOP | Alignment.CENTER ); // here&#8217;s the problem&#8230; do I have to do Alignment.TOP | Alignment.CENTER ???</p>
<p>		desiredWidth         = 750;<br />
		desiredPercentHeight = 1;</p>
<p>		setupRegions();<br />
	}</p>
<p>	protected function setupRegions() : void<br />
	{<br />
		var northRegion : HBox = new HBox();<br />
		northRegion.desiredWidth = 750;<br />
		northRegion.maximumWidth = 750;</p>
<p>		var eastRegion : VBox = new VBox();<br />
		eastRegion.desiredWidth = 500;<br />
		eastRegion.maximumWidth = 500;</p>
<p>		var southRegion : HBox = new HBox();<br />
		southRegion.desiredWidth = 750;<br />
		southRegion.maximumWidth = 750;</p>
<p>		var westRegion : VBox = new VBox();<br />
		westRegion.desiredWidth = 250;<br />
		westRegion.maximumWidth = 250;</p>
<p>		addRegion(NORTH, northRegion);<br />
		addRegion(WEST,  westRegion);<br />
		addRegion(EAST,  eastRegion);<br />
		addRegion(SOUTH, southRegion);<br />
	}</p>
<p>	public function addRegion(label:int, region:Container) : void<br />
	{<br />
		add(region);</p>
<p>		_regions[label] = region;<br />
	}</p>
<p>	public function getRegion(label:int) : Container<br />
	{<br />
		return _regions[label] as Container;<br />
	}</p>
<p>}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gernot</title>
		<link>http://www.addicted2flash.com/2008/11/the-flowlayout/comment-page-1/#comment-53</link>
		<dc:creator>Gernot</dc:creator>
		<pubDate>Wed, 27 Jan 2010 15:33:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.addicted2flash.com/?p=264#comment-53</guid>
		<description>Hi Tim,

first i wanna thank you for your incredible layout library. It&#039;s so much fun to play with. 

I only have one question regarding the alignment of a container. Let&#039;s say want to align a FlowBox in the TOP_MIDDLE position of the stage (Application). Is there an easy way to achieve this, or do I have to edit the Alignment and FlowBox Classes. I can send you some example classes if you like.

Many, many thanks, and have a nice day,
Gernot</description>
		<content:encoded><![CDATA[<p>Hi Tim,</p>
<p>first i wanna thank you for your incredible layout library. It&#8217;s so much fun to play with. </p>
<p>I only have one question regarding the alignment of a container. Let&#8217;s say want to align a FlowBox in the TOP_MIDDLE position of the stage (Application). Is there an easy way to achieve this, or do I have to edit the Alignment and FlowBox Classes. I can send you some example classes if you like.</p>
<p>Many, many thanks, and have a nice day,<br />
Gernot</p>
]]></content:encoded>
	</item>
</channel>
</rss>
