| Package | com.soundstep.ui.layouts |
| Class | public class TileUI |
| Inheritance | TileUI CanvasUI flash.display.MovieClip |
var tile:TileUI = new TileUI(); addChildUI(tile); tile.direction = TileUI.DIRECTION_HORIZONTAL; tile.padding = new Padding(10, 10, 10, 10); tile.name = "tile"; tile.reference = this; tile.percentWidth = "50%"; tile.height = 200; tile.right = 20; tile.bottom = 20; tile.canvasAlpha = .4;
| Property | Defined by | ||
|---|---|---|---|
![]() | alignX : String
horizontal alignment when the property ratio is set to ElementUI.RATIO_IN or ElementUI.RATIO_OUT
can accept ElementUI.ALIGN_LEFT, ElementUI.ALIGN_RIGHT, ElementUI.ALIGN_CENTER | CanvasUI | |
![]() | alignY : String
vertical alignment when the property ratio is set to ElementUI.RATIO_IN or ElementUI.RATIO_OUT
can accept ElementUI.ALIGN_CENTER, ElementUI.ALIGN_TOP, ElementUI.ALIGN_BOTTOM | CanvasUI | |
![]() | baseUI : BaseUI
get the instance of the BaseUI class, used for the children added with addChild or addChildUI
| CanvasUI | |
![]() | bottom : Number
bottom value (from the reference), Number or String
| CanvasUI | |
![]() | buttonMode : Boolean
Specifies the button mode of this sprite
| CanvasUI | |
![]() | bypassSize : Boolean
whether or not the DisplayObject will be resized (not working with ratio set to RATIO_IN or RATIO_OUT)
| CanvasUI | |
![]() | canvasAlpha : Number
background alpha of the canvas
| CanvasUI | |
![]() | canvasColor : uint
background color of the canvas
| CanvasUI | |
![]() | container : Sprite
get the instance of the container, it contains the children added with addChild and addChildUI
| CanvasUI | |
| direction : String
direction of the children added in the tile, can be TileUI.DIRECTION_HORIZONTAL or TileUI.DIRECTION_VERTICAL
| TileUI | ||
![]() | forceReferenceHeight : Number
force the height of the reference
| CanvasUI | |
![]() | forceReferenceWidth : Number
force the width of the reference
| CanvasUI | |
![]() | height : Number
height of the canvas
| CanvasUI | |
![]() | horizontalCenter : Number
horizontal center value (from the reference), Number or String
| CanvasUI | |
| horizontalGap : Number
horizontal space between each children
| TileUI | ||
![]() | initialWidth : Number
width of the DisplayObject when added to the BaseUI instance
| CanvasUI | |
![]() | keepOnScreen : Boolean
keep a DisplayObject in the screen
| CanvasUI | |
![]() | layoutMask : Mask
get the instance of the mask
| CanvasUI | |
![]() | left : Number
left value (from the reference), Number or String
| CanvasUI | |
![]() | mouseChildren : Boolean
Determines whether or not the children of the object are mouse enabled
| CanvasUI | |
![]() | numChildren : int
Returns the number of children of the CanvasUI container
| CanvasUI | |
![]() | onStage : Boolean
set the stage as a reference to calculate position ans sizes, if false the parent will be the reference
| CanvasUI | |
| padding : Padding
space around the children
| TileUI | ||
![]() | percentHeight : *
set the height percentage (will accept Number or String, with or without the percentage character
| CanvasUI | |
![]() | percentWidth : *
set the width percentage (will accept Number or String, with or without the percentage character
| CanvasUI | |
![]() | properties : Object
Object to get or set the CanvasUI properties, for example:
element.properties = {top:0, bottom:"20", onStage:false, width:"50%"};
| CanvasUI | |
![]() | ratio : String
type of ratio of the CanvasUI, can be ElementUI.RATIO_IN or ElementUI.RATIO_OUT
any other String will set the ratio to none the following properties cannot be set or are not used a ratio has been specified: x, y, width, height, horizontalCenter and verticalCenter | CanvasUI | |
![]() | reference : DisplayObjectContainer
specify a DisplayObjectContainer reference on which the size and position of the ElementUI will refer to
if not set, the onStage property value is the reference (onStage true = stage, onStage false = parent) | CanvasUI | |
![]() | right : Number
right value (from the reference), Number or String
| CanvasUI | |
![]() | scrollPane : *
get the instance of the scrollpane used for the scrollbars
you must cast the return: Scrollpane(canvas.scrollpane), the wild card has been used not to import the SCrollpane classes if not used | CanvasUI | |
![]() | top : Number
top value (from the reference), Number or String
| CanvasUI | |
![]() | ui : ElementUI
get a the wrapper ElementUI instance
| CanvasUI | |
![]() | useInitialSize : Boolean
use the size that has been recorded when the DisplayObject has been added to the BaseUI instance
useful when a mask or other DisplayObject can disturb the real size of the DisplayObject | CanvasUI | |
![]() | verticalCenter : Number
vertical center value (from the reference), Number or String
| CanvasUI | |
| verticalGap : Number
vertical space between each children
| TileUI | ||
![]() | width : Number
width of the canvas
| CanvasUI | |
![]() | wrapper : Wrapper
get the instance of the wrapper
| CanvasUI | |
![]() | x : Number
x position of the canvas, Number or String
| CanvasUI | |
![]() | y : Number
y position of the canvas
| CanvasUI | |
| Method | Defined by | ||
|---|---|---|---|
|
TileUI(widthLayout:Number = 100, heightLayout:Number = 100, layoutScrollbar:Boolean = true, layoutMask:Boolean = true)
Constructor
Create an instance of the TileUI class
| TileUI | ||
|
addChild(child:DisplayObject):DisplayObject
Adds a child DisplayObject instance to this Tile container
| TileUI | ||
![]() |
addChildAt(child:DisplayObject, index:int):DisplayObject
Adds a child DisplayObject instance to the CanvasUI container
| CanvasUI | |
|
addChildUI(child:DisplayObject):ElementUI
create an ElementUI instance and add the child to the display list
| TileUI | ||
![]() |
contains(child:DisplayObject):Boolean
Determines whether or not the specified display object is a child of the CanvasUI container or the instance itself
| CanvasUI | |
![]() |
forceSizeContainer(width:Number, height:Number):void
function to force the size of the container (will update the scrollbars if used)
| CanvasUI | |
![]() |
getChildAt(index:int):DisplayObject
Returns the child display object instance that exists at the specified index
| CanvasUI | |
![]() |
getChildByName(name:String):DisplayObject
Returns the child display object that exists with the specified name
| CanvasUI | |
![]() |
getChildIndex(child:DisplayObject):int
Returns the index position of a child DisplayObject instance
| CanvasUI | |
![]() |
getChildUI(child:DisplayObject):ElementUI
get a child ElementUI instance
| CanvasUI | |
![]() |
getChildUIByName(name:String):ElementUI
get a child ElementUI instance using the name
| CanvasUI | |
|
refresh(e:BaseEventUI = null):void
refresh the tile elements and its children position
| TileUI | ||
![]() |
removeChild(child:DisplayObject):DisplayObject
Removes the specified child DisplayObject instance from the child list of the CanvasUI container
| CanvasUI | |
![]() |
removeChildAt(index:int):DisplayObject
Removes a child DisplayObject from the specified index position in the child list of the DisplayObjectContainer
| CanvasUI | |
![]() |
removeChildUI(child:DisplayObject):void
remove a child from the BaseUI instance
| CanvasUI | |
![]() |
setChildIndex(child:DisplayObject, index:int):void
Changes the position of an existing child in the CanvasUI container
| CanvasUI | |
![]() |
swapChildren(child1:DisplayObject, child2:DisplayObject):void
Swaps the z-order (front-to-back order) of the two specified child objects
| CanvasUI | |
![]() |
swapChildrenAt(index1:int, index2:int):void
Swaps the z-order (front-to-back order) of the child objects at the two specified index positions in the child list.
| CanvasUI | |
| Constant | Defined by | ||
|---|---|---|---|
| DIRECTION_HORIZONTAL : String = "horizontal" [static]
static constant for the direction (property direction), the children are added horizontally
| TileUI | ||
| DIRECTION_VERTICAL : String = "vertical" [static]
static constant for the direction (property direction), the children are added vertically
| TileUI | ||
| direction | property |
direction:String [read-write]direction of the children added in the tile, can be TileUI.DIRECTION_HORIZONTAL or TileUI.DIRECTION_VERTICAL
Implementation public function get direction():String
public function set direction(value:String):void
| horizontalGap | property |
horizontalGap:Number [read-write]horizontal space between each children
Implementation public function get horizontalGap():Number
public function set horizontalGap(value:Number):void
| padding | property |
padding:Padding [read-write]space around the children
Implementation public function get padding():Padding
public function set padding(value:Padding):void
| verticalGap | property |
verticalGap:Number [read-write]vertical space between each children
Implementation public function get verticalGap():Number
public function set verticalGap(value:Number):void
| TileUI | () | constructor |
public function TileUI(widthLayout:Number = 100, heightLayout:Number = 100, layoutScrollbar:Boolean = true, layoutMask:Boolean = true)Constructor Create an instance of the TileUI class
ParameterswidthLayout:Number (default = 100) — width of the tile
|
|
heightLayout:Number (default = 100) — height of the tile
|
|
layoutScrollbar:Boolean (default = true) — whether or not the canvas creates and uses a mask to show only the content within the box
|
|
layoutMask:Boolean (default = true) — whether or not the canvas creates and uses scrollbars if the content is bigger than the tile (scrollpane instance)
|
| addChild | () | method |
public override function addChild(child:DisplayObject):DisplayObjectAdds a child DisplayObject instance to this Tile container
Parameterschild:DisplayObject — DisplayObject
|
DisplayObject — DisplayObject
|
| addChildUI | () | method |
public override function addChildUI(child:DisplayObject):ElementUIcreate an ElementUI instance and add the child to the display list
Parameterschild:DisplayObject — DisplayObject
|
ElementUI —
ElementUI
|
| refresh | () | method |
public override function refresh(e:BaseEventUI = null):voidrefresh the tile elements and its children position
Parameterse:BaseEventUI (default = null) |
| DIRECTION_HORIZONTAL | constant |
public static const DIRECTION_HORIZONTAL:String = "horizontal"static constant for the direction (property direction), the children are added horizontally
| DIRECTION_VERTICAL | constant |
public static const DIRECTION_VERTICAL:String = "vertical"static constant for the direction (property direction), the children are added vertically