| Package | com.soundstep.ui.layouts |
| Class | public class HBoxUI |
| Inheritance | HBoxUI CanvasUI flash.display.MovieClip |
var hbox:HBoxUI = new HBoxUI(); addChild(hbox); hbox.horizontalGap = 5; hbox.alignChildren = HBoxUI.ALIGN_CENTER; hbox.verticalCenterChildren = 40; hbox.padding = new Padding(10, 10, 25, 10); hbox.name = "hbox"; hbox.reference = this; hbox.percentWidth = "50%"; hbox.height = 200; hbox.right = 20; hbox.bottom = 20; hbox.canvasAlpha = .4;
| Property | Defined by | ||
|---|---|---|---|
| alignChildren : String
alignment of the children, can be HBoxUI.ALIGN_TOP, HBoxUI.ALIGN_CENTER or HBoxUI.ALIGN_BOTTOM
| HBoxUI | ||
![]() | 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 | |
![]() | 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
| HBoxUI | ||
![]() | 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
| HBoxUI | ||
![]() | 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 | |
| verticalCenterChildren : Number
vertical alignment value of the children if alignChildren has been set to HBoxUI.ALIGN_CENTER
| HBoxUI | ||
![]() | 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 | ||
|---|---|---|---|
|
HBoxUI(widthLayout:Number = 100, heightLayout:Number = 100, layoutScrollbar:Boolean = true, layoutMask:Boolean = true)
Constructor
Create an instance of the HBoxUI class
| HBoxUI | ||
|
addChild(child:DisplayObject):DisplayObject
Adds a child DisplayObject instance to this HBoxUI container, a ElementUI will be created
| HBoxUI | ||
![]() |
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
| HBoxUI | ||
![]() |
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 box elements and its children position
| HBoxUI | ||
![]() |
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 | ||
|---|---|---|---|
| ALIGN_BOTTOM : String = "bottom" [static]
static constant for the alignment (property alignChildren), the children are aligned bottom in the layout
| HBoxUI | ||
| ALIGN_CENTER : String = "center" [static]
static constant for the alignment (property alignChildren), the children are centered in the layout
| HBoxUI | ||
| ALIGN_TOP : String = "top" [static]
static constant for the alignment (property alignChildren), the children are aligned top in the layout
| HBoxUI | ||
| alignChildren | property |
alignChildren:String [read-write]alignment of the children, can be HBoxUI.ALIGN_TOP, HBoxUI.ALIGN_CENTER or HBoxUI.ALIGN_BOTTOM
Implementation public function get alignChildren():String
public function set alignChildren(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
| verticalCenterChildren | property |
verticalCenterChildren:Number [read-write]vertical alignment value of the children if alignChildren has been set to HBoxUI.ALIGN_CENTER
Implementation public function get verticalCenterChildren():Number
public function set verticalCenterChildren(value:Number):void
| HBoxUI | () | constructor |
public function HBoxUI(widthLayout:Number = 100, heightLayout:Number = 100, layoutScrollbar:Boolean = true, layoutMask:Boolean = true)Constructor Create an instance of the HBoxUI class
ParameterswidthLayout:Number (default = 100) — width of the box
|
|
heightLayout:Number (default = 100) — height of the box
|
|
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 box (scrollpane instance)
|
| addChild | () | method |
public override function addChild(child:DisplayObject):DisplayObjectAdds a child DisplayObject instance to this HBoxUI container, a ElementUI will be created
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 box elements and its children position
Parameterse:BaseEventUI (default = null) |
| ALIGN_BOTTOM | constant |
public static const ALIGN_BOTTOM:String = "bottom"static constant for the alignment (property alignChildren), the children are aligned bottom in the layout
| ALIGN_CENTER | constant |
public static const ALIGN_CENTER:String = "center"static constant for the alignment (property alignChildren), the children are centered in the layout
| ALIGN_TOP | constant |
public static const ALIGN_TOP:String = "top"static constant for the alignment (property alignChildren), the children are aligned top in the layout