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



Public Properties
  Property Defined By
    choice : uint
Gets / sets the current choice, keeping it in range of 0 to numChoices - 1.
RotarySelector
  Inherited enabled : Boolean
Sets/gets whether this component is enabled or not.
Component
  Inherited height : Number
[override] Sets/gets the height of the component.
Component
    labelMode : String
Specifies what will be used as labels for each choice.
RotarySelector
    numChoices : uint
Gets / sets the number of available choices (maximum of 10).
RotarySelector
  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
    _choice : Number = 0
RotarySelector
  Inherited _enabled : Boolean = true
Component
  Inherited _height : Number = 0
Component
    _knob : Sprite
RotarySelector
    _label : Label
RotarySelector
    _labelMode : String = alphabetic
RotarySelector
    _labels : Sprite
RotarySelector
    _labelText : String
RotarySelector
    _numChoices : int = 2
RotarySelector
  Inherited Ronda : Class
Component
  Inherited _tag : int = -1
Component
  Inherited _width : Number = 0
Component
Public Methods
  Method Defined By
   
RotarySelector(parent:DisplayObjectContainer = null, xpos:Number = 0, ypos:Number = 0, label:String, defaultHandler:Function = null)
Constructor
RotarySelector
   
draw():void
[override] Draws the visual ui of the component.
RotarySelector
  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
RotarySelector
   
decrement():void
Decrements the index of the current choice.
RotarySelector
   
drawKnob(radius:Number):void
Draw the knob at the specified radius.
RotarySelector
  Inherited
getShadow(dist:Number, knockout:Boolean = false):DropShadowFilter
DropShadowFilter factory method, used in many of the components.
Component
   
increment():void
Increments the index of the current choice.
RotarySelector
   
init():void
[override] Initializes the component.
RotarySelector
  Inherited
invalidate():void
Marks the component to be redrawn on the next frame.
Component
   
onClick(event:MouseEvent):void
Internal click handler.
RotarySelector
  Inherited
onInvalidate(event:Event):void
Called one frame after invalidate is called.
Component
   
onLabelClick(event:Event):void
RotarySelector
   
resetLabels():void
Removes old labels.
RotarySelector
Public Constants
  Constant Defined By
    ALPHABETIC : String = alphabetic
[static]
RotarySelector
  Inherited DRAW : String = draw
[static]
Component
    NONE : String = none
[static]
RotarySelector
    NUMERIC : String = numeric
[static]
RotarySelector
    ROMAN : String = roman
[static]
RotarySelector
Property Detail
_choice property
protected var _choice:Number = 0

_knob property  
protected var _knob:Sprite

_label property  
protected var _label:Label

_labelMode property  
protected var _labelMode:String = alphabetic

_labels property  
protected var _labels:Sprite

_labelText property  
protected var _labelText:String

_numChoices property  
protected var _numChoices:int = 2

choice property  
choice:uint

Gets / sets the current choice, keeping it in range of 0 to numChoices - 1.


Implementation
    public function get choice():uint
    public function set choice(value:uint):void
labelMode property  
labelMode:String

Specifies what will be used as labels for each choice. Valid values are "alphabetic", "numeric", and "none".


Implementation
    public function get labelMode():String
    public function set labelMode(value:String):void
numChoices property  
numChoices:uint

Gets / sets the number of available choices (maximum of 10).


Implementation
    public function get numChoices():uint
    public function set numChoices(value:uint):void
Constructor Detail
RotarySelector () Constructor
public function RotarySelector(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 (change in this case).
Method Detail
addChildren () method
override protected function addChildren():void

Creates the children for this component

decrement () method  
protected function decrement():void

Decrements the index of the current choice.

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

Draws the visual ui of the component.

drawKnob () method  
protected function drawKnob(radius:Number):void

Draw the knob at the specified radius.

Parameters

radius:Number — The radius with which said knob will be drawn.
increment () method  
protected function increment():void

Increments the index of the current choice.

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.
onLabelClick () method  
protected function onLabelClick(event:Event):void

Parameters

event:Event
resetLabels () method  
protected function resetLabels():void

Removes old labels.

Constant Detail
ALPHABETIC Constant
public static const ALPHABETIC:String = alphabetic

NONE Constant  
public static const NONE:String = none

NUMERIC Constant  
public static const NUMERIC:String = numeric

ROMAN Constant  
public static const ROMAN:String = roman