DefaultListItemRenderer
public class
feathers.controls.renderers.DefaultListItemRenderer
Description
The default item renderer for List control. Supports up to three optional sub-views, including a label to display text, an icon to display an image, and an "accessory" to display a UI control or another display object (with shortcuts for including a second image or a second label).
See also:
feathers.controls.List
API overview
Constructor
DefaultListItemRenderer
()
Constructor.
Attributes
Public attributes
| index: Number |
The index (numeric position, starting from zero) of the item within the list's data provider |
| owner: List |
The list that contains this item renderer |
Protected attributes
Constructor
DefaultListItemRenderer ()
Constructor.
Attributes
accessoryField: String
Inherited from BaseDefaultItemRenderer
The field in the item that contains a display object to be positioned
in the accessory position of the renderer. If you wish to display an
Image in the accessory position, it's better for
performance to use accessorySourceField instead.
All of the accessory fields and functions, ordered by priority:
accessorySourceFunctionaccessorySourceFieldaccessoryLabelFunctionaccessoryLabelFieldaccessoryFunctionaccessoryField
See also:
#accessorySourceField
#accessoryFunction
#accessorySourceFunction
#accessoryLabelField
#accessoryLabelFunction
accessoryFunction: Function
Inherited from BaseDefaultItemRenderer
A function that returns a display object to be positioned in the
accessory position of the renderer. If you wish to display an
Image in the accessory position, it's better for
performance to use accessorySourceFunction instead.
Note: As the list scrolls, this function will almost always be called more than once for each individual item in the list's data provider. Your function should not simply return a new accessory every time. This will result in the unnecessary creation and destruction of many icons, which will overwork the garbage collector and hurt performance. It's better to return a new accessory the first time this function is called for a particular item and then return the same accessory if that item is passed to this function again.
The function is expected to have the following signature:
function( item:Object ):DisplayObject
All of the accessory fields and functions, ordered by priority:
accessorySourceFunctionaccessorySourceFieldaccessoryLabelFunctionaccessoryLabelFieldaccessoryFunctionaccessoryField
See also:
#accessoryField
#accessorySourceField
#accessorySourceFunction
#accessoryLabelField
#accessoryLabelFunction
accessoryGap: Number
Inherited from BaseDefaultItemRenderer
The space, in pixels, between the accessory and the other child it is
positioned relative to. Applies to either horizontal or vertical
spacing, depending on the value of accessoryPosition. If
the value is NaN, the value of the gap
property will be used instead.
If accessoryGap is set to Number.POSITIVE_INFINITY,
the accessory and the component it is relative to will be positioned
as far apart as possible.
See also:
#gap
#accessoryPosition
accessoryLabelFactory: Function
Inherited from BaseDefaultItemRenderer
A function that generates ITextRenderer that uses the result
of accessoryLabelField or accessoryLabelFunction.
Can be used to set properties on the ITextRenderer.
The function is expected to have the following signature:
function():ITextRenderer
See also:
feathers.core.ITextRenderer
feathers.core.FeathersControl#defaultTextRendererFactory
#accessoryLabelField
#accessoryLabelFunction
accessoryLabelField: String
Inherited from BaseDefaultItemRenderer
The field in the item that contains a string to be displayed in a
renderer-managed Label in the accessory position of the
renderer. The renderer will automatically reuse an internal
Label and swap the text when the data changes. This
Label may be skinned by changing the
accessoryLabelFactory.
Using an accessory label will result in better performance than
passing in a Label through a accessoryField
or accessoryFunction because the renderer can avoid
costly display list manipulation.
All of the accessory fields and functions, ordered by priority:
accessorySourceFunctionaccessorySourceFieldaccessoryLabelFunctionaccessoryLabelFieldaccessoryFunctionaccessoryField
See also:
#accessoryLabelFactory
#accessoryLabelFunction
#accessoryField
#accessoryFunction
#accessorySourceField
#accessorySourceFunction
accessoryLabelFunction: Function
Inherited from BaseDefaultItemRenderer
A function that returns a string to be displayed in a
renderer-managed Label in the accessory position of the
renderer. The renderer will automatically reuse an internal
Label and swap the text when the data changes. This
Label may be skinned by changing the
accessoryLabelFactory.
Using an accessory label will result in better performance than
passing in a Label through a accessoryField
or accessoryFunction because the renderer can avoid
costly display list manipulation.
The function is expected to have the following signature:
function( item:Object ):String
All of the accessory fields and functions, ordered by priority:
accessorySourceFunctionaccessorySourceFieldaccessoryLabelFunctionaccessoryLabelFieldaccessoryFunctionaccessoryField
See also:
#accessoryLabelFactory
#accessoryLabelField
#accessoryField
#accessoryFunction
#accessorySourceField
#accessorySourceFunction
accessoryLabelProperties: Dictionary.<String, Object>
Inherited from BaseDefaultItemRenderer
A set of key/value pairs to be passed down to a label accessory. The
title is an ITextRenderer instance. The available
properties depend on which ITextRenderer implementation
is used.
If the subcomponent has its own subcomponents, their properties
can be set too, using attribute @ 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.@verticalScrollBarProperties.@thumbProperties.defaultSkin = new Image(texture);
Setting properties in a accessoryLabelFactory
function instead of using accessoryLabelProperties will
result in better performance.
See also:
feathers.core.ITextRenderer
#accessoryLabelFactory
#accessoryLabelField
#accessoryLabelFunction
accessoryLoaderFactory: Function
Inherited from BaseDefaultItemRenderer
A function that generates an ImageLoader that uses the result
of accessorySourceField or accessorySourceFunction.
Useful for transforming the ImageLoader in some way. For
example, you might want to scale the texture for current DPI or apply
pixel snapping.
The function is expected to have the following signature:
function():ImageLoader
See also:
feathers.controls.ImageLoader
#accessorySourceField;
#accessorySourceFunction;
accessoryOffsetX: Number
Inherited from BaseDefaultItemRenderer
Offsets the x position of the accessory by a certain number of pixels.
accessoryOffsetY: Number
Inherited from BaseDefaultItemRenderer
Offsets the y position of the accessory by a certain number of pixels.
accessoryPosition: String
Inherited from BaseDefaultItemRenderer
The location of the accessory, relative to one of the other children.
Use ACCESSORY_POSITION_MANUAL to position the accessory
from the top-left corner.
See also:
#layoutOrder
accessorySourceField: String
Inherited from BaseDefaultItemRenderer
A field in the item that contains a loom2d.textures.Texture
or a URL that points to a bitmap to be used as the item renderer's
accessory. The renderer will automatically manage and reuse an internal
ImageLoader sub-component and this value will be passed
to the source property. The ImageLoader may
be customized by changing the accessoryLoaderFactory.
Using an accessory source will result in better performance than
passing in an ImageLoader or Image through
a accessoryField or accessoryFunction because
the renderer can avoid costly display list manipulation.
All of the accessory fields and functions, ordered by priority:
accessorySourceFunctionaccessorySourceFieldaccessoryLabelFunctionaccessoryLabelFieldaccessoryFunctionaccessoryField
See also:
feathers.controls.ImageLoader#source
#accessoryLoaderFactory
#accessorySourceFunction
#accessoryField
#accessoryFunction
#accessoryLabelField
#accessoryLabelFunction
accessorySourceFunction: Function
Inherited from BaseDefaultItemRenderer
A function that generates a loom2d.textures.Texture
or a URL that points to a bitmap to be used as the item renderer's
accessory. The renderer will automatically manage and reuse an internal
ImageLoader sub-component and this value will be passed
to the source property. The ImageLoader may
be customized by changing the accessoryLoaderFactory.
Using an accessory source will result in better performance than
passing in an ImageLoader or Image through
a accessoryField or accessoryFunction
because the renderer can avoid costly display list manipulation.
Note: As the list scrolls, this function will almost always be called more than once for each individual item in the list's data provider. Your function should not simply return a new texture every time. This will result in the unnecessary creation and destruction of many textures, which will overwork the garbage collector and hurt performance. Creating a new texture at all is dangerous, unless you are absolutely sure to dispose it when necessary because neither the list nor its item renderer will dispose of the texture for you. If you are absolutely sure that you are managing the texture memory with proper disposal, it's better to return a new texture the first time this function is called for a particular item and then return the same texture if that item is passed to this function again.
The function is expected to have the following signature:
function( item:Object ):Object
The return value is a valid value for the source
property of an ImageLoader component.
All of the accessory fields and functions, ordered by priority:
accessorySourceFunctionaccessorySourceFieldaccessoryLabelFunctionaccessoryLabelFieldaccessoryFunctionaccessoryField
See also:
feathers.controls.ImageLoader#source
#accessoryLoaderFactory
#accessorySourceField
#accessoryField
#accessoryFunction
#accessoryLabelField
#accessoryLabelFunction
autoFlatten: Boolean
Inherited from Button
Determines if the button should automatically call flatten()
after it finishes drawing. In some cases, this will improve
performance.
The following example tells the button to flatten after it validates:
button.autoFlatten = true;
base: DisplayObject
Inherited from DisplayObject
read-only
The topmost object in the display tree the object is part of.
blendEnabled: Boolean
Inherited from DisplayObject
Enables or disables blending. If set to false, there will be no blending and there may be performance gains.
blendMode: BlendMode
Inherited from DisplayObject
The default value is BlendMode.AUTO
The blend mode determines how the object is blended with the objects underneath.
See also:
loom2d.display.BlendMode
bounds: Rectangle
Inherited from DisplayObject
read-only
The bounds of the object relative to the local coordinates of the parent.
cacheAsBitmap: Boolean
Inherited from DisplayObject
If true, the untransformed contents get cached into a texture at render time.
The contents remain static until you turn off caching or use invalidateBitmapCache
to update the cache manually.
currentState: String
Inherited from Button
The current state of the button
See also:
#STATE_UP
#STATE_DOWN
#STATE_HOVER
#STATE_DISABLED
defaultIcon: DisplayObject
Inherited from Button
The icon used when no other icon is defined for the current state. Intended for use when multiple states should use the same icon.
The following example gives the button a default icon to use for all states when no specific icon is available:
button.defaultIcon = new Image( texture );
See also:
#stateToIconFunction
#upIcon
#downIcon
#hoverIcon
#disabledIcon
#defaultSelectedIcon
#selectedUpIcon
#selectedDownIcon
#selectedHoverIcon
#selectedDisabledIcon
defaultLabelProperties: Dictionary.<String, Object>
Inherited from Button
The default label properties are a set of key/value pairs to be
passed down to the button's label text renderer, and it is used when
no specific properties are defined for the button's current state.
Intended for use when multiple states should share the same
properties. The label text renderer is an ITextRenderer
instance. The available properties depend on which ITextRenderer
implementation is returned by labelFactory. The most
common implementations are BitmapFontTextRenderer and
TextFieldTextRenderer.
The following example gives the button default label properties to use for all states when no specific label properties are available:
button.defaultLabelProperties.textFormat = new BitmapFontTextFormat( bitmapFont );
button.defaultLabelProperties.wordWrap = true;
See also:
feathers.core.ITextRenderer
feathers.controls.text.BitmapFontTextRenderer
feathers.controls.text.TextFieldTextRenderer
#defaultSelectedLabelProperties
#stateToLabelPropertiesFunction
defaultSelectedIcon: DisplayObject
Inherited from Button
The icon used when no other icon is defined for the current state
when the button is selected. Has a higher priority than
defaultIcon, but a lower priority than other selected
icons.
The following example gives the button a default icon to use for all selected states when no specific icon is available:
button.defaultSelectedIcon = new Image( texture );
See also:
#defaultIcon
#selectedUpIcon
#selectedDownIcon
#selectedHoverIcon
#selectedDisabledIcon
defaultSelectedLabelProperties: Dictionary.<String, Object>
Inherited from Button
The default selected label properties are a set of key/value pairs to
be passed down ot the button's label text renderer, and it is used
when the button is selected and no specific properties are defined
for the button's current state. If null, then
defaultLabelProperties is used instead. The label
text renderer is an ITextRenderer instance. The
available properties depend on which ITextRenderer
implementation is returned by labelFactory. The most
common implementations are BitmapFontTextRenderer and
TextFieldTextRenderer.
The following example gives the button default label properties to use for all selected states when no specific label properties are available:
button.defaultSelectedLabelProperties.textFormat = new BitmapFontTextFormat( bitmapFont );
button.defaultSelectedLabelProperties.wordWrap = true;
See also:
feathers.core.ITextRenderer
feathers.controls.text.BitmapFontTextRenderer
feathers.controls.text.TextFieldTextRenderer
#defaultLabelProperties
defaultSelectedSkin: DisplayObject
Inherited from Button
The skin used when no other skin is defined for the current state
when the button is selected. Has a higher priority than
defaultSkin, but a lower priority than other selected
skins.
The following example gives the button a default skin to use for all selected states when no specific skin is available:
button.defaultSelectedSkin = new Image( texture );
See also:
#defaultSkin
#selectedUpSkin
#selectedDownSkin
#selectedHoverSkin
#selectedDisabledSkin
defaultSkin: DisplayObject
Inherited from Button
The skin used when no other skin is defined for the current state. Intended for use when multiple states should use the same skin.
The following example gives the button a default skin to use for all states when no specific skin is available:
button.defaultSkin = new Image( texture );
See also:
#stateToSkinFunction
#upSkin
#downSkin
#hoverSkin
#disabledSkin
#defaultSelectedSkin
#selectedUpSkin
#selectedDownSkin
#selectedHoverSkin
#selectedDisabledSkin
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 depthSort is enabled on parent, this will be used to establish draw order. Higher values are drawn closer. Matching values have undefined order.
depthSort: Boolean
Inherited from DisplayObjectContainer
If depth sorting enabled, direct children will use their depth property to establish draw order.
disabledIcon: DisplayObject
Inherited from Button
The icon used for the button's disabled state. If null, then
defaultIcon is used instead.
The following example gives the button an icon for the disabled state:
button.disabledIcon = new Image( texture );
See also:
#defaultIcon
#selectedDisabledIcon
disabledLabelProperties: Dictionary.<String, Object>
Inherited from Button
A set of key/value pairs to be passed down ot the button's label
text renderer when the button is in the disabled state. If null,
then defaultLabelProperties is used instead. The label
text renderer is an ITextRenderer instance. The
available properties depend on which ITextRenderer
implementation is returned by labelFactory. The most
common implementations are BitmapFontTextRenderer and
TextFieldTextRenderer.
The following example gives the button label properties for the disabled state:
button.disabledLabelProperties.textFormat = new BitmapFontTextFormat( bitmapFont );
See also:
feathers.core.ITextRenderer
feathers.controls.text.BitmapFontTextRenderer
feathers.controls.text.TextFieldTextRenderer
#defaultLabelProperties
#selectedDisabledLabelProperties
disabledSkin: DisplayObject
Inherited from Button
The skin used for the button's disabled state. If null,
then defaultSkin is used instead.
The following example gives the button a skin for the disabled state:
button.disabledSkin = new Image( texture );
See also:
#defaultSkin
#selectedDisabledSkin
downIcon: DisplayObject
Inherited from Button
The icon used for the button's down state. If null, then
defaultIcon is used instead.
The following example gives the button an icon for the down state:
button.downIcon = new Image( texture );
See also:
#defaultIcon
#selectedDownIcon
downLabelProperties: Dictionary.<String, Object>
Inherited from Button
A set of key/value pairs to be passed down ot the button's label
text renderer when the button is in the down state. If null,
then defaultLabelProperties is used instead. The label
text renderer is an ITextRenderer instance. The
available properties depend on which ITextRenderer
implementation is returned by labelFactory. The most
common implementations are BitmapFontTextRenderer and
TextFieldTextRenderer.
The following example gives the button label properties for the down state:
button.downLabelProperties.textFormat = new BitmapFontTextFormat( bitmapFont );
See also:
feathers.core.ITextRenderer
feathers.controls.text.BitmapFontTextRenderer
feathers.controls.text.TextFieldTextRenderer
#defaultLabelProperties
#selectedDownLabelProperties
downSkin: DisplayObject
Inherited from Button
The skin used for the button's down state. If null, then
defaultSkin is used instead.
The following example gives the button a skin for the down state:
button.downSkin = new Image( texture );
See also:
#defaultSkin
#selectedDownSkin
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;
gap: Number
Inherited from Button
The space, in pixels, between the icon and the label. Applies to
either horizontal or vertical spacing, depending on the value of
iconPosition.
If gap is set to Number.POSITIVE_INFINITY,
the label and icon will be positioned as far apart as possible. In
other words, they will be positioned at the edges of the button,
adjusted for padding.
The following example creates a gap of 50 pixels between the label and the icon:
button.label = "Click Me";
button.defaultIcon = new Image( texture );
button.gap = 50;
See also:
#iconPosition
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.)
horizontalAlign: String
Inherited from Button
The location where the button's content is aligned horizontally (on the x-axis).
The following example aligns the button's content to the left:
button.horizontalAlign = Button.HORIZONTAL_ALIGN_LEFT;
hoverIcon: DisplayObject
Inherited from Button
The icon used for the button's hover state. If null, then
defaultIcon is used instead.
The following example gives the button an icon for the hover state:
button.hoverIcon = new Image( texture );
See also:
#defaultIcon
#selectedDownIcon
hoverLabelProperties: Dictionary.<String, Object>
Inherited from Button
A set of key/value pairs to be passed down ot the button's label
text renderer when the button is in the hover state. If null,
then defaultLabelProperties is used instead. The label
text renderer is an ITextRenderer instance. The
available properties depend on which ITextRenderer
implementation is returned by labelFactory. The most
common implementations are BitmapFontTextRenderer and
TextFieldTextRenderer.
The following example gives the button label properties for the hover state:
button.hoverLabelProperties.textFormat = new BitmapFontTextFormat( bitmapFont );
See also:
feathers.core.ITextRenderer
feathers.controls.text.BitmapFontTextRenderer
feathers.controls.text.TextFieldTextRenderer
#defaultLabelProperties
#selectedHoverLabelProperties
hoverSkin: DisplayObject
Inherited from Button
The skin used for the button's hover state. If null, then
defaultSkin is used instead.
The following example gives the button a skin for the hover state:
button.hoverSkin = new Image( texture );
See also:
#defaultSkin
#selectedHoverSkin
iconField: String
Inherited from BaseDefaultItemRenderer
The field in the item that contains a display object to be displayed as an icon or other graphic next to the label in the renderer.
All of the icon fields and functions, ordered by priority:
iconSourceFunctioniconSourceFieldiconFunctioniconField
See also:
#iconFunction
#iconSourceField
#iconSourceFunction
iconFunction: Function
Inherited from BaseDefaultItemRenderer
A function used to generate an icon for a specific item.
Note: As the list scrolls, this function will almost always be called more than once for each individual item in the list's data provider. Your function should not simply return a new icon every time. This will result in the unnecessary creation and destruction of many icons, which will overwork the garbage collector and hurt performance. It's better to return a new icon the first time this function is called for a particular item and then return the same icon if that item is passed to this function again.
The function is expected to have the following signature:
function( item:Object ):DisplayObject
All of the icon fields and functions, ordered by priority:
iconSourceFunctioniconSourceFieldiconFunctioniconField
See also:
#iconField
#iconSourceField
#iconSourceFunction
iconLoaderFactory: Function
Inherited from BaseDefaultItemRenderer
A function that generates an ImageLoader that uses the result
of iconSourceField or iconSourceFunction.
Useful for transforming the ImageLoader in some way. For
example, you might want to scale the texture for current DPI or apply
pixel snapping.
The function is expected to have the following signature:
function():ImageLoader
See also:
feathers.controls.ImageLoader
#iconSourceField
#iconSourceFunction
iconOffsetX: Number
Inherited from Button
Offsets the x position of the icon by a certain number of pixels.
The following example offsets the x position of the button's icon by 20 pixels:
button.iconOffsetX = 20;
iconOffsetY: Number
Inherited from Button
Offsets the y position of the icon by a certain number of pixels.
The following example offsets the y position of the button's icon by 20 pixels:
button.iconOffsetY = 20;
iconPosition: String
Inherited from Button
The location of the icon, relative to the label.
The following example positions the icon to the right of the label:
button.label = "Click Me";
button.defaultIcon = new Image( texture );
button.iconPosition = Button.ICON_POSITION_RIGHT;
iconSourceField: String
Inherited from BaseDefaultItemRenderer
The field in the item that contains a loom2d.textures.Texture
or a URL that points to a bitmap to be used as the item renderer's
icon. The renderer will automatically manage and reuse an internal
ImageLoader sub-component and this value will be passed
to the source property. The ImageLoader may
be customized by changing the iconLoaderFactory.
Using an icon source will result in better performance than
passing in an ImageLoader or Image through
a iconField or iconFunction
because the renderer can avoid costly display list manipulation.
All of the icon fields and functions, ordered by priority:
iconSourceFunctioniconSourceFieldiconFunctioniconField
See also:
feathers.controls.ImageLoader#source
#iconLoaderFactory
#iconSourceFunction
#iconField
#iconFunction
iconSourceFunction: Function
Inherited from BaseDefaultItemRenderer
A function used to generate a loom2d.textures.Texture
or a URL that points to a bitmap to be used as the item renderer's
icon. The renderer will automatically manage and reuse an internal
ImageLoader sub-component and this value will be passed
to the source property. The ImageLoader may
be customized by changing the iconLoaderFactory.
Using an icon source will result in better performance than
passing in an ImageLoader or Image through
a iconField or iconFunction
because the renderer can avoid costly display list manipulation.
Note: As the list scrolls, this function will almost always be called more than once for each individual item in the list's data provider. Your function should not simply return a new texture every time. This will result in the unnecessary creation and destruction of many textures, which will overwork the garbage collector and hurt performance. Creating a new texture at all is dangerous, unless you are absolutely sure to dispose it when necessary because neither the list nor its item renderer will dispose of the texture for you. If you are absolutely sure that you are managing the texture memory with proper disposal, it's better to return a new texture the first time this function is called for a particular item and then return the same texture if that item is passed to this function again.
The function is expected to have the following signature:
function( item:Object ):Object
The return value is a valid value for the source
property of an ImageLoader component.
All of the icon fields and functions, ordered by priority:
iconSourceFunctioniconSourceFieldiconFunctioniconField
See also:
feathers.controls.ImageLoader#source
#iconLoaderFactory
#iconSourceField
#iconField
#iconFunction
ignoreHitTestAlpha: Boolean
Inherited from DisplayObject
This can be used if you wish to have a DisplayObject with zero alpha still respond to hit tests
includeInLayout: Boolean
Inherited from FeathersControl
Determines if the ILayout should use this object or ignore it.
index: Number
The index (numeric position, starting from zero) of the item within
the list's data provider. Like the data property, this
value may change if this item renderer is reused by the list for a
different item.
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.
isSelected: Boolean
Inherited from Button
Indicates if the button is selected or not. The button may be
selected programmatically, even if isToggle is false,
but generally, isToggle should be set to true
to allow the user to select and deselect it.
The following example enables the button to toggle and selects it automatically:
button.isToggle = true;
button.isSelected = true;
See also:
#isToggle
isToggle: Boolean
Inherited from Button
Determines if the button may be selected or unselected when clicked.
The following example enables the button to toggle and listens for
Event.CHANGE:
button.isToggle = true;
button.addEventListener( Event.CHANGE, button_changeHandler );
See also:
loom2d.events.Event#CHANGE
itemHasAccessory: Boolean
Inherited from BaseDefaultItemRenderer
If true, the accessory will come from the renderer's item using the appropriate field or function for the accessory. If false, the accessory may be set using other means.
itemHasIcon: Boolean
Inherited from BaseDefaultItemRenderer
If true, the icon will come from the renderer's item using the appropriate field or function for the icon. If false, the icon may be skinned for each state externally.
itemHasLabel: Boolean
Inherited from BaseDefaultItemRenderer
If true, the label will come from the renderer's item using the appropriate field or function for the label. If false, the label may be set externally.
keepDownStateOnRollOut: Boolean
Inherited from Button
Determines if a pressed button should remain in the down state if a
touch moves outside of the button's bounds. Useful for controls like
Slider and ToggleSwitch to keep a thumb in
the down state while it is dragged around.
The following example ensures that the button's down state remains active when the button is pressed but the touch moves outside the button's bounds:
button.keepDownStateOnRollOut = true;
label: String
Inherited from Button
The text displayed on the button.
The following example gives the button some label text:
button.label = "Click Me";
labelFactory: Function
Inherited from Button
A function used to instantiate the button's label text renderer
sub-component. By default, the button will use the global text
renderer factory, FeathersControl.defaultTextRendererFactory(),
to create the label text renderer. The label text renderer must be an
instance of ITextRenderer. To change properties on the
label text renderer, see defaultLabelProperties and the
other "LabelProperties" properties for each button
state.
The factory should have the following function signature:
function():ITextRenderer
The following example gives the button a custom factory for the label text renderer:
button.labelFactory = function():ITextRenderer {
return new TextFieldTextRenderer();
}
See also:
feathers.core.ITextRenderer
feathers.core.FeathersControl#defaultTextRendererFactory
feathers.controls.text.BitmapFontTextRenderer
feathers.controls.text.TextFieldTextRenderer
labelField: String
Inherited from BaseDefaultItemRenderer
The field in the item that contains the label text to be displayed by
the renderer. If the item does not have this field, and a
labelFunction is not defined, then the renderer will
default to calling toString() on the item. To omit the
label completely, either provide a custom item renderer without a
label or define a labelFunction that returns an empty
string.
All of the label fields and functions, ordered by priority:
labelFunctionlabelField
See also:
#labelFunction
labelFunction: Function
Inherited from BaseDefaultItemRenderer
A function used to generate label text for a specific item. If this
function is not null, then the labelField will be
ignored.
The function is expected to have the following signature:
function( item:Object ):String
All of the label fields and functions, ordered by priority:
labelFunctionlabelField
See also:
#labelField
labelOffsetX: Number
Inherited from Button
Offsets the x position of the label by a certain number of pixels.
The following example offsets the x position of the button's label by 20 pixels:
button.labelOffsetX = 20;
labelOffsetY: Number
Inherited from Button
Offsets the y position of the label by a certain number of pixels.
The following example offsets the y position of the button's label by 20 pixels:
button.labelOffsetY = 20;
layoutData: ILayoutData
Inherited from FeathersControl
Extra parameters associated with this display object that will be used by the layout algorithm.
layoutOrder: String
Inherited from BaseDefaultItemRenderer
The accessory's position will be based on which other child (the label or the icon) the accessory should be relative to.
The accessoryPositionOrigin property will be ignored
if accessoryPosition is set to ACCESSORY_POSITION_MANUAL.
See also:
#accessoryPosition
#iconPosition
LAYOUT_ORDER_LABEL_ICON_ACCESSORY
LAYOUT_ORDER_LABEL_ACCESSORY_ICON
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.
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.
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
Inherited from Button
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.
The following example gives the button 20 pixels of padding on all sides:
button.padding = 20;
paddingBottom: Number
Inherited from Button
The minimum space, in pixels, between the button's bottom edge and the button's content.
The following example gives the button 20 pixels of padding on the bottom edge only:
button.paddingBottom = 20;
paddingLeft: Number
Inherited from Button
The minimum space, in pixels, between the button's left edge and the button's content.
The following example gives the button 20 pixels of padding on the left edge only:
button.paddingLeft = 20;
paddingRight: Number
Inherited from Button
The minimum space, in pixels, between the button's right edge and the button's content.
The following example gives the button 20 pixels of padding on the right edge only:
button.paddingRight = 20;
paddingTop: Number
Inherited from Button
The minimum space, in pixels, between the button's top edge and the button's content.
The following example gives the button 20 pixels of padding on the top edge only:
button.paddingTop = 20;
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.
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.
selectedDisabledIcon: DisplayObject
Inherited from Button
The icon used for the button's disabled state when the button is
selected. If null, then defaultSelectedIcon
is used instead. If defaultSelectedIcon is also
null, then defaultIcon is used.
The following example gives the button an icon for the selected disabled state:
button.selectedDisabledIcon = new Image( texture );
See also:
#defaultIcon
#defaultSelectedIcon
selectedDisabledLabelProperties: Dictionary.<String, Object>
Inherited from Button
A set of key/value pairs to be passed down ot the button's label
text renderer when the button is in the disabled state and is
selected. If null, then defaultSelectedLabelProperties
is used instead. If defaultSelectedLabelProperties is also
null, then defaultLabelProperties is used.
The label text renderer is an ITextRenderer instance.
The available properties depend on which ITextRenderer
implementation is returned by labelFactory. The most
common implementations are BitmapFontTextRenderer and
TextFieldTextRenderer.
The following example gives the button label properties for the selected disabled state:
button.selectedDisabledLabelProperties.textFormat = new BitmapFontTextFormat( bitmapFont );
See also:
feathers.core.ITextRenderer
feathers.controls.text.BitmapFontTextRenderer
feathers.controls.text.TextFieldTextRenderer
#defaultLabelProperties
#defaultSelectedLabelProperties
#disabledLabelProperties
selectedDisabledSkin: DisplayObject
Inherited from Button
The skin used for the button's disabled state when the button is
selected. If null, then defaultSelectedSkin
is used instead. If defaultSelectedSkin is also
null, then defaultSkin is used.
The following example gives the button a skin for the selected disabled state:
button.selectedDisabledSkin = new Image( texture );
See also:
#defaultSkin
#defaultSelectedSkin
selectedDownIcon: DisplayObject
Inherited from Button
The icon used for the button's down state when the button is
selected. If null, then defaultSelectedIcon
is used instead. If defaultSelectedIcon is also
null, then defaultIcon is used.
The following example gives the button an icon for the selected down state:
button.selectedDownIcon = new Image( texture );
See also:
#defaultIcon
#defaultSelectedIcon
selectedDownLabelProperties: Dictionary.<String, Object>
Inherited from Button
A set of key/value pairs to be passed down ot the button's label
text renderer when the button is in the down state and is selected.
If null, then defaultSelectedLabelProperties
is used instead. If defaultSelectedLabelProperties is also
null, then defaultLabelProperties is used.
The label text renderer is an ITextRenderer instance.
The available properties depend on which ITextRenderer
implementation is returned by labelFactory. The most
common implementations are BitmapFontTextRenderer and
TextFieldTextRenderer.
The following example gives the button label properties for the selected down state:
button.selectedDownLabelProperties.textFormat = new BitmapFontTextFormat( bitmapFont );
See also:
feathers.core.ITextRenderer
feathers.controls.text.BitmapFontTextRenderer
feathers.controls.text.TextFieldTextRenderer
#defaultLabelProperties
#defaultSelectedLabelProperties
#downLabelProperties
selectedDownSkin: DisplayObject
Inherited from Button
The skin used for the button's down state when the button is
selected. If null, then defaultSelectedSkin
is used instead. If defaultSelectedSkin is also
null, then defaultSkin is used.
The following example gives the button a skin for the selected down state:
button.selectedDownSkin = new Image( texture );
See also:
#defaultSkin
#defaultSelectedSkin
selectedHoverIcon: DisplayObject
Inherited from Button
The icon used for the button's hover state when the button is
selected. If null, then defaultSelectedIcon
is used instead. If defaultSelectedIcon is also
null, then defaultIcon is used.
The following example gives the button an icon for the selected hover state:
button.selectedHoverIcon = new Image( texture );
See also:
#defaultIcon
#defaultSelectedIcon
selectedHoverLabelProperties: Dictionary.<String, Object>
Inherited from Button
A set of key/value pairs to be passed down ot the button's label
text renderer when the button is in the hover state and is selected.
If null, then defaultSelectedLabelProperties
is used instead. If defaultSelectedLabelProperties is also
null, then defaultLabelProperties is used.
The label text renderer is an ITextRenderer instance.
The available properties depend on which ITextRenderer
implementation is returned by labelFactory. The most
common implementations are BitmapFontTextRenderer and
TextFieldTextRenderer.
The following example gives the button label properties for the selected hover state:
button.selectedHoverLabelProperties.textFormat = new BitmapFontTextFormat( bitmapFont );
See also:
feathers.core.ITextRenderer
feathers.controls.text.BitmapFontTextRenderer
feathers.controls.text.TextFieldTextRenderer
#defaultLabelProperties
#defaultSelectedLabelProperties
#hoverLabelProperties
selectedHoverSkin: DisplayObject
Inherited from Button
The skin used for the button's hover state when the button is
selected. If null, then defaultSelectedSkin
is used instead. If defaultSelectedSkin is also
null, then defaultSkin is used.
The following example gives the button a skin for the selected hover state:
button.selectedHoverSkin = new Image( texture );
See also:
#defaultSkin
#defaultSelectedSkin
selectedUpIcon: DisplayObject
Inherited from Button
The icon used for the button's up state when the button is
selected. If null, then defaultSelectedIcon
is used instead. If defaultSelectedIcon is also
null, then defaultIcon is used.
The following example gives the button an icon for the selected up state:
button.selectedUpIcon = new Image( texture );
See also:
#defaultIcon
#defaultSelectedIcon
selectedUpLabelProperties: Dictionary.<String, Object>
Inherited from Button
A set of key/value pairs to be passed down ot the button's label
text renderer when the button is in the up state and is selected. If
null, then defaultSelectedLabelProperties
is used instead. If defaultSelectedLabelProperties is also
null, then defaultLabelProperties is used.
The label text renderer is an ITextRenderer instance.
The available properties depend on which ITextRenderer
implementation is returned by labelFactory. The most
common implementations are BitmapFontTextRenderer and
TextFieldTextRenderer.
The following example gives the button label properties for the selected up state:
button.selectedUpLabelProperties.textFormat = new BitmapFontTextFormat( bitmapFont );
See also:
feathers.core.ITextRenderer
feathers.controls.text.BitmapFontTextRenderer
feathers.controls.text.TextFieldTextRenderer
#defaultLabelProperties
#defaultSelectedLabelProperties
#upLabelProperties
selectedUpSkin: DisplayObject
Inherited from Button
The skin used for the button's up state when the button is selected.
If null, then defaultSelectedSkin is used
instead. If defaultSelectedSkin is also
null, then defaultSkin is used.
The following example gives the button a skin for the selected up state:
button.selectedUpSkin = new Image( texture );
See also:
#defaultSkin
#defaultSelectedSkin
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.
stateToIconFunction: Function
Inherited from Button
Returns an icon for the current state.
The following function signature is expected:
function(target:Button, state:Object, oldIcon:DisplayObject = null):DisplayObject.
stateToLabelPropertiesFunction: Function
Inherited from Button
Returns a text format for the current state.
The following function signature is expected:
function(target:Button, state:Object):Object.
stateToSkinFunction: Function
Inherited from Button
Returns a skin for the current state.
The following function signature is expected:
function(target:Button, state:Object, oldSkin:DisplayObject = null):DisplayObject.
stopAccessoryTouchEventPropagation: Boolean
Inherited from BaseDefaultItemRenderer
If enabled, calls event.stopPropagation() when TouchEvents are dispatched by the accessory.
touchable: Boolean
Inherited from DisplayObject
Indicates if this object (and its children) will receive touch events.
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.
upIcon: DisplayObject
Inherited from Button
The icon used for the button's up state. If null, then
defaultIcon is used instead.
The following example gives the button an icon for the up state:
button.upIcon = new Image( texture );
See also:
#defaultIcon
#selectedUpIcon
upLabelProperties: Dictionary.<String, Object>
Inherited from Button
A set of key/value pairs to be passed down ot the button's label
text renderer when the button is in the up state. If null,
then defaultLabelProperties is used instead. The label
text renderer is an ITextRenderer instance. The
available properties depend on which ITextRenderer
implementation is returned by labelFactory. The most
common implementations are BitmapFontTextRenderer and
TextFieldTextRenderer.
The following example gives the button label properties for the up state:
button.upLabelProperties.textFormat = new BitmapFontTextFormat( bitmapFont );
See also:
feathers.core.ITextRenderer
feathers.controls.text.BitmapFontTextRenderer
feathers.controls.text.TextFieldTextRenderer
#defaultLabelProperties
#selectedUpLabelProperties
upSkin: DisplayObject
Inherited from Button
The skin used for the button's up state. If null, then
defaultSkin is used instead.
The following example gives the button a skin for the up state:
button.upSkin = new Image( texture );
See also:
#defaultSkin
#selectedUpSkin
useStateDelayTimer: Boolean
Inherited from BaseDefaultItemRenderer
If true, the down state (and subsequent state changes) will be delayed to make scrolling look nicer.
verticalAlign: String
Inherited from Button
The location where the button's content is aligned vertically (on the y-axis).
The following example aligns the button's content to the top:
button.verticalAlign = Button.VERTICAL_ALIGN_TOP;
visible: Boolean
Inherited from DisplayObject
The visibility of the object, An invisible object will be untouchable.
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
ACCESSORY_POSITION_BOTTOM: String
static
The accessory will be positioned below its origin.
See also:
#accessoryPosition
ACCESSORY_POSITION_LEFT: String
static
The accessory will be positioned to the left of its origin.
See also:
#accessoryPosition
ACCESSORY_POSITION_MANUAL: String
static
The accessory will be positioned manually with no relation to another
child. Use accessoryOffsetX and accessoryOffsetY
to set the accessory position.
The accessoryPositionOrigin property will be ignored
if accessoryPosition is set to ACCESSORY_POSITION_MANUAL.
See also:
#accessoryPosition
#accessoryOffsetX
#accessoryOffsetY
ACCESSORY_POSITION_RIGHT: String
static
The accessory will be positioned to the right of its origin.
See also:
#accessoryPosition
ACCESSORY_POSITION_TOP: String
static
The accessory will be positioned above its origin.
See also:
#accessoryPosition
ALTERNATE_NAME_BACK_BUTTON: String
static
An alternate name to use with Button to allow a theme to give it a "back button" style, perhaps with an arrow pointing backward. If a theme does not provide a skin for the back button, the theme will automatically fall back to using the default button skin.
An alternate name should always be added to a component's
nameList before the component is added to the stage for
the first time.
In the following example, the back button style is applied to a button:
var button:Button = new Button();
button.nameList.add( Button.ALTERNATE_NAME_BACK_BUTTON );
this.addChild( button );
See also:
feathers.core.IFeathersControl#nameList
ALTERNATE_NAME_CALL_TO_ACTION_BUTTON: String
static
An alternate name to use with Button to allow a theme to give it a more prominent, "call-to-action" style. If a theme does not provide a skin for the call-to-action button, the theme will automatically fall back to using the default button skin.
An alternate name should always be added to a component's
nameList before the component is added to the stage for
the first time.
In the following example, the call-to-action style is applied to a button:
var button:Button = new Button();
button.nameList.add( Button.ALTERNATE_NAME_CALL_TO_ACTION_BUTTON );
this.addChild( button );
See also:
feathers.core.IFeathersControl#nameList
ALTERNATE_NAME_DANGER_BUTTON: String
static
An alternate name to use with Button to allow a theme to give it a highly prominent, "danger" style. An example would be a delete button or some other button that has a destructive action that cannot be undone if the button is triggered. If a theme does not provide a skin for the danger button, the theme will automatically fall back to using the default button skin.
An alternate name should always be added to a component's
nameList before the component is added to the stage for
the first time.
In the following example, the danger button style is applied to a button:
var button:Button = new Button();
button.nameList.add( Button.ALTERNATE_NAME_DANGER_BUTTON );
this.addChild( button );
See also:
feathers.core.IFeathersControl#nameList
ALTERNATE_NAME_FORWARD_BUTTON: String
static
An alternate name to use with Button to allow a theme to give it a "forward" button style, perhaps with an arrow pointing forward. If a theme does not provide a skin for the forward button, the theme will automatically fall back to using the default button skin.
An alternate name should always be added to a component's
nameList before the component is added to the stage for
the first time.
In the following example, the forward button style is applied to a button:
var button:Button = new Button();
button.nameList.add( Button.ALTERNATE_NAME_FORWARD_BUTTON );
this.addChild( button );
See also:
feathers.core.IFeathersControl#nameList
ALTERNATE_NAME_QUIET_BUTTON: String
static
An alternate name to use with Button to allow a theme to give it a less prominent, "quiet" style. If a theme does not provide a skin for the quiet button, the theme will automatically fall back to using the default button skin.
An alternate name should always be added to a component's
nameList before the component is added to the stage for
the first time.
In the following example, the quiet button style is applied to a button:
var button:Button = new Button();
button.nameList.add( Button.ALTERNATE_NAME_QUIET_BUTTON );
this.addChild( button );
See also:
feathers.core.IFeathersControl#nameList
DEFAULT_CHILD_NAME_ACCESSORY_LABEL: String
static
The default value added to the nameList of the accessory
label.
See also:
feathers.core.IFeathersControl#nameList
DEFAULT_CHILD_NAME_LABEL: String
static
The default value added to the nameList of the label.
See also:
feathers.core.IFeathersControl#nameList
HORIZONTAL_ALIGN_CENTER: String
static
The icon and label will be aligned horizontally to the center of the button.
See also:
#horizontalAlign
HORIZONTAL_ALIGN_LEFT: String
static
The icon and label will be aligned horizontally to the left edge of the button.
See also:
#horizontalAlign
HORIZONTAL_ALIGN_RIGHT: String
static
The icon and label will be aligned horizontally to the right edge of the button.
See also:
#horizontalAlign
ICON_POSITION_BOTTOM: String
static
The icon will be positioned below the label.
See also:
#iconPosition
ICON_POSITION_LEFT: String
static
The icon will be positioned to the left of the label.
See also:
#iconPosition
ICON_POSITION_LEFT_BASELINE: String
static
The icon will be positioned to the left the label, and the bottom of the icon will be aligned to the baseline of the label text.
See also:
#iconPosition
ICON_POSITION_MANUAL: String
static
The icon will be positioned manually with no relation to the position
of the label. Use iconOffsetX and iconOffsetY
to set the icon's position.
See also:
#iconPosition
#iconOffsetX
#iconOffsetY
ICON_POSITION_RIGHT: String
static
The icon will be positioned to the right of the label.
See also:
#iconPosition
ICON_POSITION_RIGHT_BASELINE: String
static
The icon will be positioned to the right the label, and the bottom of the icon will be aligned to the baseline of the label text.
See also:
#iconPosition
ICON_POSITION_TOP: String
static
The icon will be positioned above the label.
See also:
#iconPosition
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.
LAYOUT_ORDER_LABEL_ACCESSORY_ICON: String
static
The layout order will be the label first, then the accessory relative to the label, then the icon relative to both. Best used when the accessory should be between the label and the icon or when the icon position shouldn't be affected by the accessory.
See also:
#layoutOrder
LAYOUT_ORDER_LABEL_ICON_ACCESSORY: String
static
The layout order will be the label first, then the icon relative to label, then the accessory relative to both.
See also:
#layoutOrder
STATE_DISABLED: String
static
Identifier for the button's disabled state. Can be used for styling purposes.
See also:
#stateToSkinFunction
#stateToIconFunction
#stateToLabelPropertiesFunction
STATE_DOWN: String
static
Identifier for the button's down state. Can be used for styling purposes.
See also:
#stateToSkinFunction
#stateToIconFunction
#stateToLabelPropertiesFunction
STATE_HOVER: String
static
Identifier for the button's hover state. Can be used for styling purposes.
See also:
#stateToSkinFunction
#stateToIconFunction
#stateToLabelPropertiesFunction
STATE_UP: String
static
Identifier for the button's up state. Can be used for styling purposes.
See also:
#stateToSkinFunction
#stateToIconFunction
#stateToLabelPropertiesFunction
VERTICAL_ALIGN_BOTTOM: String
static
The icon and label will be aligned vertically to the bottom edge of the button.
See also:
#verticalAlign
VERTICAL_ALIGN_MIDDLE: String
static
The icon and label will be aligned vertically to the middle of the button.
See also:
#verticalAlign
VERTICAL_ALIGN_TOP: String
static
The icon and label will be aligned vertically to the top edge of the button.
Functions
FeathersControl__ls_staticconstructor
(): Void
Inherited from FeathersControl
static
Static constructor.
addChild
(
child: DisplayObject
,
fireEvents: Boolean
= true
): DisplayObject
Inherited from DisplayObjectContainer
Adds a child to the container. It will be at the frontmost position.
Parameters
| child: DisplayObject | |
| fireEvents: Boolean = true |
addChildAt
(
child: DisplayObject
,
index: Number
,
fireEvents: Boolean
= true
): DisplayObject
Inherited from DisplayObjectContainer
Adds a child to the container at a certain index.
Parameters
| child: DisplayObject | |
| index: Number | |
| fireEvents: Boolean = true |
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
Add a child to this LML node, identifying it by id.
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. This centers this object about its own origin based on its 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.
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 |
getChildAtUnsafe
(
index: Number
): DisplayObject
Inherited from DisplayObjectContainer
Returns a child object at a certain index without doing bounds checks. For optimized use in cases where you are 100% about the index validity.
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 = |
invalidateBitmapCache
(): Void
Inherited from DisplayObject
native
Update the cached texture before the next render.
This function has no effect if cacheAsBitmap is turned off.
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 |
itemToLabel
(
item: Object
): String
Inherited from BaseDefaultItemRenderer
Using labelField and labelFunction,
generates a label from the item.
All of the label fields and functions, ordered by priority:
labelFunctionlabelField
Parameters
| item: Object |
localToGlobal
(
localPoint: Point
): Point
Inherited from DisplayObject
Transforms a point from the local coordinate system to global (stage) coordinates.
Parameters
| localPoint: Point |
moveChildLast
(
child: DisplayObject
): Void
Inherited from DisplayObjectContainer
Moves a child to be the last object in the container.
Parameters
| child: DisplayObject |
preinitializeLMLNode
(
id: String
): Void
Inherited from DisplayObject
Pre-initialize the LML node.
Parameters
| id: String |
removeChild
(
child: DisplayObject
,
dispose: Boolean
= false
,
fireEvents: Boolean
= true
): 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 | |
| fireEvents: Boolean = true |
removeChildAt
(
index: Number
,
dispose: Boolean
= false
,
fireEvents: Boolean
= true
): 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 | |
| fireEvents: Boolean = true |
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
Remove (and destroy) all LML children from this node.
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 |
setChildrenUnsafe
(
ordered: Vector.<DisplayObject>
): Void
Inherited from DisplayObjectContainer
Parameters
| ordered: Vector.<DisplayObject> |
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 |