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



Public Properties
  Property Defined By
  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
    labelPrecision : int
Sets / gets how many decimal points of precision will be shown.
NumericStepper
    maximum : Number
Sets / gets the maximum value for this component.
NumericStepper
    minimum : Number
Sets / gets the maximum value for this component.
NumericStepper
    repeatTime : int
Gets/sets the update rate that the stepper will change its value if a button is held down.
NumericStepper
    step : Number
Sets / gets the amount the value will change when the up or down button is pressed.
NumericStepper
  Inherited tag : int
Sets/gets in integer that can identify the component.
Component
    value : Number
Sets / gets the current value of this component.
NumericStepper
  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
    _delayTimer : Timer
NumericStepper
    _direction : String
NumericStepper
  Inherited _enabled : Boolean = true
Component
  Inherited _height : Number = 0
Component
    _labelPrecision : int = 1
NumericStepper
    _maximum : Number = Infinity
NumericStepper
    _minimum : Number = -Infinity
NumericStepper
    _minusBtn : PushButton
NumericStepper
    _plusBtn : PushButton
NumericStepper
    _repeatTime : int = 100
NumericStepper
    _repeatTimer : Timer
NumericStepper
  Inherited Ronda : Class
Component
    _step : Number = 1
NumericStepper
  Inherited _tag : int = -1
Component
    _value : Number = 0
NumericStepper
    _valueText : InputText
NumericStepper
  Inherited _width : Number = 0
Component
Public Methods
  Method Defined By
   
NumericStepper(parent:DisplayObjectContainer = null, xpos:Number = 0, ypos:Number = 0, defaultHandler:Function = null)
Constructor
NumericStepper
   
draw():void
[override] Draws the visual ui of the component.
NumericStepper
  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 and adds the child display objects of this component.
NumericStepper
   
decrement():void
NumericStepper
  Inherited
getShadow(dist:Number, knockout:Boolean = false):DropShadowFilter
DropShadowFilter factory method, used in many of the components.
Component
   
increment():void
NumericStepper
   
init():void
[override] Initializes the component.
NumericStepper
  Inherited
invalidate():void
Marks the component to be redrawn on the next frame.
Component
   
onDelayComplete(event:TimerEvent):void
NumericStepper
  Inherited
onInvalidate(event:Event):void
Called one frame after invalidate is called.
Component
   
onMinus(event:MouseEvent):void
Called when the minus button is pressed.
NumericStepper
   
onMouseUp(event:MouseEvent):void
NumericStepper
   
onPlus(event:MouseEvent):void
Called when the plus button is pressed.
NumericStepper
   
onRepeat(event:TimerEvent):void
NumericStepper
   
onValueTextChange(event:Event):void
Called when the value is changed manually.
NumericStepper
Public Constants
  Constant Defined By
  Inherited DRAW : String = draw
[static]
Component
Protected Constants
  Constant Defined By
    DELAY_TIME : int = 500
NumericStepper
    DOWN : String = down
NumericStepper
    UP : String = up
NumericStepper
Property Detail
_delayTimer property
protected var _delayTimer:Timer

_direction property  
protected var _direction:String

_labelPrecision property  
protected var _labelPrecision:int = 1

_maximum property  
protected var _maximum:Number = Infinity

_minimum property  
protected var _minimum:Number = -Infinity

_minusBtn property  
protected var _minusBtn:PushButton

_plusBtn property  
protected var _plusBtn:PushButton

_repeatTime property  
protected var _repeatTime:int = 100

_repeatTimer property  
protected var _repeatTimer:Timer

_step property  
protected var _step:Number = 1

_value property  
protected var _value:Number = 0

_valueText property  
protected var _valueText:InputText

labelPrecision property  
labelPrecision:int

Sets / gets how many decimal points of precision will be shown.


Implementation
    public function get labelPrecision():int
    public function set labelPrecision(value:int):void
maximum property  
maximum:Number

Sets / gets the maximum value for this component.


Implementation
    public function get maximum():Number
    public function set maximum(value:Number):void
minimum property  
minimum:Number

Sets / gets the maximum value for this component.


Implementation
    public function get minimum():Number
    public function set minimum(value:Number):void
repeatTime property  
repeatTime:int

Gets/sets the update rate that the stepper will change its value if a button is held down.


Implementation
    public function get repeatTime():int
    public function set repeatTime(value:int):void
step property  
step:Number

Sets / gets the amount the value will change when the up or down button is pressed. Must be zero or positive.


Implementation
    public function get step():Number
    public function set step(value:Number):void
value property  
value:Number

Sets / gets the current value of this component.


Implementation
    public function get value():Number
    public function set value(value:Number):void
Constructor Detail
NumericStepper () Constructor
public function NumericStepper(parent:DisplayObjectContainer = null, xpos:Number = 0, ypos:Number = 0, defaultHandler:Function = null)

Constructor

Parameters
parent:DisplayObjectContainer (default = null) — The parent DisplayObjectContainer on which to add this Slider.
 
xpos:Number (default = 0) — The x position to place this component.
 
ypos:Number (default = 0) — The y position to place 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 and adds the child display objects of this component.

decrement () method  
protected function decrement():void

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

Draws the visual ui of the component.

increment () method  
protected function increment():void

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

Initializes the component.

onDelayComplete () method  
protected function onDelayComplete(event:TimerEvent):void

Parameters

event:TimerEvent
onMinus () method  
protected function onMinus(event:MouseEvent):void

Called when the minus button is pressed. Decrements the value by the step amount.

Parameters

event:MouseEvent
onMouseUp () method  
protected function onMouseUp(event:MouseEvent):void

Parameters

event:MouseEvent
onPlus () method  
protected function onPlus(event:MouseEvent):void

Called when the plus button is pressed. Increments the value by the step amount.

Parameters

event:MouseEvent
onRepeat () method  
protected function onRepeat(event:TimerEvent):void

Parameters

event:TimerEvent
onValueTextChange () method  
protected function onValueTextChange(event:Event):void

Called when the value is changed manually.

Parameters

event:Event
Constant Detail
DELAY_TIME Constant
protected const DELAY_TIME:int = 500

DOWN Constant  
protected const DOWN:String = down

UP Constant  
protected const UP:String = up