Package | ardisia.components.gauges |
Class | public class GaugeBase |
Inheritance | GaugeBase spark.components.supportClasses.SliderBase |
Subclasses | LinearGaugeBase, RadialGauge |
Property | Defined By | ||
---|---|---|---|
editable : Boolean
Whether the value can be changed via user interaction. | GaugeBase | ||
labelDefaultPrecision : Number
Default precision for the number formatter if a labelsFormatFunction
is not provided. | GaugeBase | ||
labelsFormatFunction : Function
The callback function used to format the labels. | GaugeBase | ||
majorTickCount : int
The number of major ticks to display. | GaugeBase | ||
minorTickCount : int
The number of minor ticks to display between major ticks. | GaugeBase | ||
showTickLabels : Boolean
True to display labels along with the major ticks. | GaugeBase | ||
showTicks : Boolean
True to display ticks. | GaugeBase |
Method | Defined By | ||
---|---|---|---|
dispose():void
Remove the component from the display list and prepare the component
for garbage collection. | GaugeBase |
Method | Defined By | ||
---|---|---|---|
formatLabelText(value:Number):Object
Format the value to a human readable String. | GaugeBase | ||
updateTickLabels():void
Update the tick labels skin parts. | GaugeBase |
This component uses skins made up of skin parts. Do not set the skin parts directly. The component's skin sets the skin parts.
To skin the component, implement a skin that defines the following states. Although you must implement all skin states, a skin state can be empty. An empty skin state specifies no changes to the default skin state.
editable | property |
editable:Boolean
Whether the value can be changed via user interaction.
If false, can be used to statically display information without disabling the control.
The default value is true
.
public function get editable():Boolean
public function set editable(value:Boolean):void
labelDefaultPrecision | property |
labelDefaultPrecision:Number
Default precision for the number formatter if a labelsFormatFunction is not provided.
The default value is 2
.
public function get labelDefaultPrecision():Number
public function set labelDefaultPrecision(value:Number):void
labelsFormatFunction | property |
labelsFormatFunction:Function
The callback function used to format the labels. Use this property to parse numerical values into strings if desired.
For example, if the labels should read "red", "blue", and "red", create a callback function that parses the numerical values into these color strings.
The default value is null
.
public function get labelsFormatFunction():Function
public function set labelsFormatFunction(value:Function):void
majorTickCount | property |
majorTickCount:int
The number of major ticks to display. Minimum of 2.
To not display major ticks, set the "showTicks" property to false.
The default value is 6
.
public function get majorTickCount():int
public function set majorTickCount(value:int):void
minorTickCount | property |
minorTickCount:int
The number of minor ticks to display between major ticks.
Set to 0 to not display any minor tick marks. Also, if "showTicks" is set to false then no minor ticks will be displayed.
The default value is 1
.
public function get minorTickCount():int
public function set minorTickCount(value:int):void
showTickLabels | property |
showTickLabels:Boolean
True to display labels along with the major ticks.
The default value is true
.
public function get showTickLabels():Boolean
public function set showTickLabels(value:Boolean):void
showTicks | property |
showTicks:Boolean
True to display ticks.
The default value is true
.
public function get showTicks():Boolean
public function set showTicks(value:Boolean):void
dispose | () | method |
public function dispose():void
Remove the component from the display list and prepare the component for garbage collection.
formatLabelText | () | method |
protected function formatLabelText(value:Number):Object
Format the value to a human readable String.
Will use the labelsFormatFunction if provided. Otherwise, will default to a Spark NumberFormatter.
Parameters
value:Number — the Number to parse to a string
|
Object — a parsed Object
|
updateTickLabels | () | method |
protected function updateTickLabels():void
Update the tick labels skin parts.