Package | com.bit101.components |
Class | public class RadioButton |
Inheritance | RadioButton ![]() ![]() |
Property | Defined By | ||
---|---|---|---|
![]() |
enabled : Boolean
Sets/gets whether this component is enabled or not.
|
Component | |
groupName : String
Sets / gets the group name, which allows groups of RadioButtons to function seperately.
|
RadioButton | ||
![]() |
height : Number [override]
Sets/gets the height of the component.
|
Component | |
label : String
Sets / gets the label text shown on this CheckBox.
|
RadioButton | ||
selected : Boolean
Sets / gets the selected state of this CheckBox.
|
RadioButton | ||
![]() |
tag : int
Sets/gets in integer that can identify the component.
|
Component | |
![]() |
width : Number [override]
Sets/gets the width of the component.
|
Component | |
![]() |
x : Number [override] [write-only]
Overrides the setter for x to always place the component on a whole pixel.
|
Component | |
![]() |
y : Number [override] [write-only]
Overrides the setter for y to always place the component on a whole pixel.
|
Component |
Property | Defined By | ||
---|---|---|---|
_back : Sprite | RadioButton | ||
_button : Sprite | RadioButton | ||
buttons : Array [static]
|
RadioButton | ||
![]() |
_enabled : Boolean = true | Component | |
_groupName : String = defaultRadioGroup | RadioButton | ||
![]() |
_height : Number = 0 | Component | |
_label : Label | RadioButton | ||
_labelText : String | RadioButton | ||
![]() |
Ronda : Class | Component | |
_selected : Boolean = false | RadioButton | ||
![]() |
_tag : int = -1 | Component | |
![]() |
_width : Number = 0 | Component |
Method | Defined By | ||
---|---|---|---|
RadioButton(parent:DisplayObjectContainer = null, xpos:Number = 0, ypos:Number = 0, label:String, checked:Boolean = false, defaultHandler:Function = null)
Constructor
|
RadioButton | ||
draw():void
[override]
Draws the visual ui of the component.
|
RadioButton | ||
![]() |
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 | ||
---|---|---|---|
addButton(rb:RadioButton):void
[static]
Static method to add the newly created RadioButton to the list of buttons in the group.
|
RadioButton | ||
addChildren():void
[override]
Creates and adds the child display objects of this component.
|
RadioButton | ||
clear(rb:RadioButton):void
[static]
Unselects all RadioButtons in the group, except the one passed.
|
RadioButton | ||
![]() |
getShadow(dist:Number, knockout:Boolean = false):DropShadowFilter
DropShadowFilter factory method, used in many of the components.
|
Component | |
init():void
[override]
Initializes the component.
|
RadioButton | ||
![]() |
invalidate():void
Marks the component to be redrawn on the next frame.
|
Component | |
onClick(event:MouseEvent):void
Internal click handler.
|
RadioButton | ||
![]() |
onInvalidate(event:Event):void
Called one frame after invalidate is called.
|
Component |
_back | property |
protected var _back:Sprite
_button | property |
protected var _button:Sprite
_groupName | property |
protected var _groupName:String = defaultRadioGroup
_label | property |
protected var _label:Label
_labelText | property |
protected var _labelText:String
_selected | property |
protected var _selected:Boolean = false
buttons | property |
protected static var buttons:Array
groupName | property |
groupName:String
Sets / gets the group name, which allows groups of RadioButtons to function seperately.
public function get groupName():String
public function set groupName(value:String):void
label | property |
label:String
Sets / gets the label text shown on this CheckBox.
public function get label():String
public function set label(value:String):void
selected | property |
selected:Boolean
Sets / gets the selected state of this CheckBox.
public function get selected():Boolean
public function set selected(value:Boolean):void
RadioButton | () | Constructor |
public function RadioButton(parent:DisplayObjectContainer = null, xpos:Number = 0, ypos:Number = 0, label:String, checked:Boolean = false, defaultHandler:Function = null)
Constructor
Parameters
parent:DisplayObjectContainer (default = null ) — The parent DisplayObjectContainer on which to add this RadioButton.
|
|
xpos:Number (default = 0 ) — The x position to place this component.
|
|
ypos:Number (default = 0 ) — The y position to place this component.
|
|
label:String — The string to use for the initial label of this component.
|
|
checked:Boolean (default = false ) — The event handling function to handle the default event for this component (click in this case).
|
|
defaultHandler:Function (default = null )
|
addButton | () | method |
protected static function addButton(rb:RadioButton):void
Static method to add the newly created RadioButton to the list of buttons in the group.
Parameters
rb:RadioButton — The RadioButton to add.
|
addChildren | () | method |
override protected function addChildren():void
Creates and adds the child display objects of this component.
clear | () | method |
protected static function clear(rb:RadioButton):void
Unselects all RadioButtons in the group, except the one passed. This could use some rethinking or better naming.
Parameters
rb:RadioButton — The RadioButton to remain selected.
|
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.
|