Packagecom.eqsim.components
Classpublic class RoundDial
InheritanceRoundDial Inheritance fl.core.UIComponent
Subclasses RoundDialSmooth

This class implements a simple round dial gauge. Developers can set its value by setting the val property to have the dial jump immediately to that value. If you want to have the needle transition smoothly, use the sub-class RoundDialSmooth in which you can set the needle rate.

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 linkage ID's. 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.
RoundDial
  centerDotClassName : String
This property gives the class name of the center dot (overlay) to use.
RoundDial
  centerVis : Boolean
Boolean property indicating whether the center graphic is visible (true) or not (false).
RoundDial
  needleClassName : String
This property gives the class name of the needle to use.
RoundDial
  nXScale : Number
Scaling factor along the y axis (height) for the needle.
RoundDial
  nYScale : Number
RoundDial
  showBack : Boolean
Boolean property indicating whether the background graphic is visible (true) or not (false).
RoundDial
  units : int
Number of units in a full cycle for the dial.
RoundDial
  val : Number
Current value of the dial (where needle is set).
RoundDial
Protected Properties
 PropertyDefined By
  _backgroundClassName : String = defRoundDialBkgnd
RoundDial
  bkgndClip : Sprite
RoundDial
  _centerDotClassName : String = defRoundDialCenter
RoundDial
  _centerVis : Boolean = true
RoundDial
  dCenterClip : Sprite
RoundDial
  dialContainer : Sprite
RoundDial
  _needleClassName : String = defRoundDialNeedle
RoundDial
  needleClip : Sprite
RoundDial
  _nXScale : Number = 1
RoundDial
  _nYScale : Number = 1
RoundDial
  _showBack : Boolean = true
RoundDial
  _units : Number = 50
RoundDial
  _val : Number = 0
RoundDial
Public Methods
 MethodDefined By
  
RoundDial
Protected Methods
 MethodDefined By
  
changeBackground(n:String):void
RoundDial
  
changeCenterOverlay(n:String):void
RoundDial
  
changeNeedle(n:String):void
RoundDial
  
configUI():void
[override] configUI Get the display objects created in preparation of launch.
RoundDial
  
draw():void
[override]
RoundDial
  
setNeedle(v:Number):void
Sets the needle to the passed in value v.
RoundDial
Property Detail
_backgroundClassNameproperty
protected var _backgroundClassName:String = defRoundDialBkgnd

_centerDotClassNameproperty 
protected var _centerDotClassName:String = defRoundDialCenter

_centerVisproperty 
protected var _centerVis:Boolean = true

_needleClassNameproperty 
protected var _needleClassName:String = defRoundDialNeedle

_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

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
RoundDial()Constructor
public function RoundDial()

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.