| Package | com.gestureworks.cml.element |
| Class | public class RadioButtons |
| Inheritance | RadioButtons Container ContainerFactory ElementFactory flash.display.Sprite |
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
| Property | Defined By | ||
|---|---|---|---|
| absOffset : Boolean = false | RadioButtons | ||
![]() | alpha : Number [override] [write-only]
sets the alpha for display objects
| ElementFactory | |
![]() | blur : Boolean
Sets the drop shadow effect
| ElementFactory | |
![]() | bottom : Number
sets the bottom value
| ElementFactory | |
![]() | childList : ChildList [read-only]
store the child list
| ContainerFactory | |
![]() | class_ : String
Object's css class;
| ElementFactory | |
![]() | className : String
sets the class name of displayobject
| ElementFactory | |
![]() | cmlIndex : int
sets the cml index
| ElementFactory | |
![]() | debugStyle : *
sets the debug style
| ElementFactory | |
![]() | dimensionsTo : String
sets the dimensions of the container
| ContainerFactory | |
![]() | displayEvents : String
Use for dispatch completes. | ElementFactory | |
![]() | dropShadow : Boolean
Sets the drop shadow effect
| ElementFactory | |
| 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 | ||
![]() | height : Number [override]
Sets width of the display object in pixels
| ElementFactory | |
![]() | heightPercent : String
sets the height percent of display object
| ElementFactory | |
![]() | horizontalCenter : Number
sets the horizontal center of display object
| ElementFactory | |
| horizontalOffset : Number | RadioButtons | ||
![]() | id : String
sets the id of child
| ElementFactory | |
![]() | index : int
sets the index of display object
| ElementFactory | |
![]() | infoSource : String
sets info source
| ContainerFactory | |
| labels : String | RadioButtons | ||
![]() | layout : *
Sets the layout of the container
| Container | |
![]() | layoutComplete : Function
Sets the function to call when the layout is complete
| Container | |
![]() | layoutList : Dictionary
Defines the layoutlist
| Container | |
![]() | layoutUpdate : Function
Sets the function to call when the layout updates
| Container | |
![]() | left : Number
sets left value
| ElementFactory | |
![]() | paddingBottom : Number
Sets the number of pixels between the container's bottom border and the bottom of its content area. | Container | |
![]() | paddingLeft : Number
Sets the number of pixels between the component's left border and the left edge of its content area. | Container | |
![]() | paddingRight : Number
Sets the number of pixels between the component's right border and the right edge of its content area. | Container | |
![]() | paddingTop : Number
Sets the number of pixels between the container's top border and the top of its content area. | Container | |
| pageButtons : Boolean
Set whether or not the buttons are being used for pagination. | RadioButtons | ||
![]() | position : String
Sets the position
| Container | |
![]() | propertyStates : Array Deprecated: Please Use state | ElementFactory | |
| 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 | ||
![]() | right : Number
sets the right value
| ElementFactory | |
![]() | scale : Number
Sets both the x and y scale values
| ElementFactory | |
![]() | scaleX : Number [override]
Sets width of the display object in pixels
| ElementFactory | |
![]() | scaleY : Number [override]
Sets width of the display object in pixels
| ElementFactory | |
| 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 | ||
![]() | state : Array
property states array
| ElementFactory | |
| textEls : Dictionary [read-only] | RadioButtons | ||
![]() | top : Number
sets top value
| ElementFactory | |
![]() | verticalCenter : Number
sets the vertical center of display object
| ElementFactory | |
| verticalLayout : Boolean | RadioButtons | ||
| verticalOffset : Number | RadioButtons | ||
![]() | width : Number [override]
Sets width of the display object in pixels
| ElementFactory | |
![]() | widthPercent : String
sets the percent of width of display object
| ElementFactory | |
| Method | Defined By | ||
|---|---|---|---|
RadioButtons(labels:String = null)
RadioButton Constructor. | RadioButtons | ||
![]() | addAllChildren():void
This method searches the childlist and add the children
| ContainerFactory | |
![]() | addChild(child:DisplayObject):DisplayObject [override]
Adds child to display list and, if not already added, the child list
TODO: This mechanism should be abstracted to better syncrhonize child and display lists
| Container | |
![]() | applyLayout(value:* = null):void
Apply the containers layout
| Container | |
![]() | childToList(id:String, child:*):void
this method append to the childlist
| ContainerFactory | |
![]() | clone():*
Returns clone of self
| ElementFactory | |
displayComplete():void [override]
CML display initialization callback
| RadioButtons | ||
dispose():void [override]
Dispose methods and remove listeners
| RadioButtons | ||
![]() | getIndex(index:int):*
returns childlist index
| Container | |
![]() | getKey(key:String):*
returns the childlist key
| Container | |
![]() | hideIndex(index:int):void
hides the childlist index
| Container | |
![]() | hideKey(key:String):void
hides the childlist key
| Container | |
init():void [override]
Initializes the configuration and display of the RadioButtons
| RadioButtons | ||
![]() | parseCML(cml:XMLList):XMLList [override]
Parse cml for local layouts. | Container | |
![]() | postparseCML(cml:XMLList):void
post parses the cml file
| ElementFactory | |
![]() | searchChildren(value:*, returnType:Class = null):*
This method does a depth first search of childLists. | Container | |
selectButton(s:String):void | RadioButtons | ||
![]() | setDimensionsToChild():void
This method sets the dimensions of childlist
| ContainerFactory | |
![]() | showIndex(index:int):void
shows the childlist index
| Container | |
![]() | showKey(key:String):void
shows the childlist key
| Container | |
update():void
Re-draws the display to incorporate any changes. | RadioButtons | ||
![]() | updateProperties(state:Number = 0):void
this method updates the properties
| ElementFactory | |
| absOffset | property |
public var absOffset:Boolean = false| fontAlpha | property |
fontAlpha:NumberThe alpha for the labels.
public function get fontAlpha():Number public function set fontAlpha(value:Number):void| fontColor | property |
fontColor:uint public function get fontColor():uint public function set fontColor(value:uint):void| fontSize | property |
fontSize:Number public function get fontSize():Number public function set fontSize(value:Number):void| fontStyle | property |
fontStyle:String public function get fontStyle():String public function set fontStyle(value:String):void| graphicReps | property |
graphicReps:StringA 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.
public function get graphicReps():String public function set graphicReps(value:String):void| horizontalOffset | property |
horizontalOffset:Number public function get horizontalOffset():Number public function set horizontalOffset(value:Number):void| labels | property |
labels:String public function get labels():String public function set labels(value:String):void| pageButtons | property |
pageButtons:BooleanSet 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.
public function get pageButtons():Boolean public function set pageButtons(value:Boolean):void| radioButtons | property |
radioButtons:Dictionary [read-only] public function get radioButtons():Dictionary| radioColor | property |
radioColor:uintThe color for the radio buttons;
public function get radioColor():uint public function set radioColor(value:uint):void| radioStroke | property |
radioStroke:NumberThe stroke of the radio button's graphic.
public function get radioStroke():Number public function set radioStroke(value:Number):void| radioStrokeColor | property |
radioStrokeColor:uintThe color of a radio button's stroke;
public function get radioStrokeColor():uint public function set radioStrokeColor(value:uint):void| selectedColor | property |
selectedColor:uintThe color of the fill of the selected radio button;
public function get selectedColor():uint public function set selectedColor(value:uint):void| selectedFillRatio | property |
selectedFillRatio:NumberThe amount of fill when the radio button is selected.
public function get selectedFillRatio():Number public function set selectedFillRatio(value:Number):void| selectedLabel | property |
selectedLabel:String [read-only] The currently selected label
public function get selectedLabel():String| textEls | property |
textEls:Dictionary [read-only] public function get textEls():Dictionary| verticalLayout | property |
verticalLayout:Boolean public function get verticalLayout():Boolean public function set verticalLayout(value:Boolean):void| verticalOffset | property |
verticalOffset:Number public function get verticalOffset():Number public function set verticalOffset(value:Number):void| 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.
Parameterslabels:String (default = null) — the comma delimited list of labels
|
| displayComplete | () | method |
override public function displayComplete():voidCML display initialization callback
| dispose | () | method |
override public function dispose():voidDispose methods and remove listeners
| init | () | method |
override public function init():voidInitializes the configuration and display of the RadioButtons
| selectButton | () | method |
public function selectButton(s:String):voidParameters
s:String |
| update | () | method |
public function update():voidRe-draws the display to incorporate any changes.