| Package | com.bit101.components |
| Class | public class Component |
| Inheritance | Component flash.display.Sprite |
| Subclasses | CheckBox, ColorChooser, IndicatorLight, InputText, Knob, Label, Meter, Panel, ProgressBar, PushButton, RadioButton, RotarySelector, Slider, Text, UISlider |
| Property | Defined by | ||
|---|---|---|---|
| height : Number | Component | ||
| width : Number | Component | ||
| x : Number [write-only]
Overrides the setter for x to always place the component on a whole pixel.
| Component | ||
| y : Number [write-only]
Overrides the setter for y to always place the component on a whole pixel.
| Component | ||
| Property | Defined by | ||
|---|---|---|---|
| _height : Number = 0 | Component | ||
| _width : Number = 0 | Component | ||
| Method | Defined by | ||
|---|---|---|---|
|
Component(parent:DisplayObjectContainer = null, xpos:Number = 0, ypos:Number = 0)
Constructor
| Component | ||
|
draw():void
Abstract draw function.
| Component | ||
|
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
Overriden in subclasses to create child display objects.
| Component | ||
|
getShadow(dist:Number, knockout:Boolean = false):DropShadowFilter
DropShadowFilter factory method, used in many of the components.
| Component | ||
|
init():void
Initilizes the component.
| Component | ||
|
invalidate():void
Marks the component to be redrawn on the next frame.
| Component | ||
| Constant | Defined by | ||
|---|---|---|---|
| DRAW : String = "draw" [static]
| Component | ||
| _height | property |
protected var _height:Number = 0
| height | property |
height:Number [read-write]Implementation
public function get height():Number
public function set height(value:Number):void
| _width | property |
protected var _width:Number = 0
| width | property |
width:Number [read-write]Implementation
public function get width():Number
public function set width(value:Number):void
| x | property |
x:Number [write-only]Overrides the setter for x to always place the component on a whole pixel.
Implementation public function set x(value:Number):void
| y | property |
y:Number [write-only]Overrides the setter for y to always place the component on a whole pixel.
Implementation public function set y(value:Number):void
| Component | () | constructor |
public function Component(parent:DisplayObjectContainer = null, xpos:Number = 0, ypos:Number = 0)Constructor
Parametersparent:DisplayObjectContainer (default = null) — The parent DisplayObjectContainer on which to add this component.
|
|
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 function addChildren():voidOverriden in subclasses to create child display objects.
| draw | () | method |
public function draw():voidAbstract draw function.
| getShadow | () | method |
protected function getShadow(dist:Number, knockout:Boolean = false):DropShadowFilterDropShadowFilter factory method, used in many of the components.
Parametersdist:Number — The distance of the shadow.
|
|
knockout:Boolean (default = false) — Whether or not to create a knocked out shadow.
|
DropShadowFilter |
| init | () | method |
protected function init():voidInitilizes the component.
| initStage | () | method |
public static function initStage(stage:Stage):voidUtility method to set up usual stage align and scaling.
Parametersstage:Stage |
| invalidate | () | method |
protected function invalidate():voidMarks the component to be redrawn on the next frame.
| move | () | method |
public function move(xpos:Number, ypos:Number):voidMoves the component to the specified position.
Parametersxpos:Number — the x position to move the component
|
|
ypos:Number — the y position to move the component
|
| setSize | () | method |
public function setSize(w:Number, h:Number):voidSets the size of the component.
Parametersw:Number — The width of the component.
|
|
h:Number — The height of the component.
|
| DRAW | constant |
public static const DRAW:String = "draw"