Packageqnx.fuse.ui.text
Classpublic class EditableText
InheritanceEditableText Inheritance TextBase Inheritance UIComponent Inheritance flash.display.MovieClip
Implements flash.text.ime.IIMEClient

Provides functionality to input text.



Public Properties
 PropertyDefined By
  autoCapitalize : String
Gets or sets whether auto capitalization should occur when the user inputs text.
EditableText
  autoCorrect : Boolean
Gets or sets wether auto correct should be preformed when text is entered by the user.
EditableText
  disableReturnKey : Boolean
EditableText
  displayAsPassword : Boolean
Gets or sets whether the text should be masked as a password field.
EditableText
  editable : Boolean
When set to false text cannot be modified, but can still be selected.
EditableText
  editing : Boolean
[read-only] Is set to true when the user starts editing the text and false when the user stops editing.
EditableText
 InheritedexplicitHeight : Number
[read-only]
UIComponent
 InheritedexplicitWidth : Number
[read-only]
UIComponent
 Inheritedformat : TextFormat
Gets or sets the format of the text.
TextBase
 InheritedincludeInLayout : Boolean
Specifies if the component should be included in it's parent containers layout.
UIComponent
 InheritedlayoutData : Object
Returns the layout data for the object.
UIComponent
 Inheritedlength : int
[read-only] Returns the length of the text that is being rendered.
TextBase
 Inheritedlocale : String
Gets or sets the current locale of the text.
TextBase
  maxChars : int
Gets or sets the maximum number of characters that can be entered in the field.
EditableText
 InheritedmaxLines : int
Gets or sets the maximum number of lines to measured by a layout.
TextBase
 InheritedminHeight : Number
Sets the minimum preferred height of the control.
UIComponent
 InheritedminLines : int
Gets or sets the minimum number of lines to measured by a layout.
TextBase
 InheritedminWidth : Number
Sets the minimum preferred width of the control.
UIComponent
  restrict : String
Indicates the set of characters that a user can enter into the text field.
EditableText
  returnKeyLabel : String
Gets or sets the label of the return key on the soft keyboard.
EditableText
 Inheritedselectable : Boolean
Gets or sets whether text can be selected.
TextBase
 Inheritedselected : Boolean
[read-only] Returns true if the component has a text selection and false if it does not.
TextBase
 InheritedselectionActiveIndex : int
[read-only] Returns the zero-based index of the first character in the selection.
TextBase
 InheritedselectionAnchorIndex : int
[read-only] Returns the zero-based index of the last character in the selection.
TextBase
 InheritedselectionImageBitmap : BitmapData
[static]
TextBase
  softKeyboardType : String
Gets or sets the type of keyboard to be displayed when an editing session begins.
EditableText
  spellCheck : Boolean
Gets or sets whether red underlines should be displayed under misspelt words when the user inserts text.
EditableText
  text : String
[override]
EditableText
 InheritedtextHeight : Number
[read-only] Gets the current height of the text.
TextBase
 InheritedtextWidth : Number
[read-only] Gets the current width of the text.
TextBase
Protected Properties
 PropertyDefined By
 InheriteddisplayListIsInvalid : Boolean = false
UIComponent
 InheritedenableEmoticons : Boolean
Enables or disables emoticons from being displayed.
TextBase
  inputFilter : TextInputFilter
EditableText
 InheritedpropertiesAreInvalid : Boolean = false
UIComponent
 InheritedsizeChange : Boolean
UIComponent
 InheritedstateChanged : Boolean
UIComponent
Public Methods
 MethodDefined By
  
EditableText
 Inherited
childChanged(resizedChild:DisplayObject = null):Boolean
Notifies the UIComponent that one or more of its children has changed in a manner that may affect this object's layout.
UIComponent
  
deleteText(startIndex:int = 0, endIndex:int = -1):void
Deletes the text between a start and end index.
EditableText
 Inherited
destroy():void
Call this method when you want to have your object collected by the garbage collector.
UIComponent
 Inherited
UIComponent
 Inherited
getTextLineAt(index:int):TextLine
Gets a TextLine at a specific index.
TextBase
 Inherited
Calling this method results in a call to the components validateDisplayList() method before the display list is rendered.
UIComponent
 Inherited
Calling this method results in a call to the components validateProperties() method before the display list is rendered.
UIComponent
 Inherited
measure(availableWidth:Number, availableHeight:Number):LayoutMeasurement
UIComponent
 Inherited
mouseFocusChange(event:FocusEvent):void
Checks to see if focus is about to be lost when interacting with an object in the control.
TextBase
 Inherited
registerEmoticons(emoticons:Vector.<Emoticon>):void
Registers a set of emoticons with the text component.
TextBase
  
replaceText(startIndex:int, endIndex:int, insert:String):void
Replaces the text between at a given start and end index.
EditableText
 Inherited
scrollInView(position:int, immediate:Boolean = false):void
Scrolls the position into view.
TextBase
 Inherited
setActualSize(w:Number, h:Number):void
Sets the width and height of the object without setting the explicitWidth and explicitHeight.
UIComponent
 Inherited
setLayoutBounds(bounds:Rectangle):void
Sets the receiver's size and location to the rectangular area specified by the arguments.
UIComponent
 Inherited
setPosition(x:Number, y:Number):void
Sets the x and y position of the component.
UIComponent
 Inherited
setSelection(anchorIndex:int, activeIndex:int):void
Sets the selection of the text within a given range.
TextBase
 Inherited
Validates the display list of the component by calling the updateDisplayList().
UIComponent
 Inherited
Validates the component immediately by calling validateProperties(), validateSizes(), and validateDisplayList() if necessary.
UIComponent
 Inherited
Validates the properties of the component by calling the commitProperties() method.
UIComponent
Protected Methods
 MethodDefined By
 Inherited
Process properties of the component.
UIComponent
 Inherited
Process the state of the component.
UIComponent
 Inherited
composeLines(width:Number, height:Number):Boolean
Creates all of the text lines given the specified width and height.
TextBase
 Inherited
createTextLines(width:Number, height:Number):void
Renders the text at the specified width and height.
TextBase
 Inherited
cursor2linePos(cursor:Cursor, consumer:Function):void
Given a specified cursor, this method calls the consumer parameter with TextLine and the x position of the cursor.
TextBase
 Inherited
doMeasure(availableWidth:Number, availableHeight:Number):LayoutMeasurement
UIComponent
 Inherited
event2cursor(stageX:Number, stageY:Number, rail:TextLine):Cursor
Gets a cursor given x and y cordinates of the component, expressed in the stage corrdinate system.
TextBase
 Inherited
event2word(stageX:Number, stageY:Number, consumer:Function):void
Based on x and y positions in the stage corrdinate system, call the consumer with the logical start and end of the word in the text.
TextBase
 Inherited
flushCache():void
Invoked as part of parentLayoutChanged.
UIComponent
 Inherited
Gets the text alignment for laying out the text.
TextBase
 Inherited
getTextLine(block:TextBlock = null, previousLine:TextLine = null, width:Number = 1000000, lineOffset:Number = 0.0, fitSomething:Boolean = false):TextLine
This method creates the text line.
TextBase
 Inherited
Gets the text to be rendered by the component.
TextBase
  
insertText(insert:String, startIndex:int, endIndex:int):void
Replaces the specified text between a start and end index.
EditableText
 Inherited
lineFragment2rectangle(line:TextLine, left:Number, right:Number, consumer:Function):void
Given a line fragement, call the consumer with the corresponding rectangle.
TextBase
 Inherited
onAdded():void
Called when the instance is added to the stage.
UIComponent
  
onRemoved():void
[override]
EditableText
 Inherited
Invalidates the parent's size and display list if includeInLayout property is set to true.
UIComponent
 Inherited
position2cursor(position:int):Cursor
Return a Cursor object given the specified position in the text.
TextBase
 Inherited
positionLines(width:Number, height:Number, lines:Vector.<TextLine>):Point
Positions all of the created text lines given a specified width and height.
TextBase
 Inherited
range2lineFragments(start:int, limit:int, consumer:Function):void
Given a range in the text, call the consumer with the corresponding line fragments.
TextBase
 Inherited
range2rectangles(start:int, limit:int, consumer:Function):void
Given a range in the text, call the consumer with the corresponding values for the rectangle.
TextBase
 Inherited
Removes the current TextLines from the display list.
TextBase
 Inherited
Called when the text is moving during a scroll.
TextBase
 Inherited
updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
Sets the size and position of the children of the component.
UIComponent
Events
 Event Summary Defined By
  Dispatched when an edit session begins.EditableText
  Dispatched when an edit session ends.EditableText
 InheritedDispatched when text is laid out and the text dimensions have changed.TextBase
 InheritedDispatched when a text selection has changed.TextBase
Property Detail
autoCapitalizeproperty
autoCapitalize:String

Gets or sets whether auto capitalization should occur when the user inputs text.


Implementation
    public function get autoCapitalize():String
    public function set autoCapitalize(value:String):void
autoCorrectproperty 
autoCorrect:Boolean

Gets or sets wether auto correct should be preformed when text is entered by the user.

The default value is true.


Implementation
    public function get autoCorrect():Boolean
    public function set autoCorrect(value:Boolean):void
disableReturnKeyproperty 
disableReturnKey:Boolean


Implementation
    public function get disableReturnKey():Boolean
    public function set disableReturnKey(value:Boolean):void
displayAsPasswordproperty 
displayAsPassword:Boolean

Gets or sets whether the text should be masked as a password field.


Implementation
    public function get displayAsPassword():Boolean
    public function set displayAsPassword(value:Boolean):void
editableproperty 
editable:Boolean

When set to false text cannot be modified, but can still be selected.

The default value is true.


Implementation
    public function get editable():Boolean
    public function set editable(value:Boolean):void
editingproperty 
editing:Boolean  [read-only]

Is set to true when the user starts editing the text and false when the user stops editing.


Implementation
    public function get editing():Boolean

See also

inputFilterproperty 
protected var inputFilter:TextInputFilter

maxCharsproperty 
maxChars:int

Gets or sets the maximum number of characters that can be entered in the field. A script can insert more text than maxChars allows; the maxChars property indicates only how much text a user can enter. If the value of this property is 0, a user can enter an unlimited amount of text.

The default value is The default value is 0..


Implementation
    public function get maxChars():int
    public function set maxChars(value:int):void
restrictproperty 
restrict:String

Indicates the set of characters that a user can enter into the text field.


Implementation
    public function get restrict():String
    public function set restrict(value:String):void
returnKeyLabelproperty 
returnKeyLabel:String

Gets or sets the label of the return key on the soft keyboard.


Implementation
    public function get returnKeyLabel():String
    public function set returnKeyLabel(value:String):void
softKeyboardTypeproperty 
softKeyboardType:String

Gets or sets the type of keyboard to be displayed when an editing session begins.


Implementation
    public function get softKeyboardType():String
    public function set softKeyboardType(value:String):void
spellCheckproperty 
spellCheck:Boolean

Gets or sets whether red underlines should be displayed under misspelt words when the user inserts text.


Implementation
    public function get spellCheck():Boolean
    public function set spellCheck(value:Boolean):void
textproperty 
text:String[override]


Implementation
    public function get text():String
    public function set text(value:String):void
Constructor Detail
EditableText()Constructor
public function EditableText()



Method Detail
deleteText()method
public function deleteText(startIndex:int = 0, endIndex:int = -1):void

Deletes the text between a start and end index.

Parameters

startIndex:int (default = 0) — The start index of the text to delete.
 
endIndex:int (default = -1) — The end index of the text to delete.

insertText()method 
protected final function insertText(insert:String, startIndex:int, endIndex:int):void

Replaces the specified text between a start and end index. The current text between the start and end index is replaced by the new text. Passing an empty string as the insert parameter will delete the text between the start and end indices.

Parameters

insert:String — The text to be inserted
 
startIndex:int — The start index to place the text.
 
endIndex:int — The end index where to place the text.

onRemoved()method 
override protected function onRemoved():void

replaceText()method 
public function replaceText(startIndex:int, endIndex:int, insert:String):void

Replaces the text between at a given start and end index.

Parameters

startIndex:int — The start index of the text to replace.
 
endIndex:int — The end index of the text to replace.
 
insert:String — The text to inserted.

Event Detail
editStart Event
Event Object Type: qnx.fuse.ui.events.TextEvent
TextEvent.type property = qnx.fuse.ui.events.TextEvent.EDIT_START

Dispatched when an edit session begins.

This event is fired when an editing session starts on the text component.
editStop Event  
Event Object Type: qnx.fuse.ui.events.TextEvent
TextEvent.type property = qnx.fuse.ui.events.TextEvent.EDIT_STOP

Dispatched when an edit session ends.

This event is fired when an editing session stops on the text component.