Packagecom.ghostwire.ui.data
Classpublic class uiRange
InheritanceuiRange Inheritance flash.events.EventDispatcher

uiRange represents an adjustable range of values. A uiRange object contains a value with an associated minimum and maximum bounds, as well as step and page increment values. This object is used in controls associated with adjustable values such as uiSlider, uiStepper, etc. A single uiRange object may be shared by different controls if they are intended to share the same range of adjustable values.

~ This class is available in Aspire UI Components Lite Edition ~



Public Properties
 PropertyDefined by
  maximum : Number
[read-only] Indicates the upper limit for the value property.
uiRange
  minimum : Number
[read-only] Indicates the lower limit for the value property.
uiRange
  page : Number
Indicates the page increment size.
uiRange
  snap : Boolean
Indicates whether the value should be rounded to the nearest step value.
uiRange
  step : Number
Indicates the step increment size.
uiRange
  value : Number
Indicates the current value.
uiRange
Public Methods
 MethodDefined by
  
uiRange(value:Number = 0, minimum:Number = 0, maximum:Number = 100, step:Number = 1, page:Number = -1)
Constructor - creates a new uiRange object.
uiRange
  
resize(minimum:Number, maximum:Number):void
Changes the minimum and maximum bounds of this range and dispatches a "resize" event.
uiRange
Events
 EventSummaryDefined by
   Dispatched when the value has changed.uiRange
   Dispatched when the range has resized (minimum and/or maximum has changed).uiRange
Property detail
maximumproperty
maximum:Number  [read-only]

Indicates the upper limit for the value property. To modify this property, use the adjust() method. his value must be higher than the minimum. If you are moving the boundaries of the range, make sure that you set the minimum property first.

Setting the maximum value to a number lower than the current value will force the value property to assume the maximum value, thereby dispatching a "change" event.

Implementation
    public function get maximum():Number
minimumproperty 
minimum:Number  [read-only]

Indicates the lower limit for the value property. This is the value when thumb is at the left end of the uiSlider (or the bottom, in the case of a uiVSlider). If the inverted property is set to true, this is the value when the thumb is at the right end of the uiSlider (or the top, in the case of a uiVSlider).

Make sure that what you set for the minimum is lower than the maximum, otherwise the uiSlider will behave abnormally.

Setting the minimum value to a number greater than the current value will force the value property to assume the minimum value, thereby dispatching a "change" event.

Implementation
    public function get minimum():Number
pageproperty 
page:Number  [read-write]

Indicates the page increment size. Different components may interpret this property differently or ignore it altogether. For example, in the case of uiScrollBar, this property is used to indicate the amount to adjust when the track is pressed. In the case of uiStepper, this property is ignored.

When this property is set to a negative number, it usually means that adjustment should jump to the user-indicated position instead of a gradual increment/decrement. For example, in the case of uiSlider, the thumb jumps to where the user clicks on the track if the page property is -1 (default value).

The default value is -1.

Implementation
    public function get page():Number
    public function set page(value:Number):void
snapproperty 
snap:Boolean  [read-write]

Indicates whether the value should be rounded to the nearest step value.

Implementation
    public function get snap():Boolean
    public function set snap(value:Boolean):void
stepproperty 
step:Number  [read-write]

Indicates the step increment size. Different components may interpret this property differently, but generally this property indicates the least amount of increment/decrement that may occur. For example, in the case of uiScrollBar, this property is used to indicate the amount to adjust when the stepper buttons are pressed.

The default value is 1.

Implementation
    public function get step():Number
    public function set step(value:Number):void
valueproperty 
value:Number  [read-write]

Indicates the current value. The slider thumb is positioned along the slider track based on this value. If this property changes, the slider thumb will be moved. Likewise, if the slider thumb is moved by the user, this property changes.

Changing the value property dispatches a "change" event.

You may specify the initial value when creating the uiSlider instance via the constructor.

Implementation
    public function get value():Number
    public function set value(value:Number):void
Constructor detail
uiRange()constructor
public function uiRange(value:Number = 0, minimum:Number = 0, maximum:Number = 100, step:Number = 1, page:Number = -1)

Constructor - creates a new uiRange object.

Parameters
value:Number (default = 0) — [Optional] The initial value.
 
minimum:Number (default = 0) — [Optional] The minimum value. Default 0.
 
maximum:Number (default = 100) — [Optional] The maximum value. Default 100.
 
step:Number (default = 1) — [Optional] The step increment. Default 1.
 
page:Number (default = -1) — [Optional] The page increment. Default -1.
Method detail
resize()method
public function resize(minimum:Number, maximum:Number):void

Changes the minimum and maximum bounds of this range and dispatches a "resize" event.

Parameters
minimum:Number — A number indicating the lower limit for the value property.
 
maximum:Number — A number indicating the upper limit for the value property. If this number is lower than minimum, it will be set to the same as minium.
Event detail
changeevent 
Event object type: flash.events.Event

Dispatched when the value has changed.

resizeevent  
Event object type: flash.events.Event

Dispatched when the range has resized (minimum and/or maximum has changed).