Package com.bit101.components
Class public class CheckBox
Inheritance CheckBox InheritanceComponent Inheritance flash.display.Sprite



Public Properties
  Property Defined By
    enabled : Boolean
[override] Sets/gets whether this component will be enabled or not.
CheckBox
  Inherited height : Number
[override] Sets/gets the height of the component.
Component
    label : String
Sets / gets the label text shown on this CheckBox.
CheckBox
    selected : Boolean
Sets / gets the selected state of this CheckBox.
CheckBox
  Inherited tag : int
Sets/gets in integer that can identify the component.
Component
  Inherited width : Number
[override] Sets/gets the width of the component.
Component
  Inherited x : Number
[override] [write-only] Overrides the setter for x to always place the component on a whole pixel.
Component
  Inherited y : Number
[override] [write-only] Overrides the setter for y to always place the component on a whole pixel.
Component
Protected Properties
  Property Defined By
    _back : Sprite
CheckBox
    _button : Sprite
CheckBox
  Inherited _enabled : Boolean = true
Component
  Inherited _height : Number = 0
Component
    _label : Label
CheckBox
    _labelText : String
CheckBox
  Inherited Ronda : Class
Component
    _selected : Boolean = false
CheckBox
  Inherited _tag : int = -1
Component
  Inherited _width : Number = 0
Component
Public Methods
  Method Defined By
   
CheckBox(parent:DisplayObjectContainer = null, xpos:Number = 0, ypos:Number = 0, label:String, defaultHandler:Function = null)
Constructor
CheckBox
   
draw():void
[override] Draws the visual ui of the component.
CheckBox
  Inherited
initStage(stage:Stage):void
[static] Utility method to set up usual stage align and scaling.
Component
  Inherited
move(xpos:Number, ypos:Number):void
Moves the component to the specified position.
Component
  Inherited
setSize(w:Number, h:Number):void
Sets the size of the component.
Component
Protected Methods
  Method Defined By
   
addChildren():void
[override] Creates the children for this component
CheckBox
  Inherited
getShadow(dist:Number, knockout:Boolean = false):DropShadowFilter
DropShadowFilter factory method, used in many of the components.
Component
   
init():void
[override] Initializes the component.
CheckBox
  Inherited
invalidate():void
Marks the component to be redrawn on the next frame.
Component
   
onClick(event:MouseEvent):void
Internal click handler.
CheckBox
  Inherited
onInvalidate(event:Event):void
Called one frame after invalidate is called.
Component
Public Constants
  Constant Defined By
  Inherited DRAW : String = draw
[static]
Component
Property Detail
_back property
protected var _back:Sprite

_button property  
protected var _button:Sprite

_label property  
protected var _label:Label

_labelText property  
protected var _labelText:String

_selected property  
protected var _selected:Boolean = false

enabled property  
enabled:Boolean[override]

Sets/gets whether this component will be enabled or not.


Implementation
    public function get enabled():Boolean
    public function set enabled(value:Boolean):void
label property  
label:String

Sets / gets the label text shown on this CheckBox.


Implementation
    public function get label():String
    public function set label(value:String):void
selected property  
selected:Boolean

Sets / gets the selected state of this CheckBox.


Implementation
    public function get selected():Boolean
    public function set selected(value:Boolean):void
Constructor Detail
CheckBox () Constructor
public function CheckBox(parent:DisplayObjectContainer = null, xpos:Number = 0, ypos:Number = 0, label:String, defaultHandler:Function = null)

Constructor

Parameters
parent:DisplayObjectContainer (default = null) — The parent DisplayObjectContainer on which to add this CheckBox.
 
xpos:Number (default = 0) — The x position to place this component.
 
ypos:Number (default = 0) — The y position to place this component.
 
label:String — String containing the label for this component.
 
defaultHandler:Function (default = null) — The event handling function to handle the default event for this component (click in this case).
Method Detail
addChildren () method
override protected function addChildren():void

Creates the children for this component

draw () method  
override public function draw():void

Draws the visual ui of the component.

init () method  
override protected function init():void

Initializes the component.

onClick () method  
protected function onClick(event:MouseEvent):void

Internal click handler.

Parameters

event:MouseEvent — The MouseEvent passed by the system.