| Package | com.bit101.components |
| Class | public class Panel |
| Inheritance | Panel Component flash.display.Sprite |
| Property | Defined by | ||
|---|---|---|---|
| color : int | Panel | ||
| content : Sprite
Container for content added to this panel.
| Panel | ||
![]() | height : Number | Component | |
| shadow : Boolean | Panel | ||
![]() | width : Number | Component | |
![]() | x : Number
Overrides the setter for x to always place the component on a whole pixel.
| Component | |
![]() | y : Number
Overrides the setter for y to always place the component on a whole pixel.
| Component | |
| Method | Defined by | ||
|---|---|---|---|
|
Panel(parent:DisplayObjectContainer = null, xpos:Number = 0, ypos:Number = 0)
Constructor
| Panel | ||
|
draw():void
Draws the visual ui of the component.
| Panel | ||
![]() |
initStage(stage:Stage):void
[static]
Utility method to set up usual stage align and scaling.
| Component | |
![]() |
move(xpos:Number, ypos:Number):void
Moves the component to the specified position.
| Component | |
![]() |
setSize(w:Number, h:Number):void
Sets the size of the component.
| Component | |
| Method | Defined by | ||
|---|---|---|---|
|
addChildren():void
Creates and adds the child display objects of this component.
| Panel | ||
![]() |
getShadow(dist:Number, knockout:Boolean = false):DropShadowFilter
DropShadowFilter factory method, used in many of the components.
| Component | |
|
init():void
Initializes the component.
| Panel | ||
![]() |
invalidate():void
Marks the component to be redrawn on the next frame.
| Component | |
| color | property |
color:int [read-write]Implementation
public function get color():int
public function set color(value:int):void
| content | property |
public var content:SpriteContainer for content added to this panel. This is masked, so best to add children to content, rather than directly to the panel.
| shadow | property |
shadow:Boolean [read-write]Implementation
public function get shadow():Boolean
public function set shadow(value:Boolean):void
| Panel | () | constructor |
public function Panel(parent:DisplayObjectContainer = null, xpos:Number = 0, ypos:Number = 0)Constructor
Parametersparent:DisplayObjectContainer (default = null) — The parent DisplayObjectContainer on which to add this Panel.
|
|
xpos:Number (default = 0) — The x position to place this component.
|
|
ypos:Number (default = 0) — The y position to place this component.
|
| addChildren | () | method |
protected override function addChildren():voidCreates and adds the child display objects of this component.
| draw | () | method |
public override function draw():voidDraws the visual ui of the component.
| init | () | method |
protected override function init():voidInitializes the component.