Package | km.components |
Class | public class NumericStepper |
Inheritance | NumericStepper ![]() ![]() |
import km.components.*; import km.skins.*; var ns:NumericStepper = new NumericStepper(); ScriptedSkin.applyTo(ns); ns.move(20, 20); addChild(ns); ns.minimum = 0; ns.maximum = 255; ns.stepSize = 25.5; ns.value = 0; ns.onChange = updateShape; var s:Shape = new Shape(); s.x = 20; s.y = 50; addChild(s); function updateShape():void { s.graphics.clear(); s.graphics.beginFill(ns.value << 16); s.graphics.drawRect(0, 0, 40, 40); s.graphics.endFill(); } updateShape();
Property | Defined by | ||
---|---|---|---|
background : Image
[read-only] >> Reference to the background image.
| NumericStepper | ||
btnDec : BaseButton
[read-only] >> Reference to the decrease button.
| NumericStepper | ||
btnInc : BaseButton
[read-only] >> Reference to the increase button.
| NumericStepper | ||
![]() | duotone : Array The duotone property can be used to convert the colors of the component into duotone.
| UIComponent | |
![]() | enabled : Boolean Specifies if the component is enabled.
If a component is disabled, it will be turned into grayscale and become partly transparent. | UIComponent | |
![]() | height : Number | UIComponent | |
label : Label
[read-only] >> Reference to the label.
| NumericStepper | ||
margin : int The margin between the bounding box of the background and the sub components inside.
| NumericStepper | ||
maximum : Number Gets or sets the maximum value.
| NumericStepper | ||
minimum : Number Gets or sets the minimum value.
| NumericStepper | ||
onChange : Function onChange handler.
| NumericStepper | ||
stepSize : Number Gets or sets the step size.
| NumericStepper | ||
![]() | toolTip : String Text to use as toolTip when ToolTip is enabled.
| UIComponent | |
value : Number Gets or sets the current value.
| NumericStepper | ||
![]() | width : Number | UIComponent | |
![]() | x : Number | UIComponent | |
![]() | y : Number | UIComponent |
Method | Defined by | ||
---|---|---|---|
NumericStepper | |||
![]() |
clone():*
Returns a clone of the component.
The skin of the component is cloned but other things like the text of a label or the items of a list aren't. | UIComponent | |
![]() |
move(x:int, y:int, animationMode:int = 0, animationFrames:int = 12, easeInOut:Boolean = false):void
Moves the component to the specified coordinates.
| UIComponent | |
![]() |
setProperties(o:Object):void
Sets a number of properties at once.
| UIComponent | |
![]() |
setSize(w:int, h:int):void
Sets the size width and height.
| UIComponent |
Event | Summary | Defined by | ||
---|---|---|---|---|
![]() | The animationComplete event is broadcasted when an animated move is completed. | UIComponent | ||
The change event is broadcasted when the value changes. When the value is changed by scripting, the event is not broadcasted. It's also possible to use the onChange handler. | NumericStepper |
background | property |
background:Image
[read-only]>> Reference to the background image.
Implementation public function get background():Image
btnDec | property |
btnDec:BaseButton
[read-only]>> Reference to the decrease button.
Implementation public function get btnDec():BaseButton
btnInc | property |
btnInc:BaseButton
[read-only]>> Reference to the increase button.
Implementation public function get btnInc():BaseButton
label | property |
margin | property |
public var margin:int
The margin between the bounding box of the background and the sub components inside.
maximum | property |
maximum:Number
[read-write]Gets or sets the maximum value.
Implementation public function get maximum():Number
public function set maximum(value:Number):void
minimum | property |
minimum:Number
[read-write]Gets or sets the minimum value.
Implementation public function get minimum():Number
public function set minimum(value:Number):void
onChange | property |
public var onChange:Function
onChange handler.
stepSize | property |
stepSize:Number
[read-write]Gets or sets the step size.
Implementation public function get stepSize():Number
public function set stepSize(value:Number):void
value | property |
value:Number
[read-write]Gets or sets the current value.
Implementation public function get value():Number
public function set value(value:Number):void
NumericStepper | () | constructor |
public function NumericStepper()
change | event |
flash.events.Event
The change event is broadcasted when the value changes.
When the value is changed by scripting, the event is not broadcasted.
It's also possible to use the onChange handler.