Package | com.bit101.components |
Class | public class UISlider |
Inheritance | UISlider ![]() ![]() |
Subclasses | HUISlider, VUISlider |
Property | Defined By | ||
---|---|---|---|
![]() |
enabled : Boolean
Sets/gets whether this component is enabled or not.
|
Component | |
![]() |
height : Number [override]
Sets/gets the height of the component.
|
Component | |
label : String
Gets / sets the text shown in this component's label.
|
UISlider | ||
labelPrecision : int
Gets / sets the number of decimals to format the value label.
|
UISlider | ||
maximum : Number
Gets / sets the maximum value of this slider.
|
UISlider | ||
minimum : Number
Gets / sets the minimum value of this slider.
|
UISlider | ||
![]() |
tag : int
Sets/gets in integer that can identify the component.
|
Component | |
tick : Number
Gets / sets the tick value of this slider.
|
UISlider | ||
value : Number
Sets / gets the current value of this slider.
|
UISlider | ||
![]() |
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 | ||
---|---|---|---|
![]() |
_enabled : Boolean = true | Component | |
![]() |
_height : Number = 0 | Component | |
_label : Label | UISlider | ||
_labelText : String | UISlider | ||
_precision : int = 1 | UISlider | ||
![]() |
Ronda : Class | Component | |
_slider : Slider | UISlider | ||
_sliderClass : Class | UISlider | ||
![]() |
_tag : int = -1 | Component | |
_tick : Number = 1 | UISlider | ||
_valueLabel : Label | UISlider | ||
![]() |
_width : Number = 0 | Component |
Method | Defined By | ||
---|---|---|---|
UISlider(parent:DisplayObjectContainer = null, xpos:Number = 0, ypos:Number = 0, label:String, defaultHandler:Function = null)
Constructor
|
UISlider | ||
draw():void
[override]
Draws the visual ui of this component.
|
UISlider | ||
![]() |
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 | |
setSliderParams(min:Number, max:Number, value:Number):void
Convenience method to set the three main parameters in one shot.
|
UISlider |
Method | Defined By | ||
---|---|---|---|
addChildren():void
[override]
Creates and adds the child display objects of this component.
|
UISlider | ||
formatValueLabel():void
Formats the value of the slider to a string based on the current level of precision.
|
UISlider | ||
![]() |
getShadow(dist:Number, knockout:Boolean = false):DropShadowFilter
DropShadowFilter factory method, used in many of the components.
|
Component | |
![]() |
init():void
Initilizes the component.
|
Component | |
![]() |
invalidate():void
Marks the component to be redrawn on the next frame.
|
Component | |
![]() |
onInvalidate(event:Event):void
Called one frame after invalidate is called.
|
Component | |
onSliderChange(event:Event):void
Handler called when the slider's value changes.
|
UISlider | ||
positionLabel():void
Positions the label when it has changed.
|
UISlider |
_label | property |
protected var _label:Label
_labelText | property |
protected var _labelText:String
_precision | property |
protected var _precision:int = 1
_slider | property |
protected var _slider:Slider
_sliderClass | property |
protected var _sliderClass:Class
_tick | property |
protected var _tick:Number = 1
_valueLabel | property |
protected var _valueLabel:Label
label | property |
label:String
Gets / sets the text shown in this component's label.
public function get label():String
public function set label(value:String):void
labelPrecision | property |
labelPrecision:int
Gets / sets the number of decimals to format the value label. Does not affect the actual value of the slider, just the number shown.
public function get labelPrecision():int
public function set labelPrecision(value:int):void
maximum | property |
maximum:Number
Gets / sets the maximum value of this slider.
public function get maximum():Number
public function set maximum(value:Number):void
minimum | property |
minimum:Number
Gets / sets the minimum value of this slider.
public function get minimum():Number
public function set minimum(value:Number):void
tick | property |
tick:Number
Gets / sets the tick value of this slider. This round the value to the nearest multiple of this number.
public function get tick():Number
public function set tick(value:Number):void
value | property |
value:Number
Sets / gets the current value of this slider.
public function get value():Number
public function set value(value:Number):void
UISlider | () | Constructor |
public function UISlider(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 UISlider.
|
|
xpos:Number (default = 0 ) — The x position to place this component.
|
|
ypos:Number (default = 0 ) — The y position to place this component.
|
|
label:String — The initial string to display as this component's label.
|
|
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 and adds the child display objects of this component.
draw | () | method |
override public function draw():void
Draws the visual ui of this component.
formatValueLabel | () | method |
protected function formatValueLabel():void
Formats the value of the slider to a string based on the current level of precision.
onSliderChange | () | method |
protected function onSliderChange(event:Event):void
Handler called when the slider's value changes.
Parameters
event:Event — The Event passed by the slider.
|
positionLabel | () | method |
protected function positionLabel():void
Positions the label when it has changed. Implemented in child classes.
setSliderParams | () | method |
public function setSliderParams(min:Number, max:Number, value:Number):void
Convenience method to set the three main parameters in one shot.
Parameters
min:Number — The minimum value of the slider.
|
|
max:Number — The maximum value of the slider.
|
|
value:Number — The value of the slider.
|