Package | feathers.core |
Interface | public interface IFeathersControl extends IValidating, IMeasureDisplayObject, IFeathersDisplayObject, IFeathersDisplayObject, IFeathersEventDispatcher |
Implementors | FeathersControl |
Product Version : | Feathers 1.0.0 |
Property | Defined By | ||
---|---|---|---|
alpha : Number
The opacity of the display object. | IFeathersDisplayObject | ||
base : DisplayObject [read-only]
The top-most object of the display tree that the display object is
connected to. | IFeathersDisplayObject | ||
blendMode : String
The blend mode used when rendering the display object. | IFeathersDisplayObject | ||
bounds : Rectangle [read-only]
The bounds of the display object in its local coordinate space. | IFeathersDisplayObject | ||
depth : int [read-only]
The component's depth in the display list, relative to the stage. | IValidating | ||
effectsSuspended : Boolean [read-only]
Indicates if effects have been suspended. | IFeathersControl | ||
explicitHeight : Number [read-only]
The height value explicitly set by passing a value to the
height setter or by calling the setSize()
function. | IMeasureDisplayObject | ||
explicitMaxHeight : Number [read-only]
The maximum height value explicitly set by passing a value to the
maxHeight setter. | IMeasureDisplayObject | ||
explicitMaxWidth : Number [read-only]
The maximum width value explicitly set by passing a value to the
maxWidth setter. | IMeasureDisplayObject | ||
explicitMinHeight : Number [read-only]
The minimum height value explicitly set by passing a value to the
minHeight setter. | IMeasureDisplayObject | ||
explicitMinWidth : Number [read-only]
The minimum width value explicitly set by passing a value to the
minWidth setter. | IMeasureDisplayObject | ||
explicitWidth : Number [read-only]
The width value explicitly set by passing a value to the
width setter or to the setSize() method. | IMeasureDisplayObject | ||
filter : FragmentFilter
The filter used when rendering the display object. | IFeathersDisplayObject | ||
height : Number
The height of the display object in the parent's coordinate space. | IFeathersDisplayObject | ||
isCreated : Boolean [read-only]
Determines if the component has been initialized and validated for
the first time. | IFeathersControl | ||
isEnabled : Boolean
Indicates whether the control is interactive or not. | IFeathersControl | ||
isInitialized : Boolean [read-only]
Determines if the component has been initialized yet. | IFeathersControl | ||
mask : DisplayObject
The display object's mask. | IFeathersDisplayObject | ||
maxHeight : Number
The maximum recommended height to be used for self-measurement and,
optionally, by any code that is resizing this component. | IMeasureDisplayObject | ||
maxWidth : Number
The maximum recommended width to be used for self-measurement and,
optionally, by any code that is resizing this component. | IMeasureDisplayObject | ||
minHeight : Number
The minimum recommended height to be used for self-measurement and,
optionally, by any code that is resizing this component. | IMeasureDisplayObject | ||
minWidth : Number
The minimum recommended width to be used for self-measurement and,
optionally, by any code that is resizing this component. | IMeasureDisplayObject | ||
name : String
The name of the display object. | IFeathersDisplayObject | ||
parent : DisplayObjectContainer [read-only]
The display object's parent, or null if it doesn't have
a parent. | IFeathersDisplayObject | ||
pivotX : Number
The x coordinate of the display object's origin in its own coordinate
space. | IFeathersDisplayObject | ||
pivotY : Number
The y coordinate of the display object's origin in its own coordinate
space. | IFeathersDisplayObject | ||
root : DisplayObject [read-only]
| IFeathersDisplayObject | ||
rotation : Number
The rotation of the display object, in radians. | IFeathersDisplayObject | ||
scaleX : Number
This horizontal scale factor. | IFeathersDisplayObject | ||
scaleY : Number
The vertical scale factor. | IFeathersDisplayObject | ||
skewX : Number
The horizontal skew, in radians. | IFeathersDisplayObject | ||
skewY : Number
The vertical skew, in radians. | IFeathersDisplayObject | ||
stage : Stage [read-only]
The stage that the display object is connected to, or null
if it is not connected to a stage. | IFeathersDisplayObject | ||
styleName : String
The concatenated styleNameList, with values separated
by spaces. | IFeathersControl | ||
styleNameList : TokenList [read-only]
Contains a list of all "styles" assigned to this control. | IFeathersControl | ||
styleProvider : IStyleProvider
When a component initializes, a style provider may be used to set
properties that affect the component's visual appearance. | IFeathersControl | ||
toolTip : String
Text to display in a tool tip to when hovering over this component,
if the ToolTipManager is enabled. | IFeathersControl | ||
touchable : Boolean
Determines if the display object may be touched. | IFeathersDisplayObject | ||
transformationMatrix : Matrix [read-only]
The transformation matrix of the display object, relative to its
parent. | IFeathersDisplayObject | ||
useHandCursor : Boolean
Determines if the mouse cursor should turn into a hand when the mouse
is over the display object. | IFeathersDisplayObject | ||
visible : Boolean
Determines the visibility of the display object. | IFeathersDisplayObject | ||
width : Number
The width of the display object in the parent's coordinate space. | IFeathersDisplayObject | ||
x : Number
The x, or horizontal, position of the display object in the parent's
coordinate space. | IFeathersDisplayObject | ||
y : Number
The y, or vertical, position of the display object in the parent's
coordinate space. | IFeathersDisplayObject |
Method | Defined By | ||
---|---|---|---|
addEventListener(type:String, listener:Function):void
Adds a listener for an event type. | IFeathersEventDispatcher | ||
dispatchEvent(event:Event):void
Dispatches an event to all listeners added for the specified event type. | IFeathersEventDispatcher | ||
dispatchEventWith(type:String, bubbles:Boolean = false, data:Object = null):void
Dispatches an event from the pool with the specified to all listeners
for the specified event type. | IFeathersEventDispatcher | ||
dispose():void
Disposes the display object. | IFeathersDisplayObject | ||
getBounds(targetSpace:DisplayObject, resultRect:Rectangle = null):Rectangle
Gets the display object's bounds in the target coordinate space. | IFeathersDisplayObject | ||
getTransformationMatrix(targetSpace:DisplayObject, resultMatrix:Matrix = null):Matrix
Calculates a transformation matrix to convert values from the display
object's coordinate space to a target coordinate space. | IFeathersDisplayObject | ||
globalToLocal(globalPoint:Point, resultPoint:Point = null):Point
Converts a point from the stage's coordinate space to the display
object's coordinate space. | IFeathersDisplayObject | ||
hasEventListener(type:String, listener:Function = null):Boolean
Checks if a listener has been added for the specified event type. | IFeathersEventDispatcher | ||
hitTest(localPoint:Point):DisplayObject
Determines if a point exists within the display object's bounds. | IFeathersDisplayObject | ||
initializeNow():void
If the component has not yet initialized, initializes immediately. | IFeathersControl | ||
localToGlobal(localPoint:Point, resultPoint:Point = null):Point
Converts a point from the display object's coordinate space to the
stage's coordinate space. | IFeathersDisplayObject | ||
move(x:Number, y:Number):void
Sets both the x and the y positions of the control in a single
function call. | IFeathersControl | ||
removeEventListener(type:String, listener:Function):void
Removes a listener for an event type. | IFeathersEventDispatcher | ||
removeEventListeners(type:String = null):void
Removes all listeners for an event type. | IFeathersEventDispatcher | ||
removeFromParent(dispose:Boolean = false):void
Removes a display object from its parent. | IFeathersDisplayObject | ||
render(painter:Painter):void
Renders the display object. | IFeathersDisplayObject | ||
resetStyleProvider():void
Resets the styleProvider property to its default value,
which is usually the global style provider for the component. | IFeathersControl | ||
resumeEffects():void
Indicates that effects should be re-activated after being suspended. | IFeathersControl | ||
setSize(width:Number, height:Number):void
Sets both the width and the height of the control in a single
function call. | IFeathersControl | ||
suspendEffects():void
Indicates that effects should not be activated temporarily. | IFeathersControl | ||
validate():void
Immediately validates the display object, if it is invalid. | IValidating |
Event | Summary | Defined By | ||
---|---|---|---|---|
Dispatched after the component has validated for the first time. | IFeathersControl | |||
Dispatched after the control has been initialized, but before it has drawn for the first time. | IFeathersControl | |||
Dispatched when the width or height of the control changes. | IFeathersControl |
effectsSuspended | property |
effectsSuspended:Boolean
[read-only] Indicates if effects have been suspended.
public function get effectsSuspended():Boolean
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():Boolean
isEnabled | property |
isEnabled:Boolean
Indicates whether the control is interactive or not.
In the following example, the control is disabled:
control.isEnabled = false;
public function get isEnabled():Boolean
public function set isEnabled(value:Boolean):void
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():Boolean
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.
public function get styleName():String
public function set styleName(value:String):void
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():TokenList
styleProvider | property |
styleProvider:IStyleProvider
When 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):void
toolTip | property |
toolTip:String
Text to display in a tool tip to when hovering over this component,
if the ToolTipManager
is enabled.
public function get toolTip():String
public function set toolTip(value:String):void
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.
move | () | method |
public function move(x:Number, y:Number):void
Sets both the x and the y positions of the control in a single function call.
Parameters
x:Number | |
y:Number |
resetStyleProvider | () | method |
public function resetStyleProvider():void
Resets the styleProvider
property to its default value,
which is usually the global style provider for the component.
resumeEffects | () | method |
public function resumeEffects():void
Indicates that effects should be re-activated after being suspended.
setSize | () | method |
public function setSize(width:Number, height:Number):void
Sets both the width and the height of the control in a single function call.
Parameters
width:Number | |
height:Number |
suspendEffects | () | method |
public function suspendEffects():void
Indicates that effects should not be activated temporarily. Call
resumeEffects()
when effects should be allowed again.
creationComplete | Event |
starling.events.Event
feathers.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.Event
feathers.events.FeathersEventType.INITIALIZE
Dispatched after the control has been initialized, but before it has drawn for the first time. Typically, the component's children will have been created by this point.
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.Event
feathers.events.FeathersEventType.RESIZE
Dispatched 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. |
FeathersEventType.RESIZE
event type is meant to
be used when an IFeathersControl
has resized.