| Package | com.soundstep.ui |
| Class | public class ElementUI |
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);
| Property | Defined by | ||
|---|---|---|---|
| alignX : uint
get the horizontal alignment of the DisplayObject in the area (ElementUI.ALIGN_LEFT, ElementUI.ALIGN_CENTER, ElementUI.ALIGN_RIGHT)
| ElementUI | ||
| alignY : uint
get the vertical alignment of the DisplayObject in the area (ElementUI.ALIGN_TOP, ElementUI.ALIGN_CENTER, ElementUI.ALIGN_BOTTOM)
| ElementUI | ||
| bgMask : Shape
get the Shape of the mask
| ElementUI | ||
| element : DisplayObject [read-only]
get the DisplayObject
| ElementUI | ||
| hasMask : Boolean = false
wether or not the DisplayObject has a mask (for the background type and mode ratio out)
| ElementUI | ||
| horizontalAlign : Number
set the horizontal alignment value
| ElementUI | ||
| margin : Object
get the margin of a DisplayObject {top:20, bottom:10, left:10, right:20}
| ElementUI | ||
| marginBottom : Number
get the bottom margin of a DisplayObject
| ElementUI | ||
| marginLeft : Number
get the left margin of a DisplayObject
| ElementUI | ||
| marginRight : Number
get the right margin of a DisplayObject
| ElementUI | ||
| marginTop : Number
get the top margin of a DisplayObject
| ElementUI | ||
| mode : uint
get the mode used for the element (ElementUI.RATIO_FIT, ElementUI.RATIO_OUT, ElementUI.RATIO_IN)
| ElementUI | ||
| onStage : Boolean = true
wether or not the DisplayObject is resized or positioned to the stage (false with the parent DisplayObject)
| ElementUI | ||
| resizeOption : uint
get the resize option of the ElementUI (ElementUI.OPTION_ELEMENT_WIDTH, ElementUI.OPTION_ELEMENT_HEIGHT)
| ElementUI | ||
| type : uint
get the type of the ElementUI (ElementUI.TYPE_ELEMENT, ElementUI.TYPE_BACKGROUND)
| ElementUI | ||
| useInitialSize : Boolean
get if the element is using the initial size
| ElementUI | ||
| verticalAlign : Number
set the vertical alignment value
| ElementUI | ||
| Method | Defined by | ||
|---|---|---|---|
|
Constructor
Not used, instead use the addElement of the BaseUI instance
| ElementUI | ||
|
checkMask():void
build or remove the mask if the type is background and the ratio is out (internal)
| ElementUI | ||
|
dispose():void
clean the Element when removed in the BaseUI instance
| ElementUI | ||
|
forceRefresh():void
force the position and size of the DisplayObject
| ElementUI | ||
|
refresh():void
update position and size of the element, also check alpha and visible before allowing (internal)
| ElementUI | ||
|
set the type of an element (internal)
| ElementUI | ||
| Constant | Defined by | ||
|---|---|---|---|
| ALIGN_BOTTOM : uint = 5 [static]
static constant to align a DisplayObject at the bottom (ElementUI.BOTTOM)
| ElementUI | ||
| ALIGN_CENTER : uint = 1 [static]
static constant to align a DisplayObject at the center (ElementUI.ALIGN_CENTER)
| ElementUI | ||
| ALIGN_LEFT : uint = 2 [static]
static constant to align a DisplayObject at the left (ElementUI.LEFT)
| ElementUI | ||
| ALIGN_RIGHT : uint = 3 [static]
static constant to align a DisplayObject at the right (ElementUI.RIGHT)
| ElementUI | ||
| ALIGN_TOP : uint = 4 [static]
static constant to align a DisplayObject at the top (ElementUI.TOP)
| ElementUI | ||
| OPTION_ELEMENT_HEIGHT : uint = 12 [static]
static constant for the resizeOption of a elementUI type element (ElementUI.OPTION_ELEMENT_HEIGHT), resize the height of the element to fit the area
| ElementUI | ||
| OPTION_ELEMENT_WIDTH : uint = 11 [static]
static constant for the resizeOption of a elementUI type element (ElementUI.OPTION_ELEMENT_WIDTH), resize the width of the element to fit the area
| ElementUI | ||
| RATIO_FIT : uint = 10 [static]
static constant for the background type of an elementUI (ElementUI.RATIO_FIT), this is the default for the background type of background element
| ElementUI | ||
| RATIO_IN : uint = 8 [static]
static constant for the background type of an elementUI (ElementUI.RATIO_IN)
| ElementUI | ||
| RATIO_OUT : uint = 9 [static]
static constant for the background type of an elementUI (ElementUI.RATIO_OUT), will build a mask to handle the margin
| ElementUI | ||
| TYPE_BACKGROUND : uint = 7 [static]
static constant for the type of an elementUI (ElementUI.TYPE_BACKGROUND), make you able to use the ratio fit, in and out mode
| ElementUI | ||
| TYPE_ELEMENT : uint = 6 [static]
static constant for the type of an elementUI (ElementUI.TYPE_ELEMENT), this is the default for an elementUI
| ElementUI | ||
| alignX | property |
alignX:uint [read-write]get the horizontal alignment of the DisplayObject in the area (ElementUI.ALIGN_LEFT, ElementUI.ALIGN_CENTER, ElementUI.ALIGN_RIGHT)
Implementation public function get alignX():uint
public function set alignX(value:uint):void
| alignY | property |
alignY:uint [read-write]get the vertical alignment of the DisplayObject in the area (ElementUI.ALIGN_TOP, ElementUI.ALIGN_CENTER, ElementUI.ALIGN_BOTTOM)
Implementation public function get alignY():uint
public function set alignY(value:uint):void
| bgMask | property |
public var bgMask:Shapeget the Shape of the mask
| element | property |
element:DisplayObject [read-only]get the DisplayObject
Implementation public function get element():DisplayObject
| hasMask | property |
public var hasMask:Boolean = falsewether or not the DisplayObject has a mask (for the background type and mode ratio out)
The default value is false.
| horizontalAlign | property |
horizontalAlign:Number [read-write]set the horizontal alignment value
Implementation public function get horizontalAlign():Number
public function set horizontalAlign(value:Number):void
| margin | property |
margin:Object [read-write]get the margin of a DisplayObject {top:20, bottom:10, left:10, right:20}
Implementation public function get margin():Object
public function set margin(value:Object):void
| marginBottom | property |
marginBottom:Number [read-write]get the bottom margin of a DisplayObject
Implementation public function get marginBottom():Number
public function set marginBottom(value:Number):void
| marginLeft | property |
marginLeft:Number [read-write]get the left margin of a DisplayObject
Implementation public function get marginLeft():Number
public function set marginLeft(value:Number):void
| marginRight | property |
marginRight:Number [read-write]get the right margin of a DisplayObject
Implementation public function get marginRight():Number
public function set marginRight(value:Number):void
| marginTop | property |
marginTop:Number [read-write]get the top margin of a DisplayObject
Implementation public function get marginTop():Number
public function set marginTop(value:Number):void
| mode | property |
mode:uint [read-write]get the mode used for the element (ElementUI.RATIO_FIT, ElementUI.RATIO_OUT, ElementUI.RATIO_IN)
Implementation public function get mode():uint
public function set mode(value:uint):void
| onStage | property |
public var onStage:Boolean = truewether or not the DisplayObject is resized or positioned to the stage (false with the parent DisplayObject)
The default value is true.
| resizeOption | property |
resizeOption:uint [read-write]get the resize option of the ElementUI (ElementUI.OPTION_ELEMENT_WIDTH, ElementUI.OPTION_ELEMENT_HEIGHT)
Implementation public function get resizeOption():uint
public function set resizeOption(value:uint):void
| type | property |
type:uint [read-write]get the type of the ElementUI (ElementUI.TYPE_ELEMENT, ElementUI.TYPE_BACKGROUND)
Implementation public function get type():uint
public function set type(value:uint):void
| useInitialSize | property |
useInitialSize:Boolean [read-write]get if the element is using the initial size
Implementation public function get useInitialSize():Boolean
public function set useInitialSize(value:Boolean):void
| verticalAlign | property |
verticalAlign:Number [read-write]set the vertical alignment value
Implementation public function get verticalAlign():Number
public function set verticalAlign(value:Number):void
| ElementUI | () | constructor |
public function ElementUI()Constructor Not used, instead use the addElement of the BaseUI instance
| checkMask | () | method |
public function checkMask():voidbuild or remove the mask if the type is background and the ratio is out (internal)
| dispose | () | method |
public function dispose():voidclean the Element when removed in the BaseUI instance
| forceRefresh | () | method |
public function forceRefresh():voidforce the position and size of the DisplayObject
| refresh | () | method |
public function refresh():voidupdate position and size of the element, also check alpha and visible before allowing (internal)
| setElement | () | method |
public function setElement(baseUI:BaseUI, el:DisplayObject, t:uint):ElementUIset the type of an element (internal)
ParametersbaseUI:BaseUI |
|
el:DisplayObject |
|
t:uint |
ElementUI |
| ALIGN_BOTTOM | constant |
public static const ALIGN_BOTTOM:uint = 5static constant to align a DisplayObject at the bottom (ElementUI.BOTTOM)
| ALIGN_CENTER | constant |
public static const ALIGN_CENTER:uint = 1static constant to align a DisplayObject at the center (ElementUI.ALIGN_CENTER)
| ALIGN_LEFT | constant |
public static const ALIGN_LEFT:uint = 2static constant to align a DisplayObject at the left (ElementUI.LEFT)
| ALIGN_RIGHT | constant |
public static const ALIGN_RIGHT:uint = 3static constant to align a DisplayObject at the right (ElementUI.RIGHT)
| ALIGN_TOP | constant |
public static const ALIGN_TOP:uint = 4static constant to align a DisplayObject at the top (ElementUI.TOP)
| OPTION_ELEMENT_HEIGHT | constant |
public static const OPTION_ELEMENT_HEIGHT:uint = 12static constant for the resizeOption of a elementUI type element (ElementUI.OPTION_ELEMENT_HEIGHT), resize the height of the element to fit the area
| OPTION_ELEMENT_WIDTH | constant |
public static const OPTION_ELEMENT_WIDTH:uint = 11static constant for the resizeOption of a elementUI type element (ElementUI.OPTION_ELEMENT_WIDTH), resize the width of the element to fit the area
| RATIO_FIT | constant |
public static const RATIO_FIT:uint = 10static constant for the background type of an elementUI (ElementUI.RATIO_FIT), this is the default for the background type of background element
| RATIO_IN | constant |
public static const RATIO_IN:uint = 8static constant for the background type of an elementUI (ElementUI.RATIO_IN)
| RATIO_OUT | constant |
public static const RATIO_OUT:uint = 9static constant for the background type of an elementUI (ElementUI.RATIO_OUT), will build a mask to handle the margin
| TYPE_BACKGROUND | constant |
public static const TYPE_BACKGROUND:uint = 7static constant for the type of an elementUI (ElementUI.TYPE_BACKGROUND), make you able to use the ratio fit, in and out mode
| TYPE_ELEMENT | constant |
public static const TYPE_ELEMENT:uint = 6static constant for the type of an elementUI (ElementUI.TYPE_ELEMENT), this is the default for an elementUI