| Package | ardisia.components.sliderField |
| Class | public class SliderField |
| Inheritance | SliderField spark.components.supportClasses.SkinnableComponent |
| Implements | mx.managers.IFocusManagerComponent |
User can open the slider via a MOUSE_DOWN event on the open button. If the user adjusts the slider while holding down the same MOUSE_DOWN as the initial MOUSE_DOWN used to open the slider, the value will be committed and the slider will be closed. Otherwise, the slider is closed closed from mouse events or the ESC or ENTER key are depressed.
A value of NaN means the user entered a blank value.
Handles focus, keyboard, and mouse interaction.
View the technical documentation on the Ardisia Labs website for more information.
| Property | Defined By | ||
|---|---|---|---|
| isSliderOpen : Boolean [read-only]
True if the slider is currently displayed. | SliderField | ||
| maximum : Number
The maximum allowable value. | SliderField | ||
| minimum : Number
The minimum allowable value. | SliderField | ||
| snapInterval : Number
The snapInterval for the "value" property. | SliderField | ||
| value : Number
The commited numerical value. | SliderField | ||
| Method | Defined By | ||
|---|---|---|---|
closeSlider(commit:Boolean = true):void
Hides the slider and dispatches the "close" event. | SliderField | ||
commitValue(proposedValue:Number, dispatchChange:Boolean = false):void
Commits the value and dispatches the "change" event. | SliderField | ||
eventHandler(event:Event):void
Handles events for the control. | SliderField | ||
openButtonPartHandler(event:Event):void
Handles events on the openButtonPart. | SliderField | ||
openSlider(event:MouseEvent):void
Creates and displays the slider and dispatches the "open" event. | SliderField | ||
sliderFactoryPartHandler(event:Event):void
Handles events on the sliderFactoryPart. | SliderField | ||
textInputPartHandler(event:Event):void
Handles events on the textInputPart. | SliderField | ||
updateTextInputPart():void
Update the text input skin part. | SliderField | ||
| Event | Summary | Defined By | ||
|---|---|---|---|---|
| Dispatched when the "value" property changes due to user interaction. | SliderField | |||
| Dispatched when the slider is closed (hidden). | SliderField | |||
| Dispatched when the slider is opened (displayed). | SliderField | |||
| Dispatched when the "value" property changes. | SliderField | |||
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 | SliderField | |||
normal | SliderField | |||
open | Skin state when the slider is visible. | SliderField | ||
| isSliderOpen | property |
isSliderOpen:Boolean [read-only] True if the slider is currently displayed.
The default value is false.
public function get isSliderOpen():Boolean| maximum | property |
maximum:NumberThe maximum allowable value.
The default value is 100.
public function get maximum():Number public function set maximum(value:Number):void| minimum | property |
minimum:NumberThe minimum allowable value.
The default value is 0.
public function get minimum():Number public function set minimum(value:Number):void| 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. Can be set to NaN.
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| closeSlider | () | method |
protected function closeSlider(commit:Boolean = true):voidHides the slider and dispatches the "close" event.
Parameters
commit:Boolean (default = true) — true to commit the new value
|
| commitValue | () | method |
protected 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
|
| openButtonPartHandler | () | method |
protected function openButtonPartHandler(event:Event):voidHandles events on the openButtonPart.
Parameters
event:Event — the Event that triggered the handler
|
| openSlider | () | method |
protected function openSlider(event:MouseEvent):voidCreates and displays the slider and dispatches the "open" event.
Parameters
event:MouseEvent |
| sliderFactoryPartHandler | () | method |
protected function sliderFactoryPartHandler(event:Event):voidHandles events on the sliderFactoryPart.
Parameters
event:Event — the Event that triggered the handler
|
| 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():voidUpdate the text input skin part.
| change | Event |
ardisia.components.sliderField.events.SliderFieldEventardisia.components.sliderField.events.SliderFieldEventDispatched when the "value" property changes due to user interaction.
| close | Event |
ardisia.components.sliderField.events.SliderFieldEventardisia.components.sliderField.events.SliderFieldEventDispatched when the slider is closed (hidden).
| open | Event |
ardisia.components.sliderField.events.SliderFieldEventardisia.components.sliderField.events.SliderFieldEventDispatched when the slider is opened (displayed).
| valueCommit | Event |
mx.events.FlexEventmx.events.FlexEventDispatched when the "value" property changes.