| Package | feathers.core | 
| Interface | public interface ITextEditor extends IFeathersControl, ITextBaselineControl, IValidating, IMeasureDisplayObject, IFeathersDisplayObject, IFeathersDisplayObject | 
| Implementors | BitmapFontTextEditor, TextFieldTextEditor | 
| Product Version : | Feathers 1.0.0 | 
See also
| 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 | |
![]()  | baseline : Number [read-only] 
		 Returns the text baseline measurement, in pixels.  | ITextBaselineControl | |
![]()  | 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 | |
| displayAsPassword : Boolean 
		 Determines if the entered text will be masked so that it cannot be
		 seen, such as for a password input.  | ITextEditor | ||
![]()  | 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 | |
| fontStyles : FontStylesSet 
		 The internal font styles used to render the text that are passed down
		 from the parent component.  | ITextEditor | ||
![]()  | 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 | |
| isEditable : Boolean 
		 Determines if the text is editable.  | ITextEditor | ||
![]()  | isEnabled : Boolean 
		 Indicates whether the control is interactive or not.  | IFeathersControl | |
![]()  | isInitialized : Boolean [read-only] 
		 Determines if the component has been initialized yet.  | IFeathersControl | |
| isSelectable : Boolean 
		 If the isEditable property is set to false,
		 the isSelectable property determines if the text is
		 selectable.  | ITextEditor | ||
![]()  | mask : DisplayObject 
		 The display object's mask.  | IFeathersDisplayObject | |
| maxChars : int 
		 The maximum number of characters that may be entered.  | ITextEditor | ||
![]()  | 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 | |
| restrict : String 
		 Limits the set of characters that may be entered.  | ITextEditor | ||
![]()  | 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 | |
| selectionBeginIndex : int [read-only] 
		 The index of the first character of the selection.  | ITextEditor | ||
| selectionEndIndex : int [read-only] 
		 The index of the last character of the selection.  | ITextEditor | ||
| setTouchFocusOnEndedPhase : Boolean [read-only] 
		 Determines if the owner should call setFocus() on
		 TouchPhase.ENDED or on TouchPhase.BEGAN.  | ITextEditor | ||
![]()  | 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 | |
| text : String 
		 The text displayed by the editor.  | ITextEditor | ||
![]()  | 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 | |
clearFocus():void 
		 Removes focus from the text editor.  | ITextEditor | ||
![]()  | 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 | |
measureText(result:Point = null):Point 
		 Measures the text's bounds (without a full validation, if
		 possible).  | ITextEditor | ||
![]()  | 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 | |
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 | ||
![]()  | 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 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 | |||
| Dispatched when the soft keyboard is activated. | ITextEditor | |||
| Dispatched when the soft keyboard is deactivated. | ITextEditor | |||
| displayAsPassword | property | 
displayAsPassword:BooleanDetermines if the entered text will be masked so that it cannot be seen, such as for a password input.
    public function get displayAsPassword():Boolean    public function set displayAsPassword(value:Boolean):void| fontStyles | property | 
fontStyles:FontStylesSetThe internal font styles used to render the text that are passed down from the parent component. Generally, most developers will set font styles on the parent component.
Warning: The fontStyles property may be ignored if
		 more advanced styles defined by the text renderer implementation have
		 been set.
    public function get fontStyles():FontStylesSet    public function set fontStyles(value:FontStylesSet):voidSee also
| isEditable | property | 
isEditable:BooleanDetermines if the text is editable.
    public function get isEditable():Boolean    public function set isEditable(value:Boolean):voidSee also
| isSelectable | property | 
isSelectable:Boolean
		 If the isEditable property is set to false,
		 the isSelectable property determines if the text is
		 selectable. If the isEditable property is set to
		 true, the text will always be selectable.
		 		 
    public function get isSelectable():Boolean    public function set isSelectable(value:Boolean):voidSee also
| maxChars | property | 
maxChars:intThe maximum number of characters that may be entered.
    public function get maxChars():int    public function set maxChars(value:int):void| restrict | property | 
restrict:StringLimits the set of characters that may be entered.
    public function get restrict():String    public function set restrict(value:String):void| selectionBeginIndex | property | 
selectionBeginIndex:int  [read-only] 
		 The index of the first character of the selection. If no text is
		 selected, then this is the value of the caret index. This value will
		 always be smaller than selectionEndIndex.
		 
		 
    public function get selectionBeginIndex():intSee also
| selectionEndIndex | property | 
selectionEndIndex:int  [read-only] 
		 The index of the last character of the selection. If no text is
		 selected, then this is the value of the caret index. This value will
		 always be larger than selectionBeginIndex.
		 		 
    public function get selectionEndIndex():intSee also
| setTouchFocusOnEndedPhase | property | 
setTouchFocusOnEndedPhase:Boolean  [read-only] 
		 Determines if the owner should call setFocus() on
		 TouchPhase.ENDED or on TouchPhase.BEGAN.
		 This is a hack because StageText doesn't like being
		 assigned focus on TouchPhase.BEGAN. In general, most
		 text editors should simply return false.
		 		 
    public function get setTouchFocusOnEndedPhase():BooleanSee also
| text | property | 
text:StringThe text displayed by the editor.
    public function get text():String    public function set text(value:String):void| clearFocus | () | method | 
 public function clearFocus():voidRemoves focus from the text editor.
| measureText | () | method | 
 public function measureText(result:Point = null):PointMeasures the text's bounds (without a full validation, if possible).
Parameters
result:Point (default = null) | 
Point | 
| selectRange | () | method | 
 public function selectRange(startIndex:int, endIndex:int):voidSets 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):voidGives 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) | 
| change | Event | 
starling.events.Eventstarling.events.Event.CHANGEDispatched when the text property 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. | 
See also
| enter | Event | 
starling.events.Eventfeathers.events.FeathersEventType.ENTERDispatched when the user presses the Enter key while the editor has focus.
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.ENTER event type is meant to
		 be used when the enter key has been pressed in an input control.
		 | focusIn | Event | 
starling.events.Eventfeathers.events.FeathersEventType.FOCUS_INDispatched when the text editor receives focus.
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.FOCUS_IN event type is used by
		 Feathers components to indicate when they have received focus.
		 | focusOut | Event | 
starling.events.Eventfeathers.events.FeathersEventType.FOCUS_OUTDispatched when the text editor loses focus.
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.FOCUS_OUT event type is used by
		 Feathers components to indicate when they have lost focus.
		 | softKeyboardActivate | Event | 
starling.events.Eventfeathers.events.FeathersEventType.SOFT_KEYBOARD_ACTIVATEDispatched when the soft keyboard is activated. Not all text editors will activate a soft keyboard.
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.SOFT_KEYBOARD_ACTIVATE event type
		 is used by Feathers text editors when they activate a device's soft
		 keyboard.
		 		 | softKeyboardDectivate | Event | 
starling.events.Eventfeathers.events.FeathersEventType.SOFT_KEYBOARD_DEACTIVATEDispatched when the soft keyboard is deactivated. Not all text editors will activate a soft keyboard.
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.SOFT_KEYBOARD_DEACTIVATE event type
		 is used by Feathers text editors when they deactivate a device's soft
		 keyboard.