Packagede.popforge.fui.core
Classpublic class FuiComponent
InheritanceFuiComponent Inheritance flash.display.Sprite
SubclassesKnob, Label

The FuiComponent class is the base for every visible element handled by a Fui object. Remember that Fui is a tile-based system. Each component is described with a size in rows and columns. An IFuiSkin object defines the tile size. A component may have the dimension of 3 rows and 1 column. If the tile size is 16 this would result in a width of 3 * 16 and a height of 1 * 16. Precalculated variables of the actual size are stored in targetWidth and targetHeight.



Public Properties
 PropertyDefined by
  cols : uint
[write-only] The columns of the component.
FuiComponent
  rows : uint
[write-only] The rows of the component.
FuiComponent
  skin : IFuiSkin
[write-only] The skin used to render this component.
FuiComponent
  tag : XML
[write-only] The XML tag that has been used to define this component.
FuiComponent
Protected Properties
 PropertyDefined by
  _cols : uint
The columns of the component in tiles.
FuiComponent
  _rows : uint
The rows of the component in tiles.
FuiComponent
  _tag : XML
The tag that has been used to define this component.
FuiComponent
  targetHeight : uint
The height in pixels (_rows * tileSize).
FuiComponent
  targetWidth : uint
The width in pixels (_cols * tileSize).
FuiComponent
  tileSize : uint
The tile size used to render this component.
FuiComponent
Public Methods
 MethodDefined by
  
dispose():void
Removes the components chidlren and all its internal references.
FuiComponent
  
toString():String
Creates and returns the string representation of the current object.
FuiComponent
Protected Methods
 MethodDefined by
  
build():void
Renders the component by creating all the necessary display objects.
FuiComponent
  
debugBounds():void
Draws the bounds of the component given by tile size and components size in tiles.
FuiComponent
  
Masks the component using the exact width and height calculated using the tile size and components size in tiles.
FuiComponent
Property detail
_colsproperty
protected var _cols:uint

The columns of the component in tiles.

colsproperty 
cols:uint  [write-only]

The columns of the component.

Implementation
    public function set cols(value:uint):void
_rowsproperty 
protected var _rows:uint

The rows of the component in tiles.

rowsproperty 
rows:uint  [write-only]

The rows of the component.

Implementation
    public function set rows(value:uint):void
skinproperty 
skin:IFuiSkin  [write-only]

The skin used to render this component. A call to render() is made if you set a skin for a component.

Implementation
    public function set skin(value:IFuiSkin):void
_tagproperty 
protected var _tag:XML

The tag that has been used to define this component.

tagproperty 
tag:XML  [write-only]

The XML tag that has been used to define this component.

Implementation
    public function set tag(value:XML):void
targetHeightproperty 
protected var targetHeight:uint

The height in pixels (_rows * tileSize).

targetWidthproperty 
protected var targetWidth:uint

The width in pixels (_cols * tileSize).

tileSizeproperty 
protected var tileSize:uint

The tile size used to render this component.

Method detail
build()method
protected function build():void

Renders the component by creating all the necessary display objects.


Throws
— If this method is not overriden.
debugBounds()method 
protected function debugBounds():void

Draws the bounds of the component given by tile size and components size in tiles.

dispose()method 
public function dispose():void

Removes the components chidlren and all its internal references.

maskComponent()method 
protected function maskComponent():void

Masks the component using the exact width and height calculated using the tile size and components size in tiles.

toString()method 
public override function toString():String

Creates and returns the string representation of the current object.

Returns
String — The string representation of the current object.