EMAIL: info@ardisialabs.com
Contact envelope

RotaryField

Overview

Field used to select an angle from 0 to 360 degrees.

Creating the RotaryField Component

The RotaryField is a Spark SkinnableComponent and can be added to any container that implements IVisualElementContainer.

Using the RotaryField Component

Use the "snapInterval" property to change the interval the user is allowed to set the "value" to. For example, to allow the selection of: 0, 45, 90, 135, 180, 225, 270, 315, or 360 as possible values, the "snapInterval" should be 45.

The Flash based coordinate system has 0 degrees at due East. The "angleOffset" property controls how many degrees the location of 0 degrees from due East is offset. Positive increases in angle move the angle in a clockwise direction.

If a value is provided that is greater than 360 degrees, the value will be the modulo of 360.

Accessibility & Focus

Field can be tabbed to and value committed via the ENTER key.

If the wheel popup is displayed, it can be closed via the ESCAPE key.

The text input field can receive focus. The popup rotary wheel takes focus from the textfield.

Custom Events

CLOSE
ardisia.components.rotaryField.events.RotaryFieldEvent
Dispatched when the rotary wheel is closed (hidden).

OPEN
ardisia.components.rotaryField.events.RotaryFieldEvent
Dispatched when the rotary wheel is opened (displayed).

CHANGE
ardisia.components.rotaryField.events.RotaryFieldEvent
Dispatched when the "value" property changes due to user interaction.

VALUE_COMMIT
ardisia.components.rotaryField.events.RotaryFieldEvent
Dispatched when the "value" property changes.

Custom Styles

paddingRight
default 3
Right padding for the text field.

paddingBottom
default 3
Bottom padding for the text field.

paddingLeft
default 3
Left padding for the text field.

paddingTop
default 5
Top padding for the text field.

Themes & Skinning

Included are Spark, London, and Stockholm themes.

Example

Simple Example:

<rotaryField:RotaryField snapInterval="45" 
			 angleOffset="0" />

See the RotaryField demo application for additional example code.

Back To Top