Packagecom.gestureworks.cml.elements
Classpublic class RadioButtons
InheritanceRadioButtons Inheritance TouchContainer Inheritance com.gestureworks.core.TouchSprite

The RadioButtons element represents a group of radio buttons generated from a user defined list of labels. Other configurable properties include the primary font characteristics (style, size, and color), placement direction (right to left or top to bottom), and the spacing between the buttons.
                 
        var rButtons:RadioButtons = new RadioButtons("A,B,C,D,E");
        rButtons.x = 200;
        rButtons.y = 200;
        rButtons.labels = "Abracadabra,B,C,D,E,f,g,h,i,k";            
        rButtons.fontColor = 0xFF0216;            
        rButtons.verticalOffset = 70;
        rButtons.update();
        rButtons.addEventListener(StateEvent.CHANGE, testRBSelect);
        addChild(rButtons);
        
        
        function testRBSelect(event:StateEvent):void
        {
            trace(event.value);
        }    

     

See also

Button
DropDownMenu


Public Properties
 PropertyDefined By
  absOffset : Boolean = false
RadioButtons
 InheritedautoShuffle : Boolean
autoshuffles
TouchContainer
 InheritedchildList : ChildList
Returns the object's childList.
TouchContainer
 InheritedclassName : String
sets the class name of displayobject
TouchContainer
 InheritedcloneExclusions : Vector.<String>
[read-only] Returns a list of properties to exclude when cloning this object
TouchContainer
 InheritedcmlIndex : int
Returns the index created by the CML parser.
TouchContainer
 InheriteddimensionsTo : Object
Sets the dimensions of TouchContainer to given object
TouchContainer
 InheriteddropShadow : Boolean
Sets the drop shadow effect
TouchContainer
  fontAlpha : Number
The alpha for the labels.
RadioButtons
  fontColor : uint
RadioButtons
  fontSize : Number
RadioButtons
  fontStyle : String
RadioButtons
  graphicReps : String
A comma delimited string of ids of display objects to use for buttons.
RadioButtons
 Inheritedgroup : String
TouchContainer
 Inheritedheight : Number
[override] sets the height of the container
TouchContainer
 InheritedheightPercent : Number
sets the height of the container
TouchContainer
  horizontalOffset : Number
RadioButtons
 Inheritedid : String
Returns the object's id.
TouchContainer
  labels : String
RadioButtons
 Inheritedlayout : *
specifies the type of layout
TouchContainer
 InheritedlayoutList : Dictionary
TouchContainer
 InheritedmouseChildren : Boolean
[override] sets the mousechildren value to true or false.
TouchContainer
  nestedButtons : Boolean
Specifies whether the children are nested buttons.
RadioButtons
 InheritedpaddingBottom : Number
Sets the number of pixels between the container's bottom border and the bottom of its content area.
TouchContainer
 InheritedpaddingLeft : Number
Sets the number of pixels between the component's left border and the left edge of its content area.
TouchContainer
 InheritedpaddingRight : Number
Sets the number of pixels between the component's right border and the right edge of its content area.
TouchContainer
 InheritedpaddingTop : Number
Sets the number of pixels between the container's top border and the top of its content area.
TouchContainer
  pageButtons : Boolean
Set whether or not the buttons are being used for pagination.
RadioButtons
 Inheritedposition : *
Sets the position
TouchContainer
  radioButtons : Dictionary
[read-only]
RadioButtons
  radioColor : uint
The color for the radio buttons;
RadioButtons
  radioStroke : Number
The stroke of the radio button's graphic.
RadioButtons
  radioStrokeColor : uint
The color of a radio button's stroke;
RadioButtons
 InheritedrelativeX : Boolean
When set true this containers children's x position will be laid out relatively to each other.
TouchContainer
 InheritedrelativeY : Boolean
When set true this containers children's y position will be laid out relatively to each other.
TouchContainer
  selectedColor : uint
The color of the fill of the selected radio button;
RadioButtons
  selectedFillRatio : Number
The amount of fill when the radio button is selected.
RadioButtons
  selectedLabel : String
[read-only] The currently selected label
RadioButtons
 Inheritedsound : String
TouchContainer
 Inheritedstate : Dictionary
TouchContainer
 InheritedstateId : *
Returns the current state id.
TouchContainer
  textEls : Dictionary
[read-only]
RadioButtons
 InheritedtoBitmap : Boolean
TouchContainer
  verticalLayout : Boolean
RadioButtons
  verticalOffset : Number
RadioButtons
 Inheritedwidth : Number
[override] sets the width of the container
TouchContainer
 InheritedwidthPercent : Number
sets the width of the container
TouchContainer
Protected Properties
 PropertyDefined By
 InheritedcmlGestureList : Object
TouchContainer
Public Methods
 MethodDefined By
  
RadioButtons(labels:String = null)
RadioButton Constructor.
RadioButtons
 Inherited
TouchContainer
 Inherited
method searches the child and adds to the list
TouchContainer
 Inherited
addChild(child:DisplayObject):DisplayObject
[override] Adds child to display list and, if not already added, the child list
TouchContainer
 Inherited
addChildAt(child:DisplayObject, index:int):DisplayObject
[override] Adds child to display list and, if not already added, the child list
TouchContainer
 Inherited
applyLayout(value:* = null):void
Apply the containers layout
TouchContainer
 Inherited
childToList(id:String, child:*):void
child appended to the childlist
TouchContainer
 Inherited
clone():*
Clone method
TouchContainer
  
dispose():void
[override] Destructor
RadioButtons
 Inherited
getElementById(id:String):*
Searches CML childList by id.
TouchContainer
 Inherited
getElementsByClassName(className:String):Array
Searches the CML childList by className.
TouchContainer
 Inherited
getElementsByTagName(tagName:Class):Array
Searches the CML childList by tagName as Class.
TouchContainer
  
init():void
[override] Initializes the configuration and display of the RadioButtons
RadioButtons
 Inherited
loadState(sId:* = null, recursion:Boolean = false):void
Loads state by index number.
TouchContainer
 Inherited
makeGestureList(value:XMLList):Object
Creates gestureList object from XML
TouchContainer
 Inherited
parseCML(cml:XMLList):XMLList
Parse cml for local layouts.
TouchContainer
 Inherited
postparseCML(cml:XMLList):void
Abstract method allows the setting of a postparse CML routine.
TouchContainer
 Inherited
querySelector(selector:String):*
Searches the CML childList by selector.
TouchContainer
 Inherited
querySelectorAll(selector:*):Array
Search the CML childList by selector.
TouchContainer
 Inherited
removeChild(child:DisplayObject):DisplayObject
[override] Removes child from display list and, if not already removed, the child list
TouchContainer
 Inherited
removeChildAt(index:int):DisplayObject
[override] Removes child from display list and, if not already removed, the child list
TouchContainer
 Inherited
removeChildren(beginIndex:int = 0, endIndex:int = 2147483647):void
[override] Removes children from display list and, if not already removed, the child list
TouchContainer
 Inherited
saveState(sId:* = null, recursion:Boolean = false):void
Save state by index number.
TouchContainer
 Inherited
searchChildren(value:*, returnType:Class = null):*
This method does a depth first search of childLists.
TouchContainer
  
selectButton(s:String):void
RadioButtons
 Inherited
method sets the dimensions of each child
TouchContainer
 Inherited
tweenState(sId:* = null, tweenTime:Number = 1):void
Tween state by stateIndex from current to given state index.
TouchContainer
  
update():void
Re-draws the display to incorporate any changes.
RadioButtons
 Inherited
Updates child padding within this container
TouchContainer
 Inherited
Updates child percent dimensions within this container
TouchContainer
 Inherited
updateProperties(state:* = 0):void
Updates properties from state.
TouchContainer
 Inherited
Updates child relative positions within this container
TouchContainer
Property Detail
absOffsetproperty
public var absOffset:Boolean = false

fontAlphaproperty 
fontAlpha:Number

The alpha for the labels.


Implementation
    public function get fontAlpha():Number
    public function set fontAlpha(value:Number):void
fontColorproperty 
fontColor:uint


Implementation
    public function get fontColor():uint
    public function set fontColor(value:uint):void
fontSizeproperty 
fontSize:Number


Implementation
    public function get fontSize():Number
    public function set fontSize(value:Number):void
fontStyleproperty 
fontStyle:String


Implementation
    public function get fontStyle():String
    public function set fontStyle(value:String):void
graphicRepsproperty 
graphicReps:String

A comma delimited string of ids of display objects to use for buttons. If a display object is selected this way, its alpha will be dimmed when not selected.


Implementation
    public function get graphicReps():String
    public function set graphicReps(value:String):void
horizontalOffsetproperty 
horizontalOffset:Number


Implementation
    public function get horizontalOffset():Number
    public function set horizontalOffset(value:Number):void
labelsproperty 
labels:String


Implementation
    public function get labels():String
    public function set labels(value:String):void
nestedButtonsproperty 
nestedButtons:Boolean

Specifies whether the children are nested buttons.


Implementation
    public function get nestedButtons():Boolean
    public function set nestedButtons(value:Boolean):void
pageButtonsproperty 
pageButtons:Boolean

Set whether or not the buttons are being used for pagination. This will automatically add arrows to either side of the buttons the same color as them.


Implementation
    public function get pageButtons():Boolean
    public function set pageButtons(value:Boolean):void
radioButtonsproperty 
radioButtons:Dictionary  [read-only]


Implementation
    public function get radioButtons():Dictionary
radioColorproperty 
radioColor:uint

The color for the radio buttons;


Implementation
    public function get radioColor():uint
    public function set radioColor(value:uint):void
radioStrokeproperty 
radioStroke:Number

The stroke of the radio button's graphic.


Implementation
    public function get radioStroke():Number
    public function set radioStroke(value:Number):void
radioStrokeColorproperty 
radioStrokeColor:uint

The color of a radio button's stroke;


Implementation
    public function get radioStrokeColor():uint
    public function set radioStrokeColor(value:uint):void
selectedColorproperty 
selectedColor:uint

The color of the fill of the selected radio button;


Implementation
    public function get selectedColor():uint
    public function set selectedColor(value:uint):void
selectedFillRatioproperty 
selectedFillRatio:Number

The amount of fill when the radio button is selected.


Implementation
    public function get selectedFillRatio():Number
    public function set selectedFillRatio(value:Number):void
selectedLabelproperty 
selectedLabel:String  [read-only]

The currently selected label


Implementation
    public function get selectedLabel():String
textElsproperty 
textEls:Dictionary  [read-only]


Implementation
    public function get textEls():Dictionary
verticalLayoutproperty 
verticalLayout:Boolean


Implementation
    public function get verticalLayout():Boolean
    public function set verticalLayout(value:Boolean):void
verticalOffsetproperty 
verticalOffset:Number


Implementation
    public function get verticalOffset():Number
    public function set verticalOffset(value:Number):void
Constructor Detail
RadioButtons()Constructor
public function RadioButtons(labels:String = null)

RadioButton Constructor. Allows users to define a group of radio buttons by passing a comma delimited string containing label names.

Parameters
labels:String (default = null) — the comma delimited list of labels
Method Detail
dispose()method
override public function dispose():void

Destructor

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

Initializes the configuration and display of the RadioButtons

selectButton()method 
public function selectButton(s:String):void

Parameters

s:String

update()method 
public function update():void

Re-draws the display to incorporate any changes.