Tags:
create new tag
, view all tags

How To Use Marmot Layout Manager

Contents

About this Document

This document is a guide to the Marmot Layout Manager which introduced by the Marmot Flash Frontend.

Overview

Marmot Layout Manager implements a mechanism for Flash Actionscript 3 projects to deal with the layout stuff.
Marmot Layout Manger forcuses on reducing the coupling between business layer and presentation layer for the projects implemented without using flex things(like flex libraries or .mxml files).

Classes and Concepts

Classes

Concepts

  • Class a class means a series of DisplayObject which has the similar layout strategy using the same Layouter to do the layout stuff.

How to use

First of all, you should write your Layouters.

And you should use the Marmot Layout Manager following these steps:

  1. You should register the Layouters before you use it. Like LayoutManager.register("MainFrame", MarmotMainFrameLayouter);
  2. You should place the code LayoutManager.layout("MainFrame", this) in the constructor of your implement of DisplayObject(like Sprite) or using like this
    fooInput = new TextField();
    LayoutManager.layout("FooInput", fooInput);
  3. You could make the Layouters adjust their parameters to adapt the new stage size by call LayoutManager.adjustAll() or LayoutManager.adjust(), like you can place this code in the resize event handler of the stage.

For More Information

Please contact the author Wenyuan Yu, wenyuany@googlePLEASENOSPAM.com

Topic revision: r2 - 2008-09-25 - YuWenyuan
 
Twitter Delicious Facebook Digg Google Bookmarks E-mail LinkedIn Reddit StumbleUpon    
  • Download TWiki
TWiki logo Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2012 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.