Package | com.bit101.components |
Class | public class RotarySelector |
Inheritance | RotarySelector ![]() ![]() |
Property | Defined By | ||
---|---|---|---|
choice : uint
Gets / sets the current choice, keeping it in range of 0 to numChoices - 1.
|
RotarySelector | ||
![]() |
enabled : Boolean
Sets/gets whether this component is enabled or not.
|
Component | |
![]() |
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 | ||
![]() |
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 | ||
---|---|---|---|
_choice : Number = 0 | RotarySelector | ||
![]() |
_enabled : Boolean = true | Component | |
![]() |
_height : Number = 0 | Component | |
_knob : Sprite | RotarySelector | ||
_label : Label | RotarySelector | ||
_labelMode : String = alphabetic | RotarySelector | ||
_labels : Sprite | RotarySelector | ||
_labelText : String | RotarySelector | ||
_numChoices : int = 2 | RotarySelector | ||
![]() |
Ronda : Class | Component | |
![]() |
_tag : int = -1 | Component | |
![]() |
_width : Number = 0 | Component |
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 | ||
![]() |
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 | ||
---|---|---|---|
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 | ||
![]() |
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 | ||
![]() |
invalidate():void
Marks the component to be redrawn on the next frame.
|
Component | |
onClick(event:MouseEvent):void
Internal click handler.
|
RotarySelector | ||
![]() |
onInvalidate(event:Event):void
Called one frame after invalidate is called.
|
Component | |
onLabelClick(event:Event):void
|
RotarySelector | ||
resetLabels():void
Removes old labels.
|
RotarySelector |
Constant | Defined By | ||
---|---|---|---|
ALPHABETIC : String = alphabetic [static]
|
RotarySelector | ||
![]() |
DRAW : String = draw [static]
|
Component | |
NONE : String = none [static]
|
RotarySelector | ||
NUMERIC : String = numeric [static]
|
RotarySelector | ||
ROMAN : String = roman [static]
|
RotarySelector |
_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.
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".
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).
public function get numChoices():uint
public function set numChoices(value:uint):void
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).
|
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.
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