Packagefeathers.core
Interfacepublic interface ITextEditor extends IFeathersControl, IFeathersDisplayObject, IFeathersEventDispatcher
Implementors StageTextTextEditor, TextFieldTextEditor

Handles the editing of text.

See also

http://wiki.starling-framework.org/feathers/text-editors


Public Properties
 PropertyDefined By
 Inheritedalpha : Number
IFeathersDisplayObject
 Inheritedbase : DisplayObject
[read-only]
IFeathersDisplayObject
 InheritedblendMode : String
IFeathersDisplayObject
 Inheritedbounds : Rectangle
[read-only]
IFeathersDisplayObject
 Inheritedfilter : FragmentFilter
IFeathersDisplayObject
 InheritedhasVisibleArea : Boolean
[read-only]
IFeathersDisplayObject
 Inheritedheight : Number
IFeathersDisplayObject
 InheritedisEnabled : Boolean
Indicates whether the control is interactive or not.
IFeathersControl
 InheritedisInitialized : Boolean
[read-only] Determines if the component has been initialized yet.
IFeathersControl
 InheritedmaxHeight : Number
The maximum recommended height to be used for self-measurement and, optionally, by any code that is resizing this component.
IFeathersControl
 InheritedmaxWidth : Number
The maximum recommended width to be used for self-measurement and, optionally, by any code that is resizing this component.
IFeathersControl
 InheritedminHeight : Number
The minimum recommended height to be used for self-measurement and, optionally, by any code that is resizing this component.
IFeathersControl
 InheritedminWidth : Number
The minimum recommended width to be used for self-measurement and, optionally, by any code that is resizing this component.
IFeathersControl
 Inheritedname : String
IFeathersDisplayObject
 InheritednameList : TokenList
[read-only] Contains a list of all "names" assigned to this control.
IFeathersControl
 Inheritedparent : DisplayObjectContainer
[read-only]
IFeathersDisplayObject
 InheritedpivotX : Number
IFeathersDisplayObject
 InheritedpivotY : Number
IFeathersDisplayObject
 Inheritedroot : DisplayObject
[read-only]
IFeathersDisplayObject
 Inheritedrotation : Number
IFeathersDisplayObject
 InheritedscaleX : Number
IFeathersDisplayObject
 InheritedscaleY : Number
IFeathersDisplayObject
 InheritedskewX : Number
IFeathersDisplayObject
 InheritedskewY : Number
IFeathersDisplayObject
 Inheritedstage : Stage
[read-only]
IFeathersDisplayObject
  text : String
The text displayed by the editor.
ITextEditor
 Inheritedtouchable : Boolean
IFeathersDisplayObject
 InheritedtransformationMatrix : Matrix
[read-only]
IFeathersDisplayObject
 InheriteduseHandCursor : Boolean
IFeathersDisplayObject
 Inheritedvisible : Boolean
IFeathersDisplayObject
 Inheritedwidth : Number
IFeathersDisplayObject
 Inheritedx : Number
IFeathersDisplayObject
 Inheritedy : Number
IFeathersDisplayObject
Public Methods
 MethodDefined By
 Inherited
addEventListener(type:String, listener:Function):void
IFeathersEventDispatcher
  
clearFocus():void
Removes focus from the text editor.
ITextEditor
 Inherited
dispatchEvent(event:Event):void
IFeathersEventDispatcher
 Inherited
dispatchEventWith(type:String, bubbles:Boolean = false, data:Object = null):void
IFeathersEventDispatcher
 Inherited
dispose():void
IFeathersDisplayObject
 Inherited
getBounds(targetSpace:DisplayObject, resultRect:Rectangle = null):Rectangle
IFeathersDisplayObject
 Inherited
getTransformationMatrix(targetSpace:DisplayObject, resultMatrix:Matrix = null):Matrix
IFeathersDisplayObject
 Inherited
globalToLocal(globalPoint:Point, resultPoint:Point = null):Point
IFeathersDisplayObject
 Inherited
hasEventListener(type:String):Boolean
IFeathersEventDispatcher
 Inherited
hitTest(localPoint:Point, forTouch:Boolean = false):DisplayObject
IFeathersDisplayObject
 Inherited
localToGlobal(localPoint:Point, resultPoint:Point = null):Point
IFeathersDisplayObject
 Inherited
removeEventListener(type:String, listener:Function):void
IFeathersEventDispatcher
 Inherited
removeEventListeners(type:String = null):void
IFeathersEventDispatcher
 Inherited
removeFromParent(dispose:Boolean = false):void
IFeathersDisplayObject
 Inherited
render(support:RenderSupport, parentAlpha:Number):void
IFeathersDisplayObject
  
selectRange(startIndex:int, endIndex:int):void
Sets the range of selected characters.
ITextEditor
  
setFocus(position:Point = null):void
Gives focus to the text editor.
ITextEditor
 Inherited
setSize(width:Number, height:Number):void
Sets both the width and the height of the control.
IFeathersControl
 Inherited
validate():void
Immediately validates the control, which triggers a redraw, if one is pending.
IFeathersControl
Events
 Event Summary Defined By
  Dispatched when the text property changes.ITextEditor
  Dispatched when the user presses the Enter key while the editor has focus.ITextEditor
  Dispatched when the text editor receives focus.ITextEditor
  Dispatched when the text editor loses focus.ITextEditor
Property Detail
textproperty
text:String

The text displayed by the editor.


Implementation
    public function get text():String
    public function set text(value:String):void
Method Detail
clearFocus()method
public function clearFocus():void

Removes focus from the text editor.

selectRange()method 
public function selectRange(startIndex:int, endIndex:int):void

Sets the range of selected characters. If both values are the same, the text insertion position is changed and nothing is selected.

Parameters

startIndex:int
 
endIndex:int

setFocus()method 
public function setFocus(position:Point = null):void

Gives focus to the text editor. Includes an optional position which may be used by the text editor to determine the cursor position. The position may be outside of the editors bounds.

Parameters

position:Point (default = null)

Event Detail
change Event
Event Object Type: starling.events.Event

Dispatched when the text property changes.

enter Event  
Event Object Type: starling.events.Event
Event.type property = feathers.events.FeathersEventType.ENTER

Dispatched when the user presses the Enter key while the editor has focus.

The FeathersEventType.ENTER event type is meant to be used when the enter key has been pressed in an input control.
focusIn Event  
Event Object Type: starling.events.Event
Event.type property = feathers.events.FeathersEventType.FOCUS_IN

Dispatched when the text editor receives focus.

The FeathersEventType.FOCUS_IN event type is used by Feathers components to indicate when they have received focus.
focusOut Event  
Event Object Type: starling.events.Event
Event.type property = feathers.events.FeathersEventType.FOCUS_OUT

Dispatched when the text editor loses focus.

The FeathersEventType.FOCUS_OUT event type is used by Feathers components to indicate when they have lost focus.