The ScrollPane contains an encapsulated view and handles the overflow of that view.
The ScrollPane itself is a container that has its own width and height measurement in the layout cycle, so it is totally encapsulated from the underlying view.
It is configurable with a horizontal and/or vertical ScrollBar. These ScrollBars get their components (arrows, thumb, track) from a ScrollBarFactory, so it is possible to change the look-and-feel at runtime.
In addition, it has an attribute variant, which can be configured with the following values:
ScrollBarVariant.DOUBLE_BOTTOM (arrows are side-by-side at the bottom/right)
ScrollBarVariant.DOUBLE_TOP (arrows are side-by-side at the top/left)
ScrollBarVariant.SINGLE (arrows are seperated; this is the default variant)
Read more...
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.
Read more...
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 VBox was set explicitly.
Read more...
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.
Read more...
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
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.
Read more...
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.
Read more...
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.
Read more...