The Canvas

Posted: May 30th, 2009 | Categories: AS3-Layout-Framework, Actionscript 3.0 | No Comments

The Canvas arranges its child components to their desired size regarding to their minimum and maximum size. It is possible to add an CanvasConstraint while adding a component to a Canvas. This constraint is an encapsulation of values used in an absolute layout (top, left, right, bottom) like in CSS.


The VBox

Posted: May 20th, 2009 | Categories: AS3-Layout-Framework, Actionscript 3.0 | 5 Comments

An Vbox arranges its child components vertically according to their desired size. If the size is is declared in percentage values, it will set the components bounds percentaged to the space left filled by fixed size components.

NOTE: percentaged values of child components are just handled if the desired size of the HBox was set explicitly.


The HBox

Posted: April 27th, 2009 | Categories: AS3-Layout-Framework, Actionscript 3.0 | 4 Comments

An Hbox arranges its child components horizontally according to their desired size. If the size is is declared in percentage values, it will set the components bounds percentaged to the space left filled by fixed size components.

NOTE: percentaged values of child components are just handled if the desired size of the HBox was set explicitly.


Fresh AS3-Layout-Framwork

Posted: April 26th, 2009 | Categories: AS3-Layout-Framework, Actionscript 3.0 | No Comments

After talking with some users about the usability of the AS3-Layout-Framework, I realized that the dynamic layout approach (layout strategies totally independent from containers) seemed to be a bit confusing or too complicated.

To prevent this issue, I choose the approach of concrete containers like in C#. Now, every container has its own layout strategy implemented. F.e. an HBox can layout its child components horizontal and a FlowBox can also align them in a specific way.

With regard to a gui-system on top, this approach has its advantages (first of all simplicity).

During the next days, I will adapt the old class diagrams and update the repository.

The source code is available here


How to write custom LayoutComponents

Posted: November 28th, 2008 | Categories: AS3-Layout-Framework, Actionscript 3.0 | No Comments

For those readers who are not familiar with the architecture of the AS3-Layout-Framework, here is a short introduction.

Which base class should you use?

The answer is very simple. If the needed component has no subcomponents, use Component. If other components should be added and also be laid out, use Container instead.


The FlowBox

Posted: November 21st, 2008 | Categories: AS3-Layout-Framework, Actionscript 3.0 | 3 Comments

A FlowBox arranges IUIComponents in a row/column until no more IUIComponents fit in that row/column. The IUIComponents will be arranged to their desired size.

In addition the FlowBox offers the possibility to choose different alignment and flow settings which are also modifiable at runtime.


Actionscript 3.0 Layout Framework

Posted: October 26th, 2008 | Categories: AS3-Layout-Framework, Actionscript 3.0, Design Patterns | 1 Comment

The new AS3-Layout-Framework is now available in the addicted2flash library.

The architecture is straight forward and easy to understand (hopefully). It is basically constructed on top of two abstract interfaces named IComponent and IContainer. The main difference between them is the possiblity to add components.