| Package | ardisia.components.rotaryField |
| Class | public class RotaryField |
| Inheritance | RotaryField spark.components.supportClasses.SkinnableComponent |
| Implements | mx.managers.IFocusManagerComponent |
Handles focus, keyboard, and mouse interaction.
Listen for the "change" event to detect changes in the "value" property. "value" is also a bindable property.
.View the technical documentation on the Ardisia Labs website for more information.
| Property | Defined By | ||
|---|---|---|---|
| angleOffset : Number = -90
The offset for where 0 degrees appears on the wheel. | RotaryField | ||
| isWheelOpen : Boolean [read-only]
True if the wheel is currently displayed. | RotaryField | ||
| snapInterval : Number
The snapInterval for the "value" property. | RotaryField | ||
| value : Number
The commited numerical value. | RotaryField | ||
| wheelInstance : SkinnableContainer
Wheel instance. | RotaryField | ||
| Method | Defined By | ||
|---|---|---|---|
commitValue(proposedValue:Number, dispatchChange:Boolean = false):void
Commits the value and dispatches the "change" event. | RotaryField | ||
| Method | Defined By | ||
|---|---|---|---|
closeWheel():void
Hides the wheel and dispatches the "close" event. | RotaryField | ||
eventHandler(event:Event):void
Handles events for the control. | RotaryField | ||
getMouseAngle():Number
Based on the current mouse position, gets the angle relative to the
center of the wheel. | RotaryField | ||
getNearestValue(value:Number):Number
Returns the angle to the closest snap interval and bounded to the range
0 (less than or equal to) value (less than or equal to) 360. | RotaryField | ||
openButtonPartHandler(event:Event):void
Handles events on the openButtonPart. | RotaryField | ||
openWheel():void
Creates and displays the wheel and dispatches the "open" event. | RotaryField | ||
textInputPartHandler(event:Event):void
Handles events on the textInputPart. | RotaryField | ||
updateTextInputPart():void
Updates the TextInput skin part. | RotaryField | ||
updateWheelThumb(angle:Number):void
Updates the wheel thumb position. | RotaryField | ||
wheelFactoryPartHandler(event:Event):void
Handles events on the wheelFactoryPart. | RotaryField | ||
| Event | Summary | Defined By | ||
|---|---|---|---|---|
| Dispatched when the "value" property changes due to user interaction. | RotaryField | |||
| Dispatched when the rotary wheel is closed (hidden). | RotaryField | |||
| Dispatched when the rotary wheel is opened (displayed). | RotaryField | |||
| Dispatched when the "value" property changes. | RotaryField | |||
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.
| Skin State | Description | Defined By | ||
|---|---|---|---|---|
disabled | RotaryField | |||
normal | RotaryField | |||
open | Skin state when the rotary wheel is visible. | RotaryField | ||
| angleOffset | property |
public var angleOffset:Number = -90The offset for where 0 degrees appears on the wheel.
The flash based coordinate system has 0 degrees at due east. Most people think of north as 0 degrees. This is why the default angleOffset value is -90.
Positive increases in angle move the angle in a clockwise direction.
The default value is -90.
| isWheelOpen | property |
isWheelOpen:Boolean [read-only] True if the wheel is currently displayed.
The default value is false.
public function get isWheelOpen():Boolean| snapInterval | property |
snapInterval:NumberThe snapInterval for the "value" property.
The default value is 1.
public function get snapInterval():Number public function set snapInterval(value:Number):void| value | property |
value:NumberThe commited numerical value.
This property is bindable and bound to "valueCommit" events.
The default value is 0.
This property can be used as the source for data binding.
public function get value():Number public function set value(value:Number):void| wheelInstance | property |
public var wheelInstance:SkinnableContainerWheel instance.
| closeWheel | () | method |
protected function closeWheel():voidHides the wheel and dispatches the "close" event.
| commitValue | () | method |
public function commitValue(proposedValue:Number, dispatchChange:Boolean = false):voidCommits the value and dispatches the "change" event. Will bound the value to the minimum and maximum values and apply the snapInterval.
Parameters
proposedValue:Number — Number
| |
dispatchChange:Boolean (default = false) — Boolean true to dispatch a "change" event to
signify the update is due to user interaction
|
| eventHandler | () | method |
protected function eventHandler(event:Event):voidHandles events for the control.
Parameters
event:Event — the Event that triggered the handler
|
| getMouseAngle | () | method |
protected function getMouseAngle():NumberBased on the current mouse position, gets the angle relative to the center of the wheel.
ReturnsNumber |
| getNearestValue | () | method |
protected function getNearestValue(value:Number):NumberReturns the angle to the closest snap interval and bounded to the range 0 (less than or equal to) value (less than or equal to) 360.
Parameters
value:Number — the Number to parse
|
Number — the parsed Number
|
| openButtonPartHandler | () | method |
protected function openButtonPartHandler(event:Event):voidHandles events on the openButtonPart.
Parameters
event:Event — the Event that triggered the handler
|
| openWheel | () | method |
protected function openWheel():voidCreates and displays the wheel and dispatches the "open" event.
| textInputPartHandler | () | method |
protected function textInputPartHandler(event:Event):voidHandles events on the textInputPart.
Parameters
event:Event — the Event that triggered the handler
|
| updateTextInputPart | () | method |
protected function updateTextInputPart():voidUpdates the TextInput skin part.
| updateWheelThumb | () | method |
protected function updateWheelThumb(angle:Number):voidUpdates the wheel thumb position.
Parameters
angle:Number — the angle in degrees at which to position the thumb
|
| wheelFactoryPartHandler | () | method |
protected function wheelFactoryPartHandler(event:Event):voidHandles events on the wheelFactoryPart.
Parameters
event:Event — the Event that triggered the handler
|
| change | Event |
ardisia.components.rotaryField.events.RotaryFieldEventardisia.components.rotaryField.events.RotaryFieldEventDispatched when the "value" property changes due to user interaction.
| close | Event |
ardisia.components.rotaryField.events.RotaryFieldEventardisia.components.rotaryField.events.RotaryFieldEventDispatched when the rotary wheel is closed (hidden).
| open | Event |
ardisia.components.rotaryField.events.RotaryFieldEventardisia.components.rotaryField.events.RotaryFieldEventDispatched when the rotary wheel is opened (displayed).
| valueCommit | Event |
mx.events.FlexEventmx.events.FlexEventDispatched when the "value" property changes.