Package | com.eqsim.components |
Class | public class SectorDial |
Inheritance | SectorDial ![]() |
Subclasses | SectorDialSmooth |
This class implements a simple sector dial. Developers can set its
value by setting the val
property to have the
dial jump immediately to that value.
Users can change the appearance (skin) of the
hand by modifying: centerDotClassName
,
center of the dial by modifying: needleClassName
,
the background graphic by modifying: backgroundClassName
.
The component also provides properties to bring in attached graphics based on movie clip class names. This allows the developer to have multiple instances on the Stage with different looks.
Showing the dial center and background skins are optional.
Property | Defined By | ||
---|---|---|---|
backgroundClassName : String
This property gives the class name of the background to use. | SectorDial | ||
centerDotClassName : String
This property gives the class name of the center dot (overlay) to use. | SectorDial | ||
centerVis : Boolean
Boolean property indicating whether the center graphic is visible (true) or not (false). | SectorDial | ||
left2right : Boolean
Determines whether minimum is on the left (left2right == true) or on the right (left2right == false). | SectorDial | ||
maxAngle : Number
Angle of needle when reaches maximum value. | SectorDial | ||
maxVal : Number
Maximum value of the gauge. | SectorDial | ||
minAngle : Number
Angle of needle when reaches minimum value. | SectorDial | ||
minVal : Number
Minimum value of the gauge. | SectorDial | ||
needleClassName : String
This property gives the class name of the needle to use. | SectorDial | ||
nXScale : Number
Scaling factor along the y axis (height) for the needle. | SectorDial | ||
nYScale : Number | SectorDial | ||
showBack : Boolean
Boolean property indicating whether the background graphic is visible (true) or not (false). | SectorDial | ||
units : int
Number of units in a full cycle for the dial. | SectorDial | ||
val : Number
Current value of the dial (where needle is set). | SectorDial |
Property | Defined By | ||
---|---|---|---|
_backgroundClassName : String = defSectDialBkgnd | SectorDial | ||
bkgndClip : Sprite | SectorDial | ||
_centerDotClassName : String = defSectDialCenter | SectorDial | ||
_centerVis : Boolean = true | SectorDial | ||
dCenterClip : Sprite | SectorDial | ||
dialContainer : Sprite | SectorDial | ||
_needleClassName : String = defSectDialNeedle | SectorDial | ||
needleClip : Sprite | SectorDial | ||
_nXScale : Number = 1 | SectorDial | ||
_nYScale : Number = 1 | SectorDial | ||
_showBack : Boolean = true | SectorDial | ||
_units : Number = 50 | SectorDial | ||
_val : Number = 0 | SectorDial |
Method | Defined By | ||
---|---|---|---|
SectorDial |
Method | Defined By | ||
---|---|---|---|
changeBackground(n:String):void | SectorDial | ||
changeCenterOverlay(n:String):void | SectorDial | ||
changeNeedle(n:String):void | SectorDial | ||
configUI():void [override]
configUI
Get the display objects created in preparation of launch. | SectorDial | ||
draw():void [override]
| SectorDial | ||
setNeedle(v:Number):void
Sets the needle to the passed in value v. | SectorDial |
_backgroundClassName | property |
protected var _backgroundClassName:String = defSectDialBkgnd
_centerDotClassName | property |
protected var _centerDotClassName:String = defSectDialCenter
_centerVis | property |
protected var _centerVis:Boolean = true
_needleClassName | property |
protected var _needleClassName:String = defSectDialNeedle
_nXScale | property |
protected var _nXScale:Number = 1
_nYScale | property |
protected var _nYScale:Number = 1
_showBack | property |
protected var _showBack:Boolean = true
_units | property |
protected var _units:Number = 50
_val | property |
protected var _val:Number = 0
backgroundClassName | property |
backgroundClassName:String
This property gives the class name of the background to use.
public function get backgroundClassName():String
public function set backgroundClassName(value:String):void
bkgndClip | property |
protected var bkgndClip:Sprite
centerDotClassName | property |
centerDotClassName:String
This property gives the class name of the center dot (overlay) to use.
public function get centerDotClassName():String
public function set centerDotClassName(value:String):void
centerVis | property |
centerVis:Boolean
Boolean property indicating whether the center graphic is visible (true) or not (false).
public function get centerVis():Boolean
public function set centerVis(value:Boolean):void
dCenterClip | property |
protected var dCenterClip:Sprite
dialContainer | property |
protected var dialContainer:Sprite
left2right | property |
left2right:Boolean
Determines whether minimum is on the left (left2right == true) or on the right (left2right == false).
public function get left2right():Boolean
public function set left2right(value:Boolean):void
maxAngle | property |
maxAngle:Number
Angle of needle when reaches maximum value. Set this property to change the maximum at any time.
public function get maxAngle():Number
public function set maxAngle(value:Number):void
maxVal | property |
maxVal:Number
Maximum value of the gauge. Set this property to change the maximum at any time.
public function get maxVal():Number
public function set maxVal(value:Number):void
minAngle | property |
minAngle:Number
Angle of needle when reaches minimum value. Set this property to change the minimum at any time.
public function get minAngle():Number
public function set minAngle(value:Number):void
minVal | property |
minVal:Number
Minimum value of the gauge. Set this property to change the minimum at any time.
public function get minVal():Number
public function set minVal(value:Number):void
needleClassName | property |
needleClassName:String
This property gives the class name of the needle to use. The Sprite should be centered at the point you want it to rotate.
public function get needleClassName():String
public function set needleClassName(value:String):void
needleClip | property |
protected var needleClip:Sprite
nXScale | property |
nXScale:Number
Scaling factor along the y axis (height) for the needle.
public function get nXScale():Number
public function set nXScale(value:Number):void
nYScale | property |
nYScale:Number
public function get nYScale():Number
public function set nYScale(value:Number):void
showBack | property |
showBack:Boolean
Boolean property indicating whether the background graphic is visible (true) or not (false).
public function get showBack():Boolean
public function set showBack(value:Boolean):void
units | property |
units:int
Number of units in a full cycle for the dial.
public function get units():int
public function set units(value:int):void
val | property |
val:Number
Current value of the dial (where needle is set). Set this property to change the displayed value immediately.
public function get val():Number
public function set val(value:Number):void
SectorDial | () | Constructor |
public function SectorDial()
changeBackground | () | method |
protected function changeBackground(n:String):void
Parameters
n:String |
changeCenterOverlay | () | method |
protected function changeCenterOverlay(n:String):void
Parameters
n:String |
changeNeedle | () | method |
protected function changeNeedle(n:String):void
Parameters
n:String |
configUI | () | method |
override protected function configUI():void
configUI Get the display objects created in preparation of launch. Note that we get called before our constructor, and before we are notified that we are on the stage!
draw | () | method |
override protected function draw():void
setNeedle | () | method |
protected function setNeedle(v:Number):void
Sets the needle to the passed in value v. Change to the new value is immediate. This routine does not change the needle value -- use val
to do that.
Parameters
v:Number — New value to display for needle.
|