Packagecom.soundstep.ui
Classpublic class BaseUI
InheritanceBaseUI Inheritance flash.events.EventDispatcher

Author: Romuald Quantin - www.soundstep.com
Class version: 1.1.0
Actionscript version: 3.0
Copyright: Mozilla Public License 1.1 (MPL 1.1)
http://www.opensource.org/licenses/mozilla1.1.php
You can use BaseUI in any flash site, except to include/distribute it in another framework, application, template, component or structure that is meant to build, scaffold or generate source files.

Date: 06-2008
Usage: Manage a list of elements (Element UI) to be displayed


Example
  baseUI = new BaseUI(this);
  txt = new TextField();
  txt.name = "Textfield";
  txt.text = "TexField example";
  var elText:ElementUI = baseUI.addElement(txt);
  elText.alignX = ElementUI.ALIGN_CENTER;
  elText.alignY = ElementUI.ALIGN_BOTTOM;
  elText.marginBottom = 10;
  addChild(txt);
  



Public Properties
 PropertyDefined by
  elements : Array
[read-only] get the ElementUI list
BaseUI
  holder : DisplayObject
[read-only] return the holder
BaseUI
Public Methods
 MethodDefined by
  
BaseUI(holder:DisplayObject)
Constructor
BaseUI
  
addElement(element:DisplayObject, type:uint = 0):ElementUI
add a element to the BaseUI list (DisplayObject like Sprite, MovieClip, TextField, Bitmap, ...)
BaseUI
  
getElement(element:DisplayObject):ElementUI
get the ElementUI instance
BaseUI
  
refresh():void
refresh all the elements
BaseUI
  
remove all elements from the BaseUI list
BaseUI
  
removeElement(element:DisplayObject):void
remove a element from the BaseUI list
BaseUI
Property detail
elementsproperty
elements:Array  [read-only]

get the ElementUI list

Implementation
    public function get elements():Array
holderproperty 
holder:DisplayObject  [read-only]

return the holder

Implementation
    public function get holder():DisplayObject
Constructor detail
BaseUI()constructor
public function BaseUI(holder:DisplayObject)

Constructor

Parameters
holder:DisplayObject — DisplayObject of the BaseUI instance that will contains the elements
Method detail
addElement()method
public function addElement(element:DisplayObject, type:uint = 0):ElementUI

add a element to the BaseUI list (DisplayObject like Sprite, MovieClip, TextField, Bitmap, ...)

Parameters
element:DisplayObject — DisplayObject instance of the element to be added to the BaseUI list
 
type:uint (default = 0) — uint type of the Element (element, background, ...), default is a type element (ElementUI.TYPE_ELEMENT)

Returns
ElementUI — return an instance ElementUI
getElement()method 
public function getElement(element:DisplayObject):ElementUI

get the ElementUI instance

Parameters
element:DisplayObject — DisplayObject instance of the DisplayObject

Returns
ElementUI — return the ElementUI instance of the DisplayObject
refresh()method 
public function refresh():void

refresh all the elements

removeAllElements()method 
public function removeAllElements():void

remove all elements from the BaseUI list

removeElement()method 
public function removeElement(element:DisplayObject):void

remove a element from the BaseUI list

Parameters
element:DisplayObject — DisplayObject instance of the element to be removed from the BaseUI list