qnx.fuse.ui.slider.SliderBase

SliderBase

Properties | Methods | Events


Packageqnx.fuse.ui.slider
Classpublic class SliderBase
InheritanceSliderBase Inheritance UIComponent Inheritance flash.display.MovieClip
Subclasses Slider

SliderBase is an abstract base class for components that implement slider like functionality.

Do not instantiate this class. Instead, use the Slider class.



Class information:
BlackBerry 10 Version:   10.0.0

See also

Slider



Public Properties

 PropertyDefined By
 InheritedcontextActions : Vector.<ActionSet>
Gets or Sets a Vector of ActionSet objects.
UIComponent
 InheritedcontextMultiSelectText : String
Gets or Sets a String to be displayed when showing the Multi Select Context Menu.
UIComponent
 InheritedcurrentTheme : String
[read-only] Returns the current theme this component is styled with.
UIComponent
  doubleClickIncrement : Number
Specifies a percentage between 0.0 and 1.0 that the slider should move when double clicked.
SliderBase
 InheritedexplicitHeight : Number
[read-only] Returns the explicit height (actual height, in pixels) of the UI component.
UIComponent
 InheritedexplicitWidth : Number
[read-only] Returns the explicit width (actual width, in pixels) of the UI component.
UIComponent
 Inheritedid : String
The id is a name for the component that can be used in CSS using the # selector.
UIComponent
 InheritedincludeInLayout : Boolean
Specifies whether or not the component should be included in its parent container's layout.
UIComponent
 InheritedlayoutData : Object
Gets or sets the layoutData.
UIComponent
 Inheritedlocale : String
Gets or sets the current locale of the component.
UIComponent
 InheritedminHeight : Number
Gets or sets the minimum preferred height of the control.
UIComponent
 InheritedminWidth : Number
Gets or sets the minimum preferred width of the control.
UIComponent
 InheritedstyleChildren : Boolean
Allows you to style the children of this component with CSS.
UIComponent

Protected Properties

 PropertyDefined By
 InheritedaccessibilityImplimentationClass : Class
UIComponent
 InheritedcssID : String
[read-only] Returns the CSS ID of the component.
UIComponent
 InheritedexplicitLocale : Boolean
Set to true when the locale property has been set externally.
UIComponent
 InheritedinternalID : String
The Component's Id used for styling.
UIComponent
 InheritedlongPressEnabled : Boolean
Specifies whether the UIComponent can detect a long press.
UIComponent

Public Methods

 MethodDefined By
  
Creates a new SliderBase instance.
SliderBase
 Inherited
Cancels a long press from occuring on the component.
UIComponent
 Inherited
childChanged(resizedChild:DisplayObject = null):Boolean
Notifies the UIComponent that one or more of its children has changed in a manner that may affect this object's layout.
UIComponent
 Inherited
destroy():void
Call this method when you want to have your object collected by the garbage collector.
UIComponent
 Inherited
Returns the CSS selector for the object, composing it from its position in the display hierarchy and an optional ID selector.
UIComponent
 Inherited
Returns the size options for the given control.
UIComponent
 Inherited
Calling this method results in a call to the components validateDisplayList() method before the display list is rendered.
UIComponent
 Inherited
Calling this method results in a call to the components validateProperties() method before the display list is rendered.
UIComponent
 Inherited
measure(availableWidth:Number, availableHeight:Number):LayoutMeasurement
This method calls doMeasure() in order to calculate the preferred size of the control.
UIComponent
 Inherited
setActualSize(w:Number, h:Number):void
Sets the width and height of the object without setting the explicitWidth and explicitHeight.
UIComponent
  
setFillSkin(skin:Object):void
Sets the fill skin for the slider.
SliderBase
 Inherited
setLayoutBounds(bounds:Rectangle):void
Sets the receiver's size and location to the rectangular area specified by the arguments.
UIComponent
 Inherited
setPosition(x:Number, y:Number):void
Sets the x and y position of the component.
UIComponent
  
setThumbSkin(skin:Object):void
Sets the skin for the slider thumb button.
SliderBase
  
setTrackSkin(skin:Object):void
Sets the skin for the track of the slider.
SliderBase
 Inherited
updateDefaultLocale(updateChildren:Boolean = true):void
Updates the locale property to be the same as the locale of the device.
UIComponent
 Inherited
Lets a component that contains text know that it should update its font formats as the font settings have changed.
UIComponent
 Inherited
Validates the display list of the component by calling the updateDisplayList().
UIComponent
 Inherited
Validates the component immediately by calling validateProperties(), validateSizes(), and validateDisplayList() if necessary.
UIComponent
 Inherited
Validates the properties of the component by calling the commitProperties() method.
UIComponent

Protected Methods

 MethodDefined By
  
Adds the listeners for actually dragging and for when dragging is to stop.
SliderBase
  
Adds the listeners responsible for starting to Drag the Thumb or Drag along the Track.
SliderBase
 Inherited
allowShowContextMenu(target:IEventDispatcher):Boolean
When the user presses on the component this method is called with the object that dispatched the event.
UIComponent
 Inherited
Process properties of the component.
UIComponent
 Inherited
Process the state of the component.
UIComponent
 Inherited
Style the component after the style has changed.
UIComponent
  
createFill(linkage:Object):void
Creates the fill skin based on the passed in linkage object.
SliderBase
  
Creates an empty sprite which will be used for detecting clicks within the bounds of the slider to allow for dragging when not touching the thumb.
SliderBase
  
createThumb(linkage:Object):void
Create the Thumb Skin based on the passed in linkage object.
SliderBase
  
createTrack(linkage:Object):void
Creates the Track Skin based on the passed in linkage object.
SliderBase
 Inherited
doMeasure(availableWidth:Number, availableHeight:Number):LayoutMeasurement
Performs a measurement on the control, and returns a LayoutMeasurement instance containing the available width and height within the layout.
UIComponent
 Inherited
excemptFromCSSStyling(target:*, property:String = null):void
Exempts a property on an object from being styled by CSS.
UIComponent
 Inherited
flushCache():void
Invoked as part of parentLayoutChanged.
UIComponent
 Inherited
getStyleApplier():Function
A style applier is a method that gets called every time a property from the stylesheet should be applied to the component.
UIComponent
 Inherited
onAdded():void
Called when the instance is added to the stage.
UIComponent
 Inherited
Is called when a user is no longer long pressing on the component.
UIComponent
 Inherited
Is called when a user long presses on the component.
UIComponent
 Inherited
onRemoved():void
Called when the instance is removed from the stage.
UIComponent
 Inherited
Invalidates the parent's size and display list if includeInLayout property is set to true.
UIComponent
 Inherited
Calling this function will refresh the ContextMenu with whatever actions were set by contextActions.
UIComponent
  
Removes the listeners for actually dragging and for when dragging is to stop.
SliderBase
  
Removes the listeners responsible for starting to Drag the Thumb or Drag along the Track.
SliderBase
 Inherited
Shows the context menu if there are contextActions associated with the control.
UIComponent
 Inherited
styleState():void
Style the component after state has changed.
UIComponent
  
Called when the position of the thumb on the x axis has changed.
SliderBase
  
Called when the thumb has been pressed by the user.
SliderBase
  
Called when the thumb has been released by the user.
SliderBase
  
Called when the track has been double clicked by the user.
SliderBase
  
Called when the track has been pressed by the user.
SliderBase
  
Updates the left and right constraints for determining the thumb position.
SliderBase
 Inherited
updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
Sets the size and position of the children of the component.
UIComponent
  
updateFill():void
Updates the Fill skin to take up a certain width or percentage of the Slider.
SliderBase
  
Updates the Hit Sprite to be as large as the bounds of the Slider.
SliderBase

Events

 Event Summary Defined By
 InheritedDispatched when an action in the Context Menu is selected.UIComponent
 InheritedDispatched when the Context Menu has closed to the DISMISSED state.UIComponent
 InheritedDispatched when the ContextMenu is closing to the DISMISSED state.UIComponent
 InheritedDispatched when the Context Menu has opened to the PEEK or EXPANDED state.UIComponent
 InheritedDispatched when the ContextMenu is opening from the DISMISSED state.UIComponent
 InheritedDispatched when the CrossCut multiselect has been canceled.UIComponent

Property Detail

doubleClickIncrement


doubleClickIncrement:Number

Specifies a percentage between 0.0 and 1.0 that the slider should move when double clicked.

The default value is 0.1.


Implementation

public function get doubleClickIncrement():Number
public function set doubleClickIncrement(value:Number):void

Constructor Detail

SliderBase()


public function SliderBase()

Creates a new SliderBase instance.

Method Detail

addDraggingListeners()


protected function addDraggingListeners():void

Adds the listeners for actually dragging and for when dragging is to stop.

addInitiatingListeners()


protected function addInitiatingListeners():void

Adds the listeners responsible for starting to Drag the Thumb or Drag along the Track.

createFill()


protected function createFill(linkage:Object):void

Creates the fill skin based on the passed in linkage object.

The linkage parameter can be one of three different types: Class, String, or DisplayObject instance.

  • If you pass in a Class, a new instance of that class is created.
  • If you pass in a String, flash.utils.getDefinitionByName will be used to try and determine a class to use.
  • If you pass in a DisplayObject instance it is used as the skin the x and y values of the instance are set to 0.

Parameters

linkage:Object — A Class, String, or DisplayObject instance.

createHitSprite()


protected function createHitSprite():void

Creates an empty sprite which will be used for detecting clicks within the bounds of the slider to allow for dragging when not touching the thumb.

createThumb()


protected function createThumb(linkage:Object):void

Create the Thumb Skin based on the passed in linkage object.

The linkage parameter can be one of three different types: Class, String, or DisplayObject instance.

  • If you pass in a Class, a new instance of that class is created.
  • If you pass in a String, flash.utils.getDefinitionByName will be used to try and determine a class to use.
  • If you pass in a DisplayObject instance it is used as the skin the x and y values of the instance are set to 0.

Parameters

linkage:Object — A Class, String, or DisplayObject instance.

createTrack()


protected function createTrack(linkage:Object):void

Creates the Track Skin based on the passed in linkage object.

The linkage parameter can be one of three different types: Class, String, or DisplayObject instance.

  • If you pass in a Class, a new instance of that class is created.
  • If you pass in a String, flash.utils.getDefinitionByName will be used to try and determine a class to use.
  • If you pass in a DisplayObject instance it is used as the skin the x and y values of the instance are set to 0.

Parameters

linkage:Object — A Class, String, or DisplayObject instance.

removeDraggingListeners()


protected function removeDraggingListeners():void

Removes the listeners for actually dragging and for when dragging is to stop.

removeInitiatingListeners()


protected function removeInitiatingListeners():void

Removes the listeners responsible for starting to Drag the Thumb or Drag along the Track.

setFillSkin()


public function setFillSkin(skin:Object):void

Sets the fill skin for the slider. The fill skin is the area of the track to the left of the slider thumb button (in a horizontal slider) that represents the current value of the slider.

You can pass in a qualified class name String, or the actual class. In either instance the class that is used must implement the ISkin interface.

Note: Do not pass in an instance of a skin class. This may cause unexpected behavior.

Parameters

skin:Object — The fill skin to set.

setThumbSkin()


public function setThumbSkin(skin:Object):void

Sets the skin for the slider thumb button. The thumb is the button that the user moves along the track to change the value of the slider.

You can pass in a qualified class name String, or the actual class. In either instance the class that is used must implement the ISkin interface.

Note: Do not pass in an instance of a skin class. This may cause unexpected behavior.

Parameters

skin:Object — The button skin to set.

setTrackSkin()


public function setTrackSkin(skin:Object):void

Sets the skin for the track of the slider. The track is the vertical or horizontal line that the thumb button moves along.

You can pass in a qualified class name String, or the actual class. In either instance the class that is used must implement the ISkin interface.

Note: Do not pass in an instance of a skin class. This may cause unexpected behavior.

Parameters

skin:Object — The track skin to set.

thumbPositionChanged()


protected function thumbPositionChanged():void

Called when the position of the thumb on the x axis has changed. Occurs when the user drags the thumb or has clicked on the track. You can override this method if you wish to have elements update themselves based on the value property.

thumbPressed()


protected function thumbPressed():void

Called when the thumb has been pressed by the user.

You can override this method to perform custom actions when the user presses the thumb.

thumbReleased()


protected function thumbReleased():void

Called when the thumb has been released by the user.

You can override this method to perform custom actions when the user has released the thumb.

trackDoubleClicked()


protected function trackDoubleClicked():void

Called when the track has been double clicked by the user.

You can override this method to perform custom actions when the user double clicks on the track.

trackPressed()


protected function trackPressed():void

Called when the track has been pressed by the user.

You can override this method to perform custom actions when the user presses on the track.

updateConstraints()


protected function updateConstraints():void

Updates the left and right constraints for determining the thumb position.

updateFill()


protected function updateFill():void

Updates the Fill skin to take up a certain width or percentage of the Slider.

updateHitSprite()


protected function updateHitSprite():void

Updates the Hit Sprite to be as large as the bounds of the Slider.





comments powered by Disqus