| Package | feathers.core |
| Class | public class FeathersControl |
| Inheritance | FeathersControl starling.display.Sprite |
| Implements | IFeathersControl, ILayoutDisplayObject |
| Subclasses | BaseScreenNavigator, BaseTextEditor, BaseTextRenderer, BasicButton, ButtonGroup, Callout, DateTimeSpinner, DefaultDataGridHeaderRenderer, DefaultGroupedListHeaderOrFooterRenderer, Drawers, Header, ImageLoader, Label, LayoutGroup, NumericStepper, PageIndicator, PickerList, ProgressBar, ScrollBar, Scroller, SimpleScrollBar, Slider, SoundChannelPeakVisualizer, SpectrumBarGraphVisualizer, TabBar, TextInput, Toast, ToggleSwitch, WebView |
| Product Version : | Feathers 1.0.0 |
initialize() and
draw().
This is a base class for Feathers components that isn't meant to be
instantiated directly. It should only be subclassed. For a simple
component that will automatically size itself based on its children,
and with optional support for layouts, see LayoutGroup.
See also
| Property | Defined By | ||
|---|---|---|---|
| addedEffect : Function
An optional effect that is activated when the component is added to
the stage. | FeathersControl | ||
| defaultTextEditorFactory : Function [static]
A function used by all UI controls that support text editor to
create an ITextEditor instance. | FeathersControl | ||
| defaultTextRendererFactory : Function [static]
A function used by all UI controls that support text renderers to
create an ITextRenderer instance. | FeathersControl | ||
| depth : int [read-only]
The component's depth in the display list, relative to the stage. | FeathersControl | ||
| effectsSuspended : Boolean [read-only]
Indicates if effects have been suspended. | FeathersControl | ||
| explicitHeight : Number [read-only]
The height value explicitly set by passing a value to the
height setter or by calling the setSize()
function. | FeathersControl | ||
| explicitMaxHeight : Number [read-only]
The maximum height value explicitly set by passing a value to the
maxHeight setter. | FeathersControl | ||
| explicitMaxWidth : Number [read-only]
The maximum width value explicitly set by passing a value to the
maxWidth setter. | FeathersControl | ||
| explicitMinHeight : Number [read-only]
The minimum height value explicitly set by passing a value to the
minHeight setter. | FeathersControl | ||
| explicitMinWidth : Number [read-only]
The minimum width value explicitly set by passing a value to the
minWidth setter. | FeathersControl | ||
| explicitWidth : Number [read-only]
The width value explicitly set by passing a value to the
width setter or to the setSize() method. | FeathersControl | ||
| focusInEffect : Function
An optional effect that is activated when the component receives
focus. | FeathersControl | ||
| focusManager : IFocusManager
The implementation of this property is provided for convenience,
but it cannot be used unless a subclass implements the
IFocusDisplayObject interface.
The current focus manager for this component. | FeathersControl | ||
| focusOutEffect : Function
An optional effect that is activated when the component loses focus. | FeathersControl | ||
| focusOwner : IFocusDisplayObject
The implementation of this property is provided for convenience,
but it cannot be used unless a subclass implements the
IFocusDisplayObject interface.
Used for associating focusable display objects that are not direct
children with an "owner" focusable display object, such as pop-ups. | FeathersControl | ||
| height : Number [override]
The height of the component, in pixels. | FeathersControl | ||
| hideEffect : Function
An optional effect that is activated when the component is hidden. | FeathersControl | ||
| includeInLayout : Boolean
Determines if the ILayout should use this object or ignore it. | FeathersControl | ||
| isCreated : Boolean [read-only]
Determines if the component has been initialized and validated for
the first time. | FeathersControl | ||
| isEnabled : Boolean
Indicates whether the control is interactive or not. | FeathersControl | ||
| isFocusEnabled : Boolean
The implementation of this property is provided for convenience,
but it cannot be used unless a subclass implements the
IFocusDisplayObject interface.
Determines if this component can receive focus. | FeathersControl | ||
| isInitialized : Boolean [read-only]
Determines if the component has been initialized yet. | FeathersControl | ||
| isQuickHitAreaEnabled : Boolean
Similar to mouseChildren on the classic display list. | FeathersControl | ||
| isShowingFocus : Boolean [read-only]
The implementation of this method is provided for convenience, but
it cannot be used unless a subclass implements the
IFocusDisplayObject interface.
Indicates if the showFocus() method has been called on
the object when it has focus. | FeathersControl | ||
| layoutData : ILayoutData
Extra parameters associated with this display object that will be
used by the layout algorithm. | FeathersControl | ||
| maintainTouchFocus : Boolean [read-only]
The implementation of this method is provided for convenience, but
it cannot be used unless a subclass implements the
IFocusDisplayObject interface.
If true, the display object should remain in focus,
even if something else is touched. | FeathersControl | ||
| maxHeight : Number
The maximum recommended height to be used for self-measurement and,
optionally, by any code that is resizing this component. | FeathersControl | ||
| maxWidth : Number
The maximum recommended width to be used for self-measurement and,
optionally, by any code that is resizing this component. | FeathersControl | ||
| minHeight : Number
The minimum recommended height to be used for self-measurement and,
optionally, by any code that is resizing this component. | FeathersControl | ||
| minTouchHeight : Number
If using isQuickHitAreaEnabled, and the hit area's
height is smaller than this value, it will be expanded. | FeathersControl | ||
| minTouchWidth : Number
If using isQuickHitAreaEnabled, and the hit area's
width is smaller than this value, it will be expanded. | FeathersControl | ||
| minWidth : Number
The minimum recommended width to be used for self-measurement and,
optionally, by any code that is resizing this component. | FeathersControl | ||
| moveEffect : Function
An optional effect that is activated when the component is moved to
a new position. | FeathersControl | ||
| nextDownFocus : IFocusDisplayObject
The implementation of this property is provided for convenience,
but it cannot be used unless a subclass implements the
IFocusDisplayObject interface.
The next object that will receive focus when
Keyboard.DOWN is pressed at
KeyLocation.D_PAD and a focus manager is enabled. | FeathersControl | ||
| nextLeftFocus : IFocusDisplayObject
The implementation of this property is provided for convenience,
but it cannot be used unless a subclass implements the
IFocusDisplayObject interface.
The next object that will receive focus when
Keyboard.LEFT is pressed at
KeyLocation.D_PAD and a focus manager is enabled. | FeathersControl | ||
| nextRightFocus : IFocusDisplayObject
The implementation of this property is provided for convenience,
but it cannot be used unless a subclass implements the
IFocusDisplayObject interface.
The next object that will receive focus when
Keyboard.RIGHT is pressed at
KeyLocation.D_PAD and a focus manager is enabled. | FeathersControl | ||
| nextTabFocus : IFocusDisplayObject
The implementation of this property is provided for convenience,
but it cannot be used unless a subclass implements the
IFocusDisplayObject interface.
The next object that will receive focus when the tab key is pressed
when a focus manager is enabled. | FeathersControl | ||
| nextUpFocus : IFocusDisplayObject
The implementation of this property is provided for convenience,
but it cannot be used unless a subclass implements the
IFocusDisplayObject interface.
The next object that will receive focus when
Keyboard.UP is pressed at
KeyLocation.D_PAD and a focus manager is enabled. | FeathersControl | ||
| previousTabFocus : IFocusDisplayObject
The implementation of this property is provided for convenience,
but it cannot be used unless a subclass implements the
IFocusDisplayObject interface.
The previous object that will receive focus when the tab key is
pressed while holding shift when a focus manager is enabled. | FeathersControl | ||
| resizeEffect : Function
An optional effect that is activated when the component is resized
with new dimensions. | FeathersControl | ||
| showEffect : Function
An optional effect that is activated when the component is shown. | FeathersControl | ||
| styleName : String
The concatenated styleNameList, with values separated
by spaces. | FeathersControl | ||
| styleNameList : TokenList [read-only]
Contains a list of all "styles" assigned to this control. | FeathersControl | ||
| styleProvider : IStyleProvider
When a component initializes, a style provider may be used to set
properties that affect the component's visual appearance. | FeathersControl | ||
| toolTip : String
Text to display in a tool tip to when hovering over this component,
if the ToolTipManager is enabled. | FeathersControl | ||
| width : Number [override]
The width of the component, in pixels. | FeathersControl | ||
| Property | Defined By | ||
|---|---|---|---|
| actualHeight : Number = 0
The final height value that should be used for layout. | FeathersControl | ||
| actualMinHeight : Number = 0
The final minimum height value that should be used for layout. | FeathersControl | ||
| actualMinWidth : Number = 0
The final minimum width value that should be used for layout. | FeathersControl | ||
| actualWidth : Number = 0
The final width value that should be used for layout. | FeathersControl | ||
| defaultStyleProvider : IStyleProvider [read-only]
When the FeathersControl constructor is called, the
styleProvider property is set to this value. | FeathersControl | ||
| Method | Defined By | ||
|---|---|---|---|
Constructor. | FeathersControl | ||
getBounds(targetSpace:DisplayObject, resultRect:Rectangle = null):Rectangle [override]
Feathers components use an optimized getBounds()
implementation that may sometimes behave differently than regular
Starling display objects. | FeathersControl | ||
hideFocus():void
The implementation of this method is provided for convenience, but
it cannot be used unless a subclass implements the
IFocusDisplayObject interface.
| FeathersControl | ||
initializeNow():void
If the component has not yet initialized, initializes immediately. | FeathersControl | ||
invalidate(flag:String):void
Call this function to tell the UI control that a redraw is pending. | FeathersControl | ||
isInvalid(flag:String = null):Boolean
Indicates whether the control is pending validation or not. | FeathersControl | ||
move(x:Number, y:Number):void
Sets both the x and the y positions of the control in a single
function call. | FeathersControl | ||
removeFromParentWithEffect(effect:Function, dispose:Boolean = false):void
Plays an effect before removing the component from its parent. | FeathersControl | ||
resetStyleProvider():void
Resets the styleProvider property to its default value,
which is usually the global style provider for the component. | FeathersControl | ||
resumeEffects():void
Indicates that effects should be re-activated after being suspended. | FeathersControl | ||
setSize(width:Number, height:Number):void
Sets both the width and the height of the control in a single
function call. | FeathersControl | ||
showFocus():void
The implementation of this method is provided for convenience, but
it cannot be used unless a subclass implements the
IFocusDisplayObject interface.
| FeathersControl | ||
suspendEffects():void
Indicates that effects should not be activated temporarily. | FeathersControl | ||
validate():void
Immediately validates the display object, if it is invalid. | FeathersControl | ||
| Method | Defined By | ||
|---|---|---|---|
clearInvalidationFlag(flag:String):void
Clears an invalidation flag. | FeathersControl | ||
draw():void
Override to customize layout and to adjust properties of children. | FeathersControl | ||
focusInHandler(event:Event):void
Default event handler for FeathersEventType.FOCUS_IN
that may be overridden in subclasses to perform additional actions
when the component receives focus. | FeathersControl | ||
focusOutHandler(event:Event):void
Default event handler for FeathersEventType.FOCUS_OUT
that may be overridden in subclasses to perform additional actions
when the component loses focus. | FeathersControl | ||
ignoreNextStyleRestriction():void
The next style that is set will not be restricted. | FeathersControl | ||
initialize():void
Called the first time that the UI control is added to the stage, and
you should override this function to customize the initialization
process. | FeathersControl | ||
processStyleRestriction(key:Object):Boolean
Used by setters for properties that are considered "styles" to
determine if the setter has been called directly on the component or
from a style provider. | FeathersControl | ||
refreshFocusIndicator():void
Updates the focus indicator skin by showing or hiding it and
adjusting its position and dimensions. | FeathersControl | ||
saveMeasurements(width:Number, height:Number, minWidth:Number = 0, minHeight:Number = 0):Boolean
Saves the dimensions and minimum dimensions calculated for the
component. | FeathersControl | ||
setInvalidationFlag(flag:String):void
Sets an invalidation flag. | FeathersControl | ||
setSizeInternal(width:Number, height:Number, canInvalidate:Boolean):Boolean
Sets the width and height of the control, with the option of
invalidating or not. | FeathersControl | ||
| Event | Summary | Defined By | ||
|---|---|---|---|---|
| Dispatched after the component has validated for the first time. | FeathersControl | |||
| Dispatched after initialize() has been called, but before the first time that draw() has been called. | FeathersControl | |||
| Dispatched when the width or height of the control changes. | FeathersControl | |||
| Style | Defined By | ||
|---|---|---|---|
focusIndicatorSkin : DisplayObject If this component supports focus, this optional skin will be displayed above the component when showFocus() is called. | FeathersControl | ||
focusPadding : Number Quickly sets all focus padding properties to the same value. | FeathersControl | ||
focusPaddingBottom : Number The minimum space, in pixels, between the object's bottom edge and the bottom edge of the focus indicator skin. | FeathersControl | ||
focusPaddingLeft : Number The minimum space, in pixels, between the object's left edge and the left edge of the focus indicator skin. | FeathersControl | ||
focusPaddingRight : Number The minimum space, in pixels, between the object's right edge and the right edge of the focus indicator skin. | FeathersControl | ||
focusPaddingTop : Number The minimum space, in pixels, between the object's top edge and the top edge of the focus indicator skin. | FeathersControl | ||
| Constant | Defined By | ||
|---|---|---|---|
| INVALIDATION_FLAG_ALL : String = "all" [static]
Flag to indicate that everything is invalid and should be redrawn. | FeathersControl | ||
| INVALIDATION_FLAG_DATA : String = "data" [static]
Invalidation flag to indicate that the primary data displayed by the
UI control has changed. | FeathersControl | ||
| INVALIDATION_FLAG_FOCUS : String = "focus" [static]
Invalidation flag to indicate that the focus of the UI control has
changed. | FeathersControl | ||
| INVALIDATION_FLAG_LAYOUT : String = "layout" [static]
Invalidation flag to indicate that the layout of the UI control has
changed. | FeathersControl | ||
| INVALIDATION_FLAG_SCROLL : String = "scroll" [static]
Invalidation flag to indicate that the scroll position of the UI
control has changed. | FeathersControl | ||
| INVALIDATION_FLAG_SELECTED : String = "selected" [static]
Invalidation flag to indicate that the selection of the UI control
has changed. | FeathersControl | ||
| INVALIDATION_FLAG_SIZE : String = "size" [static]
Invalidation flag to indicate that the dimensions of the UI control
have changed. | FeathersControl | ||
| INVALIDATION_FLAG_SKIN : String = "skin" [static]
Invalidation flag to indicate that the skin of the UI control has changed. | FeathersControl | ||
| INVALIDATION_FLAG_STATE : String = "state" [static]
Invalidation flag to indicate that the state has changed. | FeathersControl | ||
| INVALIDATION_FLAG_STYLES : String = "styles" [static]
Invalidation flag to indicate that the styles or visual appearance of
the UI control has changed. | FeathersControl | ||
| actualHeight | property |
protected var actualHeight:Number = 0The final height value that should be used for layout. If the height has been explicitly set, then that value is used. If not, the actual height will be calculated automatically. Each component has different automatic sizing behavior, but it's usually based on the component's skin or content, including text or subcomponents.
| actualMinHeight | property |
protected var actualMinHeight:Number = 0The final minimum height value that should be used for layout. If the minimum height has been explicitly set, then that value is used. If not, the actual minimum height will be calculated automatically. Each component has different automatic sizing behavior, but it's usually based on the component's skin or content, including text or subcomponents.
| actualMinWidth | property |
protected var actualMinWidth:Number = 0The final minimum width value that should be used for layout. If the minimum width has been explicitly set, then that value is used. If not, the actual minimum width will be calculated automatically. Each component has different automatic sizing behavior, but it's usually based on the component's skin or content, including text or subcomponents.
| actualWidth | property |
protected var actualWidth:Number = 0The final width value that should be used for layout. If the width has been explicitly set, then that value is used. If not, the actual width will be calculated automatically. Each component has different automatic sizing behavior, but it's usually based on the component's skin or content, including text or subcomponents.
| addedEffect | property |
addedEffect:FunctionAn optional effect that is activated when the component is added to the stage. Typically used to animate the component's appearance when it is first displayed.
In the following example, an added effect fades the component's
alpha property from 0 to 1:
control.addedEffect = Fade.createFadeBetweenEffect(0, 1);
A number of animated effects may be found in the feathers.motion package. However, you are not limited to only these effects. It's possible to create custom effects too.
A custom effect function should have the following signature:
function(target:DisplayObject):IEffectContext
The IEffectContext is used by the component to
control the effect, performing actions like playing the effect,
pausing it, or cancelling it.
Custom animated effects that use
starling.display.Tween typically return a
TweenEffectContext. In the following example, we
recreate the Fade.createFadeBetweenEffect() used in the
previous example.
control.addedEffect = function(target:DisplayObject):IEffectContext
{
target.alpha = 0;
var tween:Tween = new Tween(target, 0.5, Transitions.EASE_OUT);
tween.fadeTo(1);
return new TweenEffectContext(target, tween);
}; The default value is null.
public function get addedEffect():Function public function set addedEffect(value:Function):voidSee also
| defaultStyleProvider | property |
defaultStyleProvider:IStyleProvider [read-only]
When the FeathersControl constructor is called, the
styleProvider property is set to this value. May be
null.
Typically, a subclass of FeathersControl will
override this function to return its static globalStyleProvider
value. For instance, feathers.controls.Button overrides
this function, and its implementation looks like this:
override protected function get defaultStyleProvider():IStyleProvider
{
return Button.globalStyleProvider;
} protected function get defaultStyleProvider():IStyleProviderSee also
| defaultTextEditorFactory | property |
public static var defaultTextEditorFactory:Function
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
| defaultTextRendererFactory | property |
public static var defaultTextRendererFactory:FunctionA 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
| depth | property |
depth:int [read-only]
The component's depth in the display list, relative to the stage. If
the component isn't on the stage, its depth will be -1.
Used by the validation system to validate components from the top down.
public function get depth():int| effectsSuspended | property |
effectsSuspended:Boolean [read-only] Indicates if effects have been suspended.
public function get effectsSuspended():BooleanSee also
| explicitHeight | property |
explicitHeight:Number [read-only]
The height value explicitly set by passing a value to the
height setter or by calling the setSize()
function.
public function get explicitHeight():Number| explicitMaxHeight | property |
explicitMaxHeight:Number [read-only]
The maximum height value explicitly set by passing a value to the
maxHeight setter.
If no value has been passed to the maxHeight setter,
this property returns NaN.
public function get explicitMaxHeight():Number| explicitMaxWidth | property |
explicitMaxWidth:Number [read-only]
The maximum width value explicitly set by passing a value to the
maxWidth setter.
If no value has been passed to the maxWidth setter,
this property returns NaN.
public function get explicitMaxWidth():Number| explicitMinHeight | property |
explicitMinHeight:Number [read-only]
The minimum height value explicitly set by passing a value to the
minHeight setter.
If no value has been passed to the minHeight setter,
this property returns NaN.
public function get explicitMinHeight():Number| explicitMinWidth | property |
explicitMinWidth:Number [read-only]
The minimum width value explicitly set by passing a value to the
minWidth setter.
If no value has been passed to the minWidth setter,
this property returns NaN.
public function get explicitMinWidth():Number| explicitWidth | property |
explicitWidth:Number [read-only]
The width value explicitly set by passing a value to the
width setter or to the setSize() method.
public function get explicitWidth():Number| focusInEffect | property |
focusInEffect:FunctionAn optional effect that is activated when the component receives focus.
The implementation of this property is provided for convenience,
but it cannot be used unless a subclass implements the
IFocusDisplayObject interface.
A number of animated effects may be found in the feathers.motion package. However, you are not limited to only these effects. It's possible to create custom effects too.
A custom effect function should have the following signature:
function(target:DisplayObject):IEffectContext
The IEffectContext is used by the component to
control the effect, performing actions like playing the effect,
pausing it, or cancelling it.
Custom animated effects that use
starling.display.Tween typically return a
TweenEffectContext.
The default value is null.
public function get focusInEffect():Function public function set focusInEffect(value:Function):voidSee also
| focusManager | property |
focusManager:IFocusManager
The implementation of this property is provided for convenience,
but it cannot be used unless a subclass implements the
IFocusDisplayObject interface.
null if no focus manager is enabled.
The default value is null.
public function get focusManager():IFocusManager public function set focusManager(value:IFocusManager):voidSee also
| focusOutEffect | property |
focusOutEffect:FunctionAn optional effect that is activated when the component loses focus.
The implementation of this property is provided for convenience,
but it cannot be used unless a subclass implements the
IFocusDisplayObject interface.
The implementation of this property is provided for convenience,
but it cannot be used unless a subclass implements the
IFocusDisplayObject interface.
A number of animated effects may be found in the feathers.motion package. However, you are not limited to only these effects. It's possible to create custom effects too.
A custom effect function should have the following signature:
function(target:DisplayObject):IEffectContext
The IEffectContext is used by the component to
control the effect, performing actions like playing the effect,
pausing it, or cancelling it.
Custom animated effects that use
starling.display.Tween typically return a
TweenEffectContext.
The default value is null.
public function get focusOutEffect():Function public function set focusOutEffect(value:Function):voidSee also
| focusOwner | property |
focusOwner:IFocusDisplayObject
The implementation of this property is provided for convenience,
but it cannot be used unless a subclass implements the
IFocusDisplayObject interface.
In the following example, the focus owner is changed:
object.focusOwner = otherObject;
The default value is null.
public function get focusOwner():IFocusDisplayObject public function set focusOwner(value:IFocusDisplayObject):voidSee also
| height | property |
height:Number[override] The height of the component, in pixels. This could be a value that was set explicitly, or the component will automatically resize if no explicit height value is provided. Each component has a different automatic sizing behavior, but it's usually based on the component's skin or content, including text or subcomponents.
Note: Values of the width and
height properties may not be accurate until after
validation. If you are seeing width or height
values of 0, but you can see something on the screen and
know that the value should be larger, it may be because you asked for
the dimensions before the component had validated. Call
validate() to tell the component to immediately redraw
and calculate an accurate values for the dimensions.
In the following example, the height is set to 120 pixels:
control.height = 120;
In the following example, the height is cleared so that the component can automatically measure its own height:
control.height = NaN;
public function get height():Number public function set height(value:Number):voidSee also
| hideEffect | property |
hideEffect:Function
An optional effect that is activated when the component is hidden.
More specifically, this effect plays when the visible
property is set to false.
In the following example, a hide effect fades the component's
alpha property to 0:
control.hideEffect = Fade.createFadeOutEffect();
A number of animated effects may be found in the feathers.motion package. However, you are not limited to only these effects. It's possible to create custom effects too.
A custom effect function should have the following signature:
function(target:DisplayObject):IEffectContext
The IEffectContext is used by the component to
control the effect, performing actions like playing the effect,
pausing it, or cancelling it.
Custom animated effects that use
starling.display.Tween typically return a
TweenEffectContext. In the following example, we
recreate the Fade.createFadeOutEffect() used in the
previous example.
control.hideEffect = function(target:DisplayObject):IEffectContext
{
var tween:Tween = new Tween(target, 0.5, Transitions.EASE_OUT);
tween.fadeTo(0);
return new TweenEffectContext(target, tween);
}; The default value is null.
public function get hideEffect():Function public function set hideEffect(value:Function):voidSee also
| includeInLayout | property |
includeInLayout:BooleanDetermines if the ILayout should use this object or ignore it.
In the following example, the display object is excluded from the layout:
object.includeInLayout = false;
The default value is true.
public function get includeInLayout():Boolean public function set includeInLayout(value:Boolean):void| isCreated | property |
isCreated:Boolean [read-only] Determines if the component has been initialized and validated for the first time.
In the following example, we check if the component is created or not, and we listen for an event if it isn't:
if( !control.isCreated )
{
control.addEventListener( FeathersEventType.CREATION_COMPLETE, creationCompleteHandler );
} public function get isCreated():BooleanSee also
| isEnabled | property |
isEnabled:BooleanIndicates whether the control is interactive or not.
In the following example, the control is disabled:
control.isEnabled = false;
The default value is true.
public function get isEnabled():Boolean public function set isEnabled(value:Boolean):void| isFocusEnabled | property |
isFocusEnabled:Boolean
The implementation of this property is provided for convenience,
but it cannot be used unless a subclass implements the
IFocusDisplayObject interface.
In the following example, the focus is disabled:
object.isFocusEnabled = false;
The default value is true.
public function get isFocusEnabled():Boolean public function set isFocusEnabled(value:Boolean):voidSee also
| isInitialized | property |
isInitialized:Boolean [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.
In the following example, we check if the component is initialized or not, and we listen for an event if it isn't:
if( !control.isInitialized )
{
control.addEventListener( FeathersEventType.INITIALIZE, initializeHandler );
} public function get isInitialized():BooleanSee also
| isQuickHitAreaEnabled | property |
isQuickHitAreaEnabled:Boolean
Similar to mouseChildren on the classic display list. If
true, children cannot dispatch touch events, but hit
tests will be much faster. Easier than overriding
hitTest().
In the following example, the quick hit area is enabled:
control.isQuickHitAreaEnabled = true;
The default value is false.
public function get isQuickHitAreaEnabled():Boolean public function set isQuickHitAreaEnabled(value:Boolean):void| isShowingFocus | property |
isShowingFocus:Boolean [read-only]
The implementation of this method is provided for convenience, but
it cannot be used unless a subclass implements the
IFocusDisplayObject interface.
showFocus() method has been called on
the object when it has focus.
if(object.isShowingFocus)
{
} public function get isShowingFocus():BooleanSee also
| layoutData | property |
layoutData:ILayoutDataExtra parameters associated with this display object that will be used by the layout algorithm.
The default value is null.
public function get layoutData():ILayoutData public function set layoutData(value:ILayoutData):void| maintainTouchFocus | property |
maintainTouchFocus:Boolean [read-only]
The implementation of this method is provided for convenience, but
it cannot be used unless a subclass implements the
IFocusDisplayObject interface.
true, the display object should remain in focus,
even if something else is touched. If false, touching
another object will pass focus normally.
public function get maintainTouchFocus():BooleanSee also
| maxHeight | property |
maxHeight:Number
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.
In the following example, the maximum width of the control is set to 120 pixels:
control.maxWidth = 120;
The default value is Number.POSITIVE_INFINITY.
public function get maxHeight():Number public function set maxHeight(value:Number):void| maxWidth | property |
maxWidth:Number
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.
In the following example, the maximum width of the control is set to 120 pixels:
control.maxWidth = 120;
The default value is Number.POSITIVE_INFINITY.
public function get maxWidth():Number public function set maxWidth(value:Number):void| minHeight | property |
minHeight:Number
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.
In the following example, the minimum height of the control is set to 120 pixels:
control.minHeight = 120;
The default value is 0.
public function get minHeight():Number public function set minHeight(value:Number):void| minTouchHeight | property |
minTouchHeight:Number
If using isQuickHitAreaEnabled, and the hit area's
height is smaller than this value, it will be expanded.
In the following example, the minimum height of the hit area is set to 120 pixels:
control.minTouchHeight = 120;
The default value is 0.
public function get minTouchHeight():Number public function set minTouchHeight(value:Number):void| minTouchWidth | property |
minTouchWidth:Number
If using isQuickHitAreaEnabled, and the hit area's
width is smaller than this value, it will be expanded.
In the following example, the minimum width of the hit area is set to 120 pixels:
control.minTouchWidth = 120;
The default value is 0.
public function get minTouchWidth():Number public function set minTouchWidth(value:Number):void| minWidth | property |
minWidth:Number
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.
In the following example, the minimum width of the control is set to 120 pixels:
control.minWidth = 120;
The default value is 0.
public function get minWidth():Number public function set minWidth(value:Number):void| moveEffect | property |
moveEffect:Function
An optional effect that is activated when the component is moved to
a new position. More specifically, this effect plays when the
x or y property changes.
In the following example, a move effect will animate the new position of the component when it moves:
control.moveEffect = Move.createMoveEffect();
A custom effect function should have the following signature:
function(target:DisplayObject):IMoveEffectContext
The IMoveEffectContext is used by the component to
control the effect, performing actions like playing the effect,
pausing it, or cancelling it. Custom animated move effects that use
starling.display.Tween typically return a
TweenMoveEffectContext.
The default value is null.
public function get moveEffect():Function public function set moveEffect(value:Function):voidSee also
| nextDownFocus | property |
nextDownFocus:IFocusDisplayObject| Product Version : | Feathers 3.4.0 |
The implementation of this property is provided for convenience,
but it cannot be used unless a subclass implements the
IFocusDisplayObject interface.
Keyboard.DOWN is pressed at
KeyLocation.D_PAD and a focus manager is enabled. If
null, defaults to the best available child, as
determined by the focus manager.
In the following example, the next down focus is changed:
object.nextDownFocus = otherObject;
To simulate KeyLocation.D_PAD in the AIR Debug
Launcher on desktop for debugging purposes, set
DeviceCapabilities.simulateDPad to true.
The default value is null.
public function get nextDownFocus():IFocusDisplayObject public function set nextDownFocus(value:IFocusDisplayObject):voidSee also
| nextLeftFocus | property |
nextLeftFocus:IFocusDisplayObject| Product Version : | Feathers 3.4.0 |
The implementation of this property is provided for convenience,
but it cannot be used unless a subclass implements the
IFocusDisplayObject interface.
Keyboard.LEFT is pressed at
KeyLocation.D_PAD and a focus manager is enabled. If
null, defaults to the best available child, as
determined by the focus manager.
In the following example, the next left focus is changed:
object.nextLeftFocus = otherObject;
To simulate KeyLocation.D_PAD in the AIR Debug
Launcher on desktop for debugging purposes, set
DeviceCapabilities.simulateDPad to true.
The default value is null.
public function get nextLeftFocus():IFocusDisplayObject public function set nextLeftFocus(value:IFocusDisplayObject):voidSee also
| nextRightFocus | property |
nextRightFocus:IFocusDisplayObject| Product Version : | Feathers 3.4.0 |
The implementation of this property is provided for convenience,
but it cannot be used unless a subclass implements the
IFocusDisplayObject interface.
Keyboard.RIGHT is pressed at
KeyLocation.D_PAD and a focus manager is enabled. If
null, defaults to the best available child, as
determined by the focus manager.
In the following example, the next right focus is changed:
object.nextRightFocus = otherObject;
To simulate KeyLocation.D_PAD in the AIR Debug
Launcher on desktop for debugging purposes, set
DeviceCapabilities.simulateDPad to true.
The default value is null.
public function get nextRightFocus():IFocusDisplayObject public function set nextRightFocus(value:IFocusDisplayObject):voidSee also
| nextTabFocus | property |
nextTabFocus:IFocusDisplayObject
The implementation of this property is provided for convenience,
but it cannot be used unless a subclass implements the
IFocusDisplayObject interface.
null, defaults to
the next child on the display list.
In the following example, the next tab focus is changed:
object.nextTabFocus = otherObject;
The default value is null.
public function get nextTabFocus():IFocusDisplayObject public function set nextTabFocus(value:IFocusDisplayObject):voidSee also
| nextUpFocus | property |
nextUpFocus:IFocusDisplayObject| Product Version : | Feathers 3.4.0 |
The implementation of this property is provided for convenience,
but it cannot be used unless a subclass implements the
IFocusDisplayObject interface.
Keyboard.UP is pressed at
KeyLocation.D_PAD and a focus manager is enabled. If
null, defaults to the best available child, as
determined by the focus manager.
In the following example, the next up focus is changed:
object.nextUpFocus = otherObject;
To simulate KeyLocation.D_PAD in the AIR Debug
Launcher on desktop for debugging purposes, set
DeviceCapabilities.simulateDPad to true.
The default value is null.
public function get nextUpFocus():IFocusDisplayObject public function set nextUpFocus(value:IFocusDisplayObject):voidSee also
| previousTabFocus | property |
previousTabFocus:IFocusDisplayObject
The implementation of this property is provided for convenience,
but it cannot be used unless a subclass implements the
IFocusDisplayObject interface.
null, defaults to the previous child on the display
list.
In the following example, the previous tab focus is changed:
object.previousTabFocus = otherObject;
The default value is null.
public function get previousTabFocus():IFocusDisplayObject public function set previousTabFocus(value:IFocusDisplayObject):voidSee also
| resizeEffect | property |
resizeEffect:Function
An optional effect that is activated when the component is resized
with new dimensions. More specifically, this effect plays when the
width or height property changes.
In the following example, a resize effect will animate the new dimensions of the component when it resizes:
control.resizeEffect = Resize.createResizeEffect();
A custom effect function should have the following signature:
function(target:DisplayObject):IResizeEffectContext
The IResizeEffectContext is used by the component to
control the effect, performing actions like playing the effect,
pausing it, or cancelling it. Custom animated resize effects that use
starling.display.Tween typically return a
TweenResizeEffectContext.
public function get resizeEffect():Function public function set resizeEffect(value:Function):voidSee also
| showEffect | property |
showEffect:Function
An optional effect that is activated when the component is shown.
More specifically, this effect plays when the visible
property is set to true.
In the following example, a show effect fades the component's
alpha property from 0 to 1:
control.showEffect = Fade.createFadeBetweenEffect(0, 1);
A number of animated effects may be found in the feathers.motion package. However, you are not limited to only these effects. It's possible to create custom effects too.
A custom effect function should have the following signature:
function(target:DisplayObject):IEffectContext
The IEffectContext is used by the component to
control the effect, performing actions like playing the effect,
pausing it, or cancelling it.
Custom animated effects that use
starling.display.Tween typically return a
TweenEffectContext. In the following example, we
recreate the Fade.createFadeBetweenEffect() used in the
previous example.
control.showEffect = function(target:DisplayObject):IEffectContext
{
target.alpha = 0;
var tween:Tween = new Tween(target, 0.5, Transitions.EASE_OUT);
tween.fadeTo(1);
return new TweenEffectContext(target, tween);
}; The default value is null.
public function get showEffect():Function public function set showEffect(value:Function):voidSee also
| styleName | property |
styleName:String
The concatenated styleNameList, with values separated
by spaces. Style names are somewhat similar to classes in CSS
selectors. In Feathers, they are a non-unique identifier that can
differentiate multiple styles of the same type of UI control. A
single control may have many style names, and many controls can share
a single style name. A theme
or another skinning mechanism may use style names to provide a
variety of visual appearances for a single component class.
In general, the styleName property should not be set
directly on a Feathers component. You should add and remove style
names from the styleNameList property instead.
The default value is "".
public function get styleName():String public function set styleName(value:String):voidSee also
| styleNameList | property |
styleNameList:TokenList [read-only] Contains a list of all "styles" 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. A theme or another skinning mechanism may use style names to provide a variety of visual appearances for a single component class.
Names may be added, removed, or toggled on the
styleNameList. Names cannot contain spaces.
In the following example, a name is added to the name list:
control.styleNameList.add( "custom-component-name" );
public function get styleNameList():TokenListSee also
| styleProvider | property |
styleProvider:IStyleProviderWhen a component initializes, a style provider may be used to set properties that affect the component's visual appearance.
You can set or replace an existing style provider at any time before a component initializes without immediately affecting the component's visual appearance. After the component initializes, the style provider may still be changed, but any properties that were set by the previous style provider will not be reset to their default values.
public function get styleProvider():IStyleProvider public function set styleProvider(value:IStyleProvider):voidSee also
| toolTip | property |
toolTip:String
Text to display in a tool tip to when hovering over this component,
if the ToolTipManager is enabled.
The default value is null.
public function get toolTip():String public function set toolTip(value:String):voidSee also
| width | property |
width:Number[override] The width of the component, in pixels. This could be a value that was set explicitly, or the component will automatically resize if no explicit width value is provided. Each component has a different automatic sizing behavior, but it's usually based on the component's skin or content, including text or subcomponents.
Note: Values of the width and
height properties may not be accurate until after
validation. If you are seeing width or height
values of 0, but you can see something on the screen and
know that the value should be larger, it may be because you asked for
the dimensions before the component had validated. Call
validate() to tell the component to immediately redraw
and calculate an accurate values for the dimensions.
In the following example, the width is set to 120 pixels:
control.width = 120;
In the following example, the width is cleared so that the component can automatically measure its own width:
control.width = NaN;
public function get width():Number public function set width(value:Number):voidSee also
| FeathersControl | () | Constructor |
public function FeathersControl()Constructor.
| clearInvalidationFlag | () | method |
protected function clearInvalidationFlag(flag:String):void
Clears an invalidation flag. This will not remove the component from
the validation queue. It only clears the flag. A subclass might use
this function during draw() to manipulate the flags that
its superclass sees.
Parameters
flag:String |
| draw | () | method |
protected function draw():voidOverride to customize layout and to adjust properties of children. Called when the component validates, if any flags have been marked to indicate that validation is pending.
| focusInHandler | () | method |
protected function focusInHandler(event:Event):void
Default event handler for FeathersEventType.FOCUS_IN
that may be overridden in subclasses to perform additional actions
when the component receives focus.
Parameters
event:Event |
| focusOutHandler | () | method |
protected function focusOutHandler(event:Event):void
Default event handler for FeathersEventType.FOCUS_OUT
that may be overridden in subclasses to perform additional actions
when the component loses focus.
Parameters
event:Event |
| getBounds | () | method |
override public function getBounds(targetSpace:DisplayObject, resultRect:Rectangle = null):Rectangle
Feathers components use an optimized getBounds()
implementation that may sometimes behave differently than regular
Starling display objects. For instance, filters may need some special
customization. If a component's children appear outside of its
bounds (such as at negative dimensions), padding should be added to
the filter to account for these regions.
Parameters
targetSpace:DisplayObject | |
resultRect:Rectangle (default = null) |
Rectangle |
| hideFocus | () | method |
public function hideFocus():void
The implementation of this method is provided for convenience, but
it cannot be used unless a subclass implements the
IFocusDisplayObject interface.
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
| ignoreNextStyleRestriction | () | method |
protected function ignoreNextStyleRestriction():voidThe next style that is set will not be restricted. This allows components to set defaults by calling the setter while still allowing the style property to be replaced by a theme in the future.
See also
| initialize | () | method |
protected function initialize():void
Called the first time that the UI control is added to the stage, and
you should override this function to customize the initialization
process. Do things like create children and set up event listeners.
After this function is called, FeathersEventType.INITIALIZE
is dispatched.
See also
| initializeNow | () | method |
public function initializeNow():void
If the component has not yet initialized, initializes immediately.
The initialize() function will be called, and the
FeathersEventType.INITIALIZE event will be dispatched.
Then, if the component has a style provider, it will be applied. The
component will not validate, though. To initialize and validate
immediately, call validate() instead.
See also
| invalidate | () | method |
public function invalidate(flag:String):voidCall 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.
Parameters
flag:String (default = NaN) |
See also
| isInvalid | () | method |
public function isInvalid(flag:String = null):Boolean
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 (default = null) |
Boolean |
| move | () | method |
public function move(x:Number, y:Number):voidSets both the x and the y positions of the control in a single function call.
Parameters
x:Number | |
y:Number |
See also
| processStyleRestriction | () | method |
protected function processStyleRestriction(key:Object):BooleanUsed by setters for properties that are considered "styles" to determine if the setter has been called directly on the component or from a style provider. A style provider is typically associated with a theme. When a style is set directly on the component (outside of a style provider), then any attempts by the style provider to set the style later will be ignored. This allows developers to customize a component's styles directly without worrying about conflicts from the style provider or theme.
If a style provider is currently applying styles to the component,
returns true if the style is restricted or false if it
may be set.
If the style setter is called outside of a style provider, marks
the style as restricted and returns false.
The key parameter should be a unique value for each
separate style. In most cases, processStyleRestriction()
will be called in the style property setter, so
arguments.callee is recommended. Alternatively, a unique
string value may be used instead.
The following example shows how to use
processStyleRestriction() in a style property
setter:
private var _customStyle:Object;
public function get customStyle():Object
{
return this._customStyle;
}
public function set customStyle( value:Object ):void
{
if( this.processStyleRestriction( arguments.callee ) )
{
// if a style is restricted, don't set it
return;
}
this._customStyle = value;
}Parameters
key:Object |
Boolean |
See also
| refreshFocusIndicator | () | method |
protected function refreshFocusIndicator():void
Updates the focus indicator skin by showing or hiding it and
adjusting its position and dimensions. This function is not called
automatically. Components that support focus should call this
function at an appropriate point within the draw()
function. This function may be overridden if the default behavior is
not desired.
| removeFromParentWithEffect | () | method |
public function removeFromParentWithEffect(effect:Function, dispose:Boolean = false):voidPlays an effect before removing the component from its parent.
In the following example, an effect fades the component's
alpha property to 0 before removing the
component from its parent:
control.removeFromParentWithEffect(Fade.createFadeOutEffect(), true);
A number of animated effects may be found in the feathers.motion package. However, you are not limited to only these effects. It's possible to create custom effects too.
A custom effect function should have the following signature:
function(target:DisplayObject):IEffectContext
The IEffectContext is used by the component to
control the effect, performing actions like playing the effect,
pausing it, or cancelling it.
Custom animated effects that use
starling.display.Tween typically return a
TweenEffectContext. In the following example, we
recreate the Fade.createFadeOutEffect() used in the
previous example.
function customEffect(target:DisplayObject):IEffectContext
{
var tween:Tween = new Tween(target, 0.5, Transitions.EASE_OUT);
tween.fadeTo(0);
return new TweenEffectContext(target, tween);
}
control.removeFromParentWithEffect(customEffect, true);Parameters
effect:Function | |
dispose:Boolean (default = false) |
See also
| resetStyleProvider | () | method |
public function resetStyleProvider():void
Resets the styleProvider property to its default value,
which is usually the global style provider for the component.
See also
| resumeEffects | () | method |
public function resumeEffects():voidIndicates that effects should be re-activated after being suspended.
See also
| saveMeasurements | () | method |
protected function saveMeasurements(width:Number, height:Number, minWidth:Number = 0, minHeight:Number = 0):Boolean
Saves the dimensions and minimum dimensions calculated for the
component. Returns true if the reported values have changed and
Event.RESIZE was dispatched.
Parameters
width:Number | |
height:Number | |
minWidth:Number (default = 0) | |
minHeight:Number (default = 0) |
Boolean |
| setInvalidationFlag | () | method |
protected function setInvalidationFlag(flag:String):void
Sets an invalidation flag. This will not add the component to the
validation queue. It only sets the flag. A subclass might use
this function during draw() to manipulate the flags that
its superclass sees.
Parameters
flag:String |
| setSize | () | method |
public function setSize(width:Number, height:Number):voidSets both the width and the height of the control in a single function call.
Parameters
width:Number | |
height:Number |
See also
| setSizeInternal | () | method |
protected function setSizeInternal(width:Number, height:Number, canInvalidate:Boolean):Boolean
Sets the width and height of the control, with the option of
invalidating or not. Intended to be used when the width
and height values have not been set explicitly, and the
UI control needs to measure itself and choose an "ideal" size.
Parameters
width:Number | |
height:Number | |
canInvalidate:Boolean |
Boolean |
| showFocus | () | method |
public function showFocus():void
The implementation of this method is provided for convenience, but
it cannot be used unless a subclass implements the
IFocusDisplayObject interface.
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
| suspendEffects | () | method |
public function suspendEffects():void
Indicates that effects should not be activated temporarily. Call
resumeEffects() when effects should be allowed again.
See also
| validate | () | method |
public function validate():voidImmediately validates the display object, if it is invalid. The validation system exists to postpone updating a display object after properties are changed until until the last possible moment the display object is rendered. This allows multiple properties to be changed at a time without requiring a full update every time.
See also
| creationComplete | Event |
starling.events.Eventfeathers.events.FeathersEventType.CREATION_COMPLETE
Dispatched after the component has validated for the first time. Both
initialize() and draw() will have been called,
and all children will have been created.
The properties of the event object have the following values:
| Property | Value |
|---|---|
bubbles | false |
currentTarget | The Object that defines the
event listener that handles the event. For example, if you use
myButton.addEventListener() to register an event listener,
myButton is the value of the currentTarget. |
data | null |
target | The Object that dispatched the event;
it is not always the Object listening for the event. Use the
currentTarget property to always access the Object
listening for the event. |
FeathersEventType.CREATION_COMPLETE event type is
meant to be used when an IFeathersControl has finished
validating for the first time. A well-designed component will have
created all of its children and it will be fully ready for user
interaction.
| initialize | Event |
starling.events.Eventfeathers.events.FeathersEventType.INITIALIZE
Dispatched after initialize() has been called, but before
the first time that draw() has been called.
The properties of the event object have the following values:
| Property | Value |
|---|---|
bubbles | false |
currentTarget | The Object that defines the
event listener that handles the event. For example, if you use
myButton.addEventListener() to register an event listener,
myButton is the value of the currentTarget. |
data | null |
target | The Object that dispatched the event;
it is not always the Object listening for the event. Use the
currentTarget property to always access the Object
listening for the event. |
FeathersEventType.INITIALIZE event type is meant to
be used when an IFeathersControl has finished running
its initialize() function.
| resize | Event |
starling.events.Eventstarling.events.Event.RESIZEDispatched when the width or height of the control changes.
The properties of the event object have the following values:
| Property | Value |
|---|---|
bubbles | false |
currentTarget | The Object that defines the
event listener that handles the event. For example, if you use
myButton.addEventListener() to register an event listener,
myButton is the value of the currentTarget. |
data | null |
target | The Object that dispatched the event;
it is not always the Object listening for the event. Use the
currentTarget property to always access the Object
listening for the event. |
| focusPaddingLeft | style |
focusPaddingLeft:NumberThe 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 implementation of this property is provided for convenience,
but it cannot be used unless a subclass implements the
IFocusDisplayObject interface.
The following example gives the focus indicator skin -2 pixels of padding on the right edge only:
control.focusPaddingLeft = -2;
The default value is 0.
See also
| focusPaddingBottom | style |
focusPaddingBottom:NumberThe 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 implementation of this property is provided for convenience,
but it cannot be used unless a subclass implements the
IFocusDisplayObject interface.
The following example gives the focus indicator skin -2 pixels of padding on the bottom edge only:
control.focusPaddingBottom = -2;
The default value is 0.
See also
| focusPaddingRight | style |
focusPaddingRight:NumberThe 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 implementation of this property is provided for convenience,
but it cannot be used unless a subclass implements the
IFocusDisplayObject interface.
The following example gives the focus indicator skin -2 pixels of padding on the right edge only:
control.focusPaddingRight = -2;
The default value is 0.
See also
| focusPaddingTop | style |
focusPaddingTop:NumberThe 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 implementation of this property is provided for convenience,
but it cannot be used unless a subclass implements the
IFocusDisplayObject interface.
The following example gives the focus indicator skin -2 pixels of padding on the top edge only:
control.focusPaddingTop = -2;
The default value is 0.
See also
| focusPadding | style |
focusPadding:Number
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 implementation of this property is provided for convenience,
but it cannot be used unless a subclass implements the
IFocusDisplayObject interface.
The following example gives the button 2 pixels of focus padding on all sides:
control.focusPadding = 2;
The default value is 0.
See also
| focusIndicatorSkin | style |
focusIndicatorSkin:DisplayObject
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.
The implementation of this property is provided for convenience,
but it cannot be used unless a subclass implements the
IFocusDisplayObject interface.
In the following example, the focus indicator skin is set:
control.focusIndicatorSkin = new Image( texture );
The default value is null.
See also
| INVALIDATION_FLAG_ALL | Constant |
public static const INVALIDATION_FLAG_ALL:String = "all"Flag to indicate that everything is invalid and should be redrawn.
| INVALIDATION_FLAG_DATA | Constant |
public static const INVALIDATION_FLAG_DATA:String = "data"Invalidation flag to indicate that the primary data displayed by the UI control has changed.
| INVALIDATION_FLAG_FOCUS | Constant |
public static const INVALIDATION_FLAG_FOCUS:String = "focus"Invalidation flag to indicate that the focus of the UI control has changed.
| INVALIDATION_FLAG_LAYOUT | Constant |
public static const INVALIDATION_FLAG_LAYOUT:String = "layout"Invalidation flag to indicate that the layout of the UI control has changed.
| INVALIDATION_FLAG_SCROLL | Constant |
public static const INVALIDATION_FLAG_SCROLL:String = "scroll"Invalidation flag to indicate that the scroll position of the UI control has changed.
| INVALIDATION_FLAG_SELECTED | Constant |
public static const INVALIDATION_FLAG_SELECTED:String = "selected"Invalidation flag to indicate that the selection of the UI control has changed.
| INVALIDATION_FLAG_SIZE | Constant |
public static const INVALIDATION_FLAG_SIZE:String = "size"Invalidation flag to indicate that the dimensions of the UI control have changed.
| INVALIDATION_FLAG_SKIN | Constant |
public static const INVALIDATION_FLAG_SKIN:String = "skin"Invalidation flag to indicate that the skin of the UI control has changed.
| INVALIDATION_FLAG_STATE | Constant |
public static const INVALIDATION_FLAG_STATE:String = "state"
Invalidation flag to indicate that the state has changed. Used by
isEnabled, but may be used for other control states too.
See also
| INVALIDATION_FLAG_STYLES | Constant |
public static const INVALIDATION_FLAG_STYLES:String = "styles"Invalidation flag to indicate that the styles or visual appearance of the UI control has changed.