ScrollBar

public class
feathers.controls.ScrollBar

Description

Select a value between a minimum and a maximum by dragging a thumb over a physical range or by using step buttons. This is a desktop-centric scroll bar with many skinnable parts. For mobile, the SimpleScrollBar is probably a better choice as it provides only the thumb to indicate position without all the extra chrome.

See also:
http://wiki.starling-framework.org/feathers/scroll-bar
feathers.controls.SimpleScrollBar

API overview

Constructor

ScrollBar ()
Constructor.

Attributes

Public attributes

customDecrementButtonName: String

A name to add to the scroll bar's decrement button sub-component

customIncrementButtonName: String

A name to add to the scroll bar's increment button sub-component

customMaximumTrackName: String

A name to add to the scroll bar's maximum track sub-component

customMinimumTrackName: String

A name to add to the scroll bar's minimum track sub-component

customThumbName: String

A name to add to the scroll bar's thumb sub-component

decrementButtonFactory: Function

A function used to generate the scroll bar's decrement button sub-component

decrementButtonProperties: Dictionary.<String, Object>

A set of key/value pairs to be passed down to the scroll bar's decrement button sub-component

direction: String
incrementButtonFactory: Function

A function used to generate the scroll bar's increment button sub-component

incrementButtonProperties: Dictionary.<String, Object>

A set of key/value pairs to be passed down to the scroll bar's increment button sub-component

liveDragging: Boolean

Determines if the scroll bar dispatches the Event.CHANGE event every time the thumb moves, or only once it stops moving

maximum: Number

The maximum value of the scroll bar

maximumTrackFactory: Function

A function used to generate the scroll bar's maximum track sub-component

maximumTrackProperties: Dictionary.<String, Object>

A set of key/value pairs to be passed down to the scroll bar's maximum track sub-component

minimum: Number

The minimum value of the scroll bar

minimumTrackFactory: Function

A function used to generate the scroll bar's minimum track sub-component

minimumTrackProperties: Object

A set of key/value pairs to be passed down to the scroll bar's minimum track sub-component

padding: Number

Quickly sets all padding properties to the same value

paddingBottom: Number

The minimum space, in pixels, below the content, not including the track(s)

paddingLeft: Number

The minimum space, in pixels, to the left of the content, not including the track(s)

paddingRight: Number

The minimum space, in pixels, to the right of the content, not including the track(s)

paddingTop: Number

The minimum space, in pixels, above the content, not including the track(s)

page: Number

The amount the scroll bar value must change to get from one "page" to the next

repeatDelay: Number

The time, in seconds, before actions are repeated

step: Number

The amount the scroll bar value must change to increment or decrement

thumbFactory: Function

A function used to generate the scroll bar's thumb sub-component

thumbProperties: Dictionary.<String, Object>

A set of key/value pairs to be passed down to the scroll bar's thumb sub-component

trackLayoutMode: String
value: Number

The current value of the scroll bar

Protected attributes

Constants

Constants

DEFAULT_CHILD_NAME_DECREMENT_BUTTON: String static

The default value added to the nameList of the decrement button

DEFAULT_CHILD_NAME_INCREMENT_BUTTON: String static

The default value added to the nameList of the increment button

DEFAULT_CHILD_NAME_MAXIMUM_TRACK: String static

The default value added to the nameList of the maximum track

DEFAULT_CHILD_NAME_MINIMUM_TRACK: String static

The default value added to the nameList of the minimum track

DEFAULT_CHILD_NAME_THUMB: String static

The default value added to the nameList of the thumb

DIRECTION_HORIZONTAL: String static

The scroll bar's thumb may be dragged horizontally (on the x-axis)

DIRECTION_VERTICAL: String static

The scroll bar's thumb may be dragged vertically (on the y-axis)

TRACK_LAYOUT_MODE_MIN_MAX: String static

The scroll bar has two tracks, stretching to fill each side of the scroll bar with the thumb in the middle

TRACK_LAYOUT_MODE_SINGLE: String static

The scroll bar has only one track, that fills the full length of the scroll bar

Functions

Public functions

Protected functions

Constructor

ScrollBar ()

Constructor.

Attributes

alpha: Number
Inherited from DisplayObject

The opacity of the object, 0 = transparent, 1 = opaque.

base: DisplayObject
Inherited from DisplayObject

read-only

The topmost object in the display tree the object is part of.

bounds: Rectangle
Inherited from DisplayObject

read-only

The bounds of the object relative to the local coordinates of the parent.

clipRect: Rectangle
Inherited from Sprite

customDecrementButtonName: String

A name to add to the scroll bar's decrement button sub-component. Typically used by a theme to provide different skins to different scroll bars.

See also:
feathers.core.FeathersControl#nameList
#decrementButtonFactory
#decrementButtonProperties

customIncrementButtonName: String

A name to add to the scroll bar's increment button sub-component. Typically used by a theme to provide different skins to different scroll bars.

See also:
feathers.core.FeathersControl#nameList
#incrementButtonFactory
#incrementButtonProperties

customMaximumTrackName: String

A name to add to the scroll bar's maximum track sub-component. Typically used by a theme to provide different skins to different scroll bars.

See also:
feathers.core.FeathersControl#nameList
#maximumTrackFactory
#maximumTrackProperties

customMinimumTrackName: String

A name to add to the scroll bar's minimum track sub-component. Typically used by a theme to provide different skins to different scroll bars.

See also:
feathers.core.FeathersControl#nameList
#minimumTrackFactory
#minimumTrackProperties

customThumbName: String

A name to add to the scroll bar's thumb sub-component. Typically used by a theme to provide different skins to different scroll bars.

See also:
feathers.core.FeathersControl#nameList
#thumbFactory
#thumbProperties

decrementButtonFactory: Function

A function used to generate the scroll bar's decrement button sub-component. The decrement button must be an instance of Button. This factory can be used to change properties on the decrement button when it is first created. For instance, if you are skinning Feathers components without a theme, you might use this factory to set skins and other styles on the decrement button.

The function should have the following signature: function():Button

See also:
feathers.controls.Button
#decrementButtonProperties

decrementButtonProperties: Dictionary.<String, Object>

A set of key/value pairs to be passed down to the scroll bar's decrement button sub-component. The decrement button is a feathers.controls.Button instance that is created by decrementButtonFactory.

If the subcomponent has its own subcomponents, their properties can be set too, using attribute &#64; notation. For example, to set the skin on the thumb of a SimpleScrollBar which is in a Scroller which is in a List, you can use the following syntax: list.scrollerProperties.&#64;verticalScrollBarProperties.&#64;thumbProperties.defaultSkin = new Image(texture);

Setting properties in a decrementButtonFactory function instead of using decrementButtonProperties will result in better performance.

See also:
#decrementButtonFactory
feathers.controls.Button

defaultTextEditorFactory: Function
Inherited from FeathersControl

static

A function used by all UI controls that support text editor to create an ITextEditor instance. You may replace the default function with your own, if you prefer not to use the StageTextTextEditor.

The function is expected to have the following signature: function():ITextEditor

See also:
http://wiki.starling-framework.org/feathers/text-editors
feathers.core.ITextEditor

defaultTextRendererFactory: Function
Inherited from FeathersControl

static

A function used by all UI controls that support text renderers to create an ITextRenderer instance. You may replace the default function with your own, if you prefer not to use the BitmapFontTextRenderer.

The function is expected to have the following signature: function():ITextRenderer

See also:
http://wiki.starling-framework.org/feathers/text-renderers
feathers.core.ITextRenderer

depth: Number
Inherited from DisplayObject

If depth sorting is enabled on parent, this will be used to establish draw order.

depthSort: Boolean
Inherited from DisplayObjectContainer

If depth sorting enabled, direct children will use their depth property to establish draw order.

direction: String

focusIndicatorSkin: DisplayObject
Inherited from FeathersControl

If this component supports focus, this optional skin will be displayed above the component when showFocus() is called. The focus indicator skin is not always displayed when the component has focus. Typically, if the component receives focus from a touch, the focus indicator is not displayed.

The touchable of this skin will always be set to false so that it does not "steal" touches from the component or its sub-components. This skin will not affect the dimensions of the component or its hit area. It is simply a visual indicator of focus.

focusManager: IFocusManager
Inherited from FeathersControl

The current focus manager for this component.

focusPadding: Number
Inherited from FeathersControl

Quickly sets all focus padding properties to the same value. The focusPadding getter always returns the value of focusPaddingTop, but the other focus padding values may be different.

The following example gives the button 2 pixels of focus padding on all sides:

object.padding = 2;

focusPaddingBottom: Number
Inherited from FeathersControl

The minimum space, in pixels, between the object's bottom edge and the bottom edge of the focus indicator skin. A negative value may be used to expand the focus indicator skin outside the bounds of the object.

The following example gives the focus indicator skin -2 pixels of padding on the bottom edge only:

button.focusPaddingBottom = -2;

focusPaddingLeft: Number
Inherited from FeathersControl

The minimum space, in pixels, between the object's left edge and the left edge of the focus indicator skin. A negative value may be used to expand the focus indicator skin outside the bounds of the object.

The following example gives the focus indicator skin -2 pixels of padding on the right edge only:

button.focusPaddingLeft = -2;

focusPaddingRight: Number
Inherited from FeathersControl

The minimum space, in pixels, between the object's right edge and the right edge of the focus indicator skin. A negative value may be used to expand the focus indicator skin outside the bounds of the object.

The following example gives the focus indicator skin -2 pixels of padding on the right edge only:

button.focusPaddingRight = -2;

focusPaddingTop: Number
Inherited from FeathersControl

The minimum space, in pixels, between the object's top edge and the top edge of the focus indicator skin. A negative value may be used to expand the focus indicator skin outside the bounds of the object.

The following example gives the focus indicator skin -2 pixels of padding on the top edge only:

button.focusPaddingTop = -2;

hasVisibleArea: Boolean
Inherited from DisplayObject

read-only

Indicates if an object occupies any visible area. (Which is the case when its 'alpha', 'scaleX' and 'scaleY' values are not zero, and its 'visible' property is enabled.)

height: Number
Inherited from DisplayObject

The height of the object in pixels.

includeInLayout: Boolean
Inherited from FeathersControl

Determines if the ILayout should use this object or ignore it.

incrementButtonFactory: Function

A function used to generate the scroll bar's increment button sub-component. The increment button must be an instance of Button. This factory can be used to change properties on the increment button when it is first created. For instance, if you are skinning Feathers components without a theme, you might use this factory to set skins and other styles on the increment button.

The function should have the following signature: function():Button

See also:
feathers.controls.Button
#incrementButtonProperties

incrementButtonProperties: Dictionary.<String, Object>

A set of key/value pairs to be passed down to the scroll bar's increment button sub-component. The increment button is a feathers.controls.Button instance that is created by incrementButtonFactory.

If the subcomponent has its own subcomponents, their properties can be set too, using attribute &#64; notation. For example, to set the skin on the thumb of a SimpleScrollBar which is in a Scroller which is in a List, you can use the following syntax: list.scrollerProperties.&#64;verticalScrollBarProperties.&#64;thumbProperties.defaultSkin = new Image(texture);

Setting properties in a incrementButtonFactory function instead of using incrementButtonProperties will result in better performance.

See also:
#incrementButtonFactory
feathers.controls.Button

isEnabled: Boolean
Inherited from FeathersControl

Indicates whether the control is interactive or not.

isFocusEnabled: Boolean
Inherited from FeathersControl

Determines if this component can receive focus.

isInitialized: Boolean
Inherited from FeathersControl

read-only

Determines if the component has been initialized yet. The initialize() function is called one time only, when the Feathers UI control is added to the display list for the first time.

isQuickHitAreaEnabled: Boolean
Inherited from FeathersControl

Similar to mouseChildren on the classic display list. If true, children cannot dispatch touch events, but hit tests will be much faster.

layoutData: ILayoutData
Inherited from FeathersControl

Extra parameters associated with this display object that will be used by the layout algorithm.

liveDragging: Boolean

Determines if the scroll bar dispatches the Event.CHANGE event every time the thumb moves, or only once it stops moving.

maxHeight: Number
Inherited from FeathersControl

The maximum recommended height to be used for self-measurement and, optionally, by any code that is resizing this component. This value is not strictly enforced in all cases. An explicit height value that is larger than maxHeight may be set and will not be affected by the maximum.

maxWidth: Number
Inherited from FeathersControl

The maximum recommended width to be used for self-measurement and, optionally, by any code that is resizing this component. This value is not strictly enforced in all cases. An explicit width value that is larger than maxWidth may be set and will not be affected by the maximum.

maximum: Number

The maximum value of the scroll bar.

maximumTrackFactory: Function

A function used to generate the scroll bar's maximum track sub-component. The maximum track must be an instance of Button. This factory can be used to change properties on the maximum track when it is first created. For instance, if you are skinning Feathers components without a theme, you might use this factory to set skins and other styles on the maximum track.

The function should have the following signature: function():Button

See also:
feathers.controls.Button
#maximumTrackProperties

maximumTrackProperties: Dictionary.<String, Object>

A set of key/value pairs to be passed down to the scroll bar's maximum track sub-component. The maximum track is a feathers.controls.Button instance that is created by maximumTrackFactory.

If the subcomponent has its own subcomponents, their properties can be set too, using attribute &#64; notation. For example, to set the skin on the thumb of a SimpleScrollBar which is in a Scroller which is in a List, you can use the following syntax: list.scrollerProperties.&#64;verticalScrollBarProperties.&#64;thumbProperties.defaultSkin = new Image(texture);

Setting properties in a maximumTrackFactory function instead of using maximumTrackProperties will result in better performance.

See also:
#maximumTrackFactory
feathers.controls.Button

minHeight: Number
Inherited from FeathersControl

The minimum recommended height to be used for self-measurement and, optionally, by any code that is resizing this component. This value is not strictly enforced in all cases. An explicit height value that is smaller than minHeight may be set and will not be affected by the minimum.

minTouchHeight: Number
Inherited from FeathersControl

If using isQuickHitAreaEnabled, and the hit area's height is smaller than this value, it will be expanded.

minTouchWidth: Number
Inherited from FeathersControl

If using isQuickHitAreaEnabled, and the hit area's width is smaller than this value, it will be expanded.

minWidth: Number
Inherited from FeathersControl

The minimum recommended width to be used for self-measurement and, optionally, by any code that is resizing this component. This value is not strictly enforced in all cases. An explicit width value that is smaller than minWidth may be set and will not be affected by the minimum.

minimum: Number

The minimum value of the scroll bar.

minimumTrackFactory: Function

A function used to generate the scroll bar's minimum track sub-component. The minimum track must be an instance of Button. This factory can be used to change properties on the minimum track when it is first created. For instance, if you are skinning Feathers components without a theme, you might use this factory to set skins and other styles on the minimum track.

The function should have the following signature: function():Button

See also:
feathers.controls.Button
#minimumTrackProperties

minimumTrackProperties: Object

A set of key/value pairs to be passed down to the scroll bar's minimum track sub-component. The minimum track is a feathers.controls.Button instance. that is created by minimumTrackFactory.

If the subcomponent has its own subcomponents, their properties can be set too, using attribute &#64; notation. For example, to set the skin on the thumb of a SimpleScrollBar which is in a Scroller which is in a List, you can use the following syntax: list.scrollerProperties.&#64;verticalScrollBarProperties.&#64;thumbProperties.defaultSkin = new Image(texture);

Setting properties in a minimumTrackFactory function instead of using minimumTrackProperties will result in better performance.

See also:
#minimumTrackFactory
feathers.controls.Button

name: String
Inherited from DisplayObject

The name of the display object (default: null). Used by 'getChildByName()' of display object containers.

nameList: TokenList
Inherited from FeathersControl

read-only

Contains a list of all "names" assigned to this control. Names are like classes in CSS selectors. They are a non-unique identifier that can differentiate multiple styles of the same type of UI control. A single control may have many names, and many controls can share a single name. Names may be added, removed, or toggled on the nameList.

See also:
#name

nextTabFocus: IFocusDisplayObject
Inherited from FeathersControl

The next object that will receive focus when the tab key is pressed. If null, defaults to the next child on the display list.

numChildren: Number
Inherited from DisplayObjectContainer

read-only

The number of children of this container.

padding: Number

Quickly sets all padding properties to the same value. The padding getter always returns the value of paddingTop, but the other padding values may be different.

paddingBottom: Number

The minimum space, in pixels, below the content, not including the track(s).

paddingLeft: Number

The minimum space, in pixels, to the left of the content, not including the track(s).

paddingRight: Number

The minimum space, in pixels, to the right of the content, not including the track(s).

paddingTop: Number

The minimum space, in pixels, above the content, not including the track(s).

page: Number

The amount the scroll bar value must change to get from one "page" to the next.

parent: DisplayObjectContainer
Inherited from DisplayObject

pivotX: Number
Inherited from DisplayObject

The x coordinate of the object's origin in its own coordinate space (default: 0).

pivotY: Number
Inherited from DisplayObject

The y coordinate of the object's origin in its own coordinate space (default: 0).

previousTabFocus: IFocusDisplayObject
Inherited from FeathersControl

The previous object that will receive focus when the tab key is pressed while holding shift. If null, defaults to the previous child on the display list.

repeatDelay: Number

The time, in seconds, before actions are repeated. The first repeat happens after a delay that is five times longer than the following repeats.

root: DisplayObject
Inherited from DisplayObject

read-only

The root object the display object is connected to (ie: an instance of the class that was passed to the Starling constructor), or null if the object is not connected to the stage.

rotation: Number
Inherited from DisplayObject

The rotation of the object in radians, (In Loom2D, all angles are measured in radians.)

scale: Number
Inherited from DisplayObject

General scale factor. '1' means no scale, negative values flip the object. Use this when setting scaleX/scaleY explicitly is too verbose.

scaleX: Number
Inherited from DisplayObject

The horizontal scale factor. '1' means no scale, negative values flip the object.

scaleY: Number
Inherited from DisplayObject

The vertical scale factor. '1' means no scale, negative values flip the object.

skewX: Number
Inherited from DisplayObject

The horizontal skew angle in radians.

skewY: Number
Inherited from DisplayObject

The vertical skew angle in radians.

stage: Stage
Inherited from DisplayObject

read-only

The stage the display object is connected to, or null if it is not connected to the stage.

step: Number

The amount the scroll bar value must change to increment or decrement.

styleName: String
Inherited from DisplayObject

The style name used by the CSS system.

thumbFactory: Function

A function used to generate the scroll bar's thumb sub-component. The thumb must be an instance of Button. This factory can be used to change properties on the thumb when it is first created. For instance, if you are skinning Feathers components without a theme, you might use this factory to set skins and other styles on the thumb.

The function should have the following signature: function():Button

See also:
feathers.controls.Button
#thumbProperties

thumbProperties: Dictionary.<String, Object>

A set of key/value pairs to be passed down to the scroll bar's thumb sub-component. The thumb is a feathers.controls.Button instance that is created by thumbFactory.

If the subcomponent has its own subcomponents, their properties can be set too, using attribute &#64; notation. For example, to set the skin on the thumb of a SimpleScrollBar which is in a Scroller which is in a List, you can use the following syntax: list.scrollerProperties.&#64;verticalScrollBarProperties.&#64;thumbProperties.defaultSkin = new Image(texture);

Setting properties in a thumbFactory function instead of using thumbProperties will result in better performance.

See also:
#thumbFactory
feathers.controls.Button

touchable: Boolean
Inherited from DisplayObject

Indicates if this object (and its children) will receive touch events.

trackLayoutMode: String

transformationMatrix: Matrix
Inherited from DisplayObject

The transformation matrix of the object relative to its parent.

If you assign a custom transformation matrix, Starling will try to figure out
suitable values for x, y, scaleX, scaleY, and rotation. However, if the matrix was created in a different way, this might not be possible. In that case, Starling will apply the matrix, but not update the corresponding properties.

value: Number

The current value of the scroll bar.

view: Number
Inherited from DisplayObjectContainer

View controls which indexed view the container's children will be drawn into

visible: Boolean
Inherited from DisplayObject

The visibility of the object, An invisible object will be untouchable.

width: Number
Inherited from DisplayObject

The width of the object in pixels.

x: Number
Inherited from DisplayObject

The x coordinate of the object relative to the local coordinates of the parent.

y: Number
Inherited from DisplayObject

The y coordinate of the object relative to the local coordinates of the parent.

Protected attributes

Constants

DEFAULT_CHILD_NAME_DECREMENT_BUTTON: String

static

The default value added to the nameList of the decrement button.

See also:
feathers.core.IFeathersControl#nameList

DEFAULT_CHILD_NAME_INCREMENT_BUTTON: String

static

The default value added to the nameList of the increment button.

See also:
feathers.core.IFeathersControl#nameList

DEFAULT_CHILD_NAME_MAXIMUM_TRACK: String

static

The default value added to the nameList of the maximum track.

See also:
feathers.core.IFeathersControl#nameList

DEFAULT_CHILD_NAME_MINIMUM_TRACK: String

static

The default value added to the nameList of the minimum track.

See also:
feathers.core.IFeathersControl#nameList

DEFAULT_CHILD_NAME_THUMB: String

static

The default value added to the nameList of the thumb.

See also:
feathers.core.IFeathersControl#nameList

DIRECTION_HORIZONTAL: String

static

The scroll bar's thumb may be dragged horizontally (on the x-axis).

See also:
#direction

DIRECTION_VERTICAL: String

static

The scroll bar's thumb may be dragged vertically (on the y-axis).

See also:
#direction

INVALIDATION_FLAG_ALL: String

static

Flag to indicate that everything is invalid and should be redrawn.

INVALIDATION_FLAG_DATA: String

static

Invalidation flag to indicate that the primary data displayed by the UI control has changed.

INVALIDATION_FLAG_FOCUS: String

static

Invalidation flag to indicate that the focus of the UI control has changed.

INVALIDATION_FLAG_LAYOUT: String

static

Invalidation flag to indicate that the layout of the UI control has changed.

INVALIDATION_FLAG_SCROLL: String

static

Invalidation flag to indicate that the scroll position of the UI control has changed.

INVALIDATION_FLAG_SELECTED: String

static

Invalidation flag to indicate that the selection of the UI control has changed.

INVALIDATION_FLAG_SIZE: String

static

Invalidation flag to indicate that the dimensions of the UI control have changed.

INVALIDATION_FLAG_SKIN: String

static

Invalidation flag to indicate that the skin of the UI control has changed.

INVALIDATION_FLAG_STATE: String

static

Invalidation flag to indicate that the state has changed. Used by isEnabled, but may be used for other control states too.

See also:
#isEnabled

INVALIDATION_FLAG_STYLES: String

static

Invalidation flag to indicate that the styles or visual appearance of the UI control has changed.

TRACK_LAYOUT_MODE_MIN_MAX: String

static

The scroll bar has two tracks, stretching to fill each side of the scroll bar with the thumb in the middle. The tracks will be resized as the thumb moves. This layout mode is designed for scroll bars where the two sides of the track may be colored differently to show the value "filling up" as the thumb is dragged or to highlight the track when it is triggered to scroll by a page instead of a step.

Since the width and height of the tracks will change, consider sing a special display object such as a Scale9Image, Scale3Image or a TiledImage that is designed to be resized dynamically.

See also:
#trackLayoutMode
feathers.display.Scale9Image
feathers.display.Scale3Image
feathers.display.TiledImage

TRACK_LAYOUT_MODE_SINGLE: String

static

The scroll bar has only one track, that fills the full length of the scroll bar. In this layout mode, the "minimum" track is displayed and fills the entire length of the scroll bar. The maximum track will not exist.

See also:
#trackLayoutMode

Functions

FeathersControl__ls_staticconstructor (): Void
Inherited from FeathersControl

static

Static constructor.



addChild ( child: DisplayObject ): DisplayObject
Inherited from DisplayObjectContainer

Adds a child to the container. It will be at the frontmost position.

Parameters

child: DisplayObject


addChildAt ( child: DisplayObject , index: Number ): DisplayObject
Inherited from DisplayObjectContainer

Adds a child to the container at a certain index.

Parameters

child: DisplayObject
index: Number


addEventListener ( type: String , listener: Function ): Void
Inherited from EventDispatcher

Registers an event listener at a certain object.

Parameters

type: String
listener: Function


addLMLChild ( id: String , child: Object ): Void
Inherited from DisplayObjectContainer

Parameters

id: String
child: Object


broadcastEvent ( event: Event ): Void
Inherited from DisplayObjectContainer

Dispatches an event on all children (recursively). The event must not bubble.

Parameters

event: Event


broadcastEventWith ( type: String , data: Object = null ): Void
Inherited from DisplayObjectContainer

Dispatches an event with the given parameters on all children (recursively). The method uses an internal pool of event objects to avoid allocations.

Parameters

type: String
data: Object = null


center (): Void
Inherited from DisplayObject

center the DisplayObject's pivot point using the width and height



contains ( child: DisplayObject ): Boolean
Inherited from DisplayObjectContainer

Determines if a certain object is a child of the container (recursively).

Parameters

child: DisplayObject


dispatchEvent ( event: Event ): Void
Inherited from EventDispatcher

Dispatches an event to all objects that have registered listeners for its type. If an event with enabled 'bubble' property is dispatched to a display object, it will travel up along the line of parents, until it either hits the root object or someone stops its propagation manually.

Parameters

event: Event


dispatchEventWith ( type: String , bubbles: Boolean = false , data: Object = null ): Void
Inherited from EventDispatcher

Dispatches an event with the given parameters to all objects that have registered listeners for the given type. The method uses an internal pool of event objects to avoid allocations.

Parameters

type: String
bubbles: Boolean = false
data: Object = null


dispose (): Void
Inherited from DisplayObject

Disposes all resources of the display object. GPU buffers are released, event listeners are removed, filters are disposed.



flatten (): Void
Inherited from Sprite



getBounds ( targetSpace: DisplayObject , resultRect: Rectangle = null ): Rectangle
Inherited from DisplayObject

Returns a rectangle that completely encloses the object as it appears in another coordinate system. If you pass a 'resultRectangle', the result will be stored in this rectangle instead of creating a new object.

Parameters

targetSpace: DisplayObject
resultRect: Rectangle = null


getChildAt ( index: Number ): DisplayObject
Inherited from DisplayObjectContainer

Returns a child object at a certain index.

Parameters

index: Number


getChildByName ( name: String ): DisplayObject
Inherited from DisplayObjectContainer

Returns a child object with a certain name (non-recursively).

Parameters

name: String


getChildIndex ( child: DisplayObject ): Number
Inherited from DisplayObjectContainer

Returns the index of a child within the container, or "-1" if it is not found.

Parameters

child: DisplayObject


getFullTypeName (): String
Inherited from Object

native

Gets the fully qualified type name of the Object. The fully qualified type name includes the package of the type.


Returns

String fully qualified type name of the Object.

getTargetTransformationMatrix ( targetSpace: DisplayObject , resultMatrix: Matrix ): Void
Inherited from DisplayObject

native

Parameters

targetSpace: DisplayObject
resultMatrix: Matrix


getType (): Type
Inherited from Object

native

Gets the Type that describes the Object.


Returns

Type The Type that describes the object.

getTypeName (): String
Inherited from Object

native

Gets the type name of the Object.


Returns

String type name of the Object.

globalToLocal ( globalPoint: Point ): Point
Inherited from DisplayObject

Transforms a point from global (stage) coordinates to the local coordinate system.

Parameters

globalPoint: Point


hasEventListener ( type: String ): Boolean
Inherited from EventDispatcher

Returns if there are listeners registered for a certain event type.

Parameters

type: String


hideFocus (): Void
Inherited from FeathersControl

If the visual indicator of focus has been displayed by showFocus(), call this function to hide it.

Important: This function will not clear focus from the display object if it has focus. To clear focus from the display object, you should set the focus property on the focus manager to null or another display object.

See also:
#showFocus()
feathers.core.IFocusManager#focus



hitTest ( localPoint: Point , forTouch: Boolean = false ): DisplayObject
Inherited from DisplayObject

Returns the object that is found topmost beneath a point in local coordinates, or nil if the test fails. If "forTouch" is true, untouchable and invisible objects will cause the test to fail.

Parameters

localPoint: Point
forTouch: Boolean = false


initializeLMLNode ( id: String ): Void
Inherited from DisplayObject

Handle LML node initialization.

Parameters

id: String


invalidate ( flag: String = ): Void
Inherited from FeathersControl

Call this function to tell the UI control that a redraw is pending. The redraw will happen immediately before Starling renders the UI control to the screen. The validation system exists to ensure that multiple properties can be set together without redrawing multiple times in between each property change.

If you cannot wait until later for the validation to happen, you can call validate() to redraw immediately. As an example, you might want to validate immediately if you need to access the correct width or height values of the UI control, since these values are calculated during validation.

See also:
feathers.core.FeathersControl#validate()

Parameters

flag: String =


isInvalid ( flag: String = null ): Boolean
Inherited from FeathersControl

Indicates whether the control is pending validation or not. By default, returns true if any invalidation flag has been set. If you pass in a specific flag, returns true only if that flag has been set (others may be set too, but it checks the specific flag only. If all flags have been marked as invalid, always returns true.

Parameters

flag: String = null


localToGlobal ( localPoint: Point ): Point
Inherited from DisplayObject

Transforms a point from the local coordinate system to global (stage) coordinates.

Parameters

localPoint: Point


preinitializeLMLNode ( id: String ): Void
Inherited from DisplayObject

Pre-initialize the LML node.

Parameters

id: String


removeChild ( child: DisplayObject , dispose: Boolean = false ): DisplayObject
Inherited from DisplayObjectContainer

Removes a child from the container. If the object is not a child, nothing happens. If requested, the child will be disposed right away.

Parameters

child: DisplayObject
dispose: Boolean = false


removeChildAt ( index: Number , dispose: Boolean = false ): DisplayObject
Inherited from DisplayObjectContainer

Removes a child at a certain index. Children above the child will move down. If requested, the child will be disposed right away.

Parameters

index: Number
dispose: Boolean = false


removeChildren ( beginIndex: Number = 0 , endIndex: Number = , dispose: Boolean = false ): Void
Inherited from DisplayObjectContainer

Removes a range of children from the container (endIndex included). If no arguments are given, all children will be removed.

Parameters

beginIndex: Number = 0
endIndex: Number =
dispose: Boolean = false


removeEventListener ( type: String , listener: Function ): Void
Inherited from EventDispatcher

Removes an event listener from the object.

Parameters

type: String
listener: Function


removeEventListeners ( type: String = null ): Void
Inherited from EventDispatcher

Removes all event listeners with a certain type, or all of them if type is null. Be careful when removing all event listeners: you never know who else was listening.

Parameters

type: String = null


removeFromParent ( dispose: Boolean = false ): Void
Inherited from DisplayObject

Removes the object from its parent, if it has one.

Parameters

dispose: Boolean = false


removeLMLChildren (): Void
Inherited from DisplayObjectContainer



setChildIndex ( child: DisplayObject , index: Number ): Void
Inherited from DisplayObjectContainer

Moves a child to a certain index. Children at and after the replaced position move up.

Parameters

child: DisplayObject
index: Number


setSize ( width: Number , height: Number ): Void
Inherited from FeathersControl

Sets both the width and the height of the control.

Parameters

width: Number
height: Number


showFocus (): Void
Inherited from FeathersControl

If the object has focus, an additional visual indicator may optionally be displayed to highlight the object. Calling this function may have no effect. It's merely a suggestion to the object.

Important: This function will not give focus to the display object if it doesn't have focus. To give focus to the display object, you should set the focus property on the focus manager.

object.focusManager.focus = object;

See also:
#hideFocus()
feathers.core.IFocusManager#focus



sortChildren ( compareFunction: Function ): Void
Inherited from DisplayObjectContainer

Sorts the children according to a given function (that works just like the sort function of the Vector class).

Parameters

compareFunction: Function


swapChildren ( child1: DisplayObject , child2: DisplayObject ): Void
Inherited from DisplayObjectContainer

Swaps the indexes of two children.

Parameters

child1: DisplayObject
child2: DisplayObject


swapChildrenAt ( index1: Number , index2: Number ): Void
Inherited from DisplayObjectContainer

Swaps the indexes of two children.

Parameters

index1: Number
index2: Number


toString (): String
Inherited from Object

native

Returns a String that describes the Object. This can be overriden to provide extra details when printing objects using trace().


Returns

String String that described the Object.

unflatten (): Void
Inherited from Sprite



Protected functions