Packagede.popforge.fui
Classpublic final class Fui
InheritanceFui Inheritance flash.display.Sprite

The Fui class is able to read and parse special Furnace files that contain a skin plus configuration. Such a file is basically generated in an external editor. The rendering of all components may not be done synchronous since there is an asynchronous call involved in this process. However the delay should be max one frame.



Public Methods
 MethodDefined by
  
Fui()
Creates a new Fui object.
Fui
  
build(furnaceFile:ByteArray):Fui
[static] Builds and returns a Fui object.
Fui
  
buildManual(xml:XML, skin:IFuiSkin):Fui
[static] Builds and returns a Fui object.
Fui
  
connect(name:String, value:*):void
Connects a Fui component with a given value.
Fui
  
Draws the bounding box of every DisplayObject object and its registration point that belongs to the current Fui object.
Fui
  
dispose():void
Removes all references recursive.
Fui
  
Returns a component for the given name.
Fui
Constructor detail
Fui()constructor
public function Fui()

Creates a new Fui object. The constructor should never be called. Use Fui.build() instead.

Method detail
build()method
public static function build(furnaceFile:ByteArray):Fui

Builds and returns a Fui object.

Parameters
furnaceFile:ByteArray — A ByteArray object containing a Furnace file.

Returns
Fui — A Fui object containing all components.
buildManual()method 
public static function buildManual(xml:XML, skin:IFuiSkin):Fui

Builds and returns a Fui object. This function is used mainly for debugging purposes. On the other hand this call is absolute synchronous without any queus in between.

Parameters
xml:XML — The Fui XML file.
 
skin:IFuiSkin — An instance of a skin object implementing

Returns
Fui — A Fui object containing all components.
connect()method 
public function connect(name:String, value:*):void

Connects a Fui component with a given value. There are different Fui components that can connect with different values. Depending on the interfaces a component implements it can be connected with a different value. Components that implement IParameterBindable can be connected to Paramter objects. Components that implement IStringBindable can be connected to String primitives. Connects are called after the skin has been initialized. They will be hold in a queue until the components are ready.

Parameters
name:String — The name of the component.
 
value:* — The value to connect with that component.

Throws
— If no component with given name exists.
 
— If component can not be connected with given value.
 
— If component is from unknown type or unsupported.
debugComponents()method 
public function debugComponents():void

Draws the bounding box of every DisplayObject object and its registration point that belongs to the current Fui object.

dispose()method 
public function dispose():void

Removes all references recursive. This way a Fui object should be collected by the garbage collection if it is no longer needed.

getElementById()method 
public function getElementById(name:String):FuiComponent

Returns a component for the given name.

Parameters
name:String — The name of the component.

Returns
FuiComponent — The component corresponding to the given name

Throws
— If no component with given name exists.