Packagecom.eqsim.components
Classpublic class SectorDial
InheritanceSectorDial Inheritance fl.core.UIComponent
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.



Public Properties
 PropertyDefined 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
Protected Properties
 PropertyDefined 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
Public Methods
 MethodDefined By
  
SectorDial
Protected Methods
 MethodDefined 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
Property Detail
_backgroundClassNameproperty
protected var _backgroundClassName:String = defSectDialBkgnd

_centerDotClassNameproperty 
protected var _centerDotClassName:String = defSectDialCenter

_centerVisproperty 
protected var _centerVis:Boolean = true

_needleClassNameproperty 
protected var _needleClassName:String = defSectDialNeedle

_nXScaleproperty 
protected var _nXScale:Number = 1

_nYScaleproperty 
protected var _nYScale:Number = 1

_showBackproperty 
protected var _showBack:Boolean = true

_unitsproperty 
protected var _units:Number = 50

_valproperty 
protected var _val:Number = 0

backgroundClassNameproperty 
backgroundClassName:String

This property gives the class name of the background to use.


Implementation
    public function get backgroundClassName():String
    public function set backgroundClassName(value:String):void
bkgndClipproperty 
protected var bkgndClip:Sprite

centerDotClassNameproperty 
centerDotClassName:String

This property gives the class name of the center dot (overlay) to use.


Implementation
    public function get centerDotClassName():String
    public function set centerDotClassName(value:String):void
centerVisproperty 
centerVis:Boolean

Boolean property indicating whether the center graphic is visible (true) or not (false).


Implementation
    public function get centerVis():Boolean
    public function set centerVis(value:Boolean):void
dCenterClipproperty 
protected var dCenterClip:Sprite

dialContainerproperty 
protected var dialContainer:Sprite

left2rightproperty 
left2right:Boolean

Determines whether minimum is on the left (left2right == true) or on the right (left2right == false).


Implementation
    public function get left2right():Boolean
    public function set left2right(value:Boolean):void
maxAngleproperty 
maxAngle:Number

Angle of needle when reaches maximum value. Set this property to change the maximum at any time.


Implementation
    public function get maxAngle():Number
    public function set maxAngle(value:Number):void
maxValproperty 
maxVal:Number

Maximum value of the gauge. Set this property to change the maximum at any time.


Implementation
    public function get maxVal():Number
    public function set maxVal(value:Number):void
minAngleproperty 
minAngle:Number

Angle of needle when reaches minimum value. Set this property to change the minimum at any time.


Implementation
    public function get minAngle():Number
    public function set minAngle(value:Number):void
minValproperty 
minVal:Number

Minimum value of the gauge. Set this property to change the minimum at any time.


Implementation
    public function get minVal():Number
    public function set minVal(value:Number):void
needleClassNameproperty 
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.


Implementation
    public function get needleClassName():String
    public function set needleClassName(value:String):void
needleClipproperty 
protected var needleClip:Sprite

nXScaleproperty 
nXScale:Number

Scaling factor along the y axis (height) for the needle.


Implementation
    public function get nXScale():Number
    public function set nXScale(value:Number):void
nYScaleproperty 
nYScale:Number


Implementation
    public function get nYScale():Number
    public function set nYScale(value:Number):void
showBackproperty 
showBack:Boolean

Boolean property indicating whether the background graphic is visible (true) or not (false).


Implementation
    public function get showBack():Boolean
    public function set showBack(value:Boolean):void
unitsproperty 
units:int

Number of units in a full cycle for the dial.


Implementation
    public function get units():int
    public function set units(value:int):void
valproperty 
val:Number

Current value of the dial (where needle is set). Set this property to change the displayed value immediately.


Implementation
    public function get val():Number
    public function set val(value:Number):void
Constructor Detail
SectorDial()Constructor
public function SectorDial()

Method Detail
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.