| Package | qnx.fuse.ui.text |
| Class | public class EditableText |
| Inheritance | EditableText TextBase UIComponent flash.display.MovieClip |
| Implements | flash.text.ime.IIMEClient |
| Property | Defined 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 | ||
![]() | explicitHeight : Number [read-only] | UIComponent | |
![]() | explicitWidth : Number [read-only] | UIComponent | |
![]() | format : TextFormat
Gets or sets the format of the text. | TextBase | |
![]() | includeInLayout : Boolean
Specifies if the component should be included in it's parent containers layout. | UIComponent | |
![]() | layoutData : Object
Returns the layout data for the object. | UIComponent | |
![]() | length : int [read-only]
Returns the length of the text that is being rendered. | TextBase | |
![]() | locale : 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 | ||
![]() | maxLines : int
Gets or sets the maximum number of lines to measured by a layout. | TextBase | |
![]() | minHeight : Number
Sets the minimum preferred height of the control. | UIComponent | |
![]() | minLines : int
Gets or sets the minimum number of lines to measured by a layout. | TextBase | |
![]() | minWidth : 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 | ||
![]() | selectable : Boolean
Gets or sets whether text can be selected. | TextBase | |
![]() | selected : Boolean [read-only]
Returns true if the component has a text selection and false if it does not. | TextBase | |
![]() | selectionActiveIndex : int [read-only]
Returns the zero-based index of the first character in the selection. | TextBase | |
![]() | selectionAnchorIndex : int [read-only]
Returns the zero-based index of the last character in the selection. | TextBase | |
![]() | selectionImageBitmap : 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 | ||
![]() | textHeight : Number [read-only]
Gets the current height of the text. | TextBase | |
![]() | textWidth : Number [read-only]
Gets the current width of the text. | TextBase | |
| Property | Defined By | ||
|---|---|---|---|
![]() | displayListIsInvalid : Boolean = false | UIComponent | |
![]() | enableEmoticons : Boolean
Enables or disables emoticons from being displayed. | TextBase | |
| inputFilter : TextInputFilter | EditableText | ||
![]() | propertiesAreInvalid : Boolean = false | UIComponent | |
![]() | sizeChange : Boolean | UIComponent | |
![]() | stateChanged : Boolean | UIComponent | |
| Method | Defined By | ||
|---|---|---|---|
| EditableText | |||
![]() | 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 | ||
![]() | destroy():void
Call this method when you want to have your object collected by the garbage collector. | UIComponent | |
![]() | getSizeOptions():int | UIComponent | |
![]() | getTextLineAt(index:int):TextLine
Gets a TextLine at a specific index. | TextBase | |
![]() | invalidateDisplayList():void
Calling this method results in a call to the components validateDisplayList() method before the display list is rendered. | UIComponent | |
![]() | invalidateProperties():void
Calling this method results in a call to the components validateProperties() method before the display list is rendered. | UIComponent | |
![]() | measure(availableWidth:Number, availableHeight:Number):LayoutMeasurement | UIComponent | |
![]() | mouseFocusChange(event:FocusEvent):void
Checks to see if focus is about to be lost when interacting with an object in the control. | TextBase | |
![]() | 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 | ||
![]() | scrollInView(position:int, immediate:Boolean = false):void
Scrolls the position into view. | TextBase | |
![]() | setActualSize(w:Number, h:Number):void
Sets the width and height of the object without setting
the explicitWidth and explicitHeight. | UIComponent | |
![]() | setLayoutBounds(bounds:Rectangle):void
Sets the receiver's size and location to the rectangular area specified
by the arguments. | UIComponent | |
![]() | setPosition(x:Number, y:Number):void
Sets the x and y position of the component. | UIComponent | |
![]() | setSelection(anchorIndex:int, activeIndex:int):void
Sets the selection of the text within a given range. | TextBase | |
![]() | validateDisplayList():void
Validates the display list of the component by calling the updateDisplayList(). | UIComponent | |
![]() | validateNow():void
Validates the component immediately by calling validateProperties(), validateSizes(), and validateDisplayList() if necessary. | UIComponent | |
![]() | validateProperties():void
Validates the properties of the component by calling the commitProperties() method. | UIComponent | |
| Method | Defined By | ||
|---|---|---|---|
![]() | commitProperties():void
Process properties of the component. | UIComponent | |
![]() | commitState():void
Process the state of the component. | UIComponent | |
![]() | composeLines(width:Number, height:Number):Boolean
Creates all of the text lines given the specified width and height. | TextBase | |
![]() | createTextLines(width:Number, height:Number):void
Renders the text at the specified width and height. | TextBase | |
![]() | 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 | |
![]() | doMeasure(availableWidth:Number, availableHeight:Number):LayoutMeasurement | UIComponent | |
![]() | 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 | |
![]() | 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 | |
![]() | flushCache():void
Invoked as part of parentLayoutChanged. | UIComponent | |
![]() | getTextAlignment():String
Gets the text alignment for laying out the text. | TextBase | |
![]() | 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 | |
![]() | getTextToDisplay():String
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 | ||
![]() | lineFragment2rectangle(line:TextLine, left:Number, right:Number, consumer:Function):void
Given a line fragement, call the consumer with the corresponding rectangle. | TextBase | |
![]() | onAdded():void
Called when the instance is added to the stage. | UIComponent | |
onRemoved():void [override] | EditableText | ||
![]() | parentLayoutChanged():void
Invalidates the parent's size and display list if includeInLayout property is set to true. | UIComponent | |
![]() | position2cursor(position:int):Cursor
Return a Cursor object given the specified position in the text. | TextBase | |
![]() | positionLines(width:Number, height:Number, lines:Vector.<TextLine>):Point
Positions all of the created text lines given a specified width and height. | TextBase | |
![]() | range2lineFragments(start:int, limit:int, consumer:Function):void
Given a range in the text, call the consumer with the corresponding line fragments. | TextBase | |
![]() | 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 | |
![]() | removeLines():void
Removes the current TextLines from the display list. | TextBase | |
![]() | scrollUpdate():void
Called when the text is moving during a scroll. | TextBase | |
![]() | updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
Sets the size and position of the children of the component. | UIComponent | |
| Event | Summary | Defined By | ||
|---|---|---|---|---|
| Dispatched when an edit session begins. | EditableText | |||
| Dispatched when an edit session ends. | EditableText | |||
![]() | Dispatched when text is laid out and the text dimensions have changed. | TextBase | ||
![]() | Dispatched when a text selection has changed. | TextBase | ||
| autoCapitalize | property |
autoCapitalize:StringGets or sets whether auto capitalization should occur when the user inputs text.
public function get autoCapitalize():String public function set autoCapitalize(value:String):void| autoCorrect | property |
autoCorrect:BooleanGets or sets wether auto correct should be preformed when text is entered by the user.
The default value is true.
public function get autoCorrect():Boolean public function set autoCorrect(value:Boolean):void| disableReturnKey | property |
disableReturnKey:Boolean public function get disableReturnKey():Boolean public function set disableReturnKey(value:Boolean):void| displayAsPassword | property |
displayAsPassword:BooleanGets or sets whether the text should be masked as a password field.
public function get displayAsPassword():Boolean public function set displayAsPassword(value:Boolean):void| editable | property |
editable:BooleanWhen set to false text cannot be modified, but can still be selected.
The default value is true.
public function get editable():Boolean public function set editable(value:Boolean):void| editing | property |
editing:Boolean [read-only] Is set to true when the user starts editing the text and false when the user stops editing.
public function get editing():BooleanSee also
| inputFilter | property |
protected var inputFilter:TextInputFilter| maxChars | property |
maxChars:intGets 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..
public function get maxChars():int public function set maxChars(value:int):void| restrict | property |
restrict:StringIndicates the set of characters that a user can enter into the text field.
public function get restrict():String public function set restrict(value:String):void| returnKeyLabel | property |
returnKeyLabel:StringGets or sets the label of the return key on the soft keyboard.
public function get returnKeyLabel():String public function set returnKeyLabel(value:String):void| softKeyboardType | property |
softKeyboardType:StringGets or sets the type of keyboard to be displayed when an editing session begins.
public function get softKeyboardType():String public function set softKeyboardType(value:String):void| spellCheck | property |
spellCheck:BooleanGets or sets whether red underlines should be displayed under misspelt words when the user inserts text.
public function get spellCheck():Boolean public function set spellCheck(value:Boolean):void| text | property |
text:String[override] public function get text():String public function set text(value:String):void| EditableText | () | Constructor |
public function EditableText()| deleteText | () | method |
public function deleteText(startIndex:int = 0, endIndex:int = -1):voidDeletes 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):voidReplaces 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):voidReplaces 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.
|
| editStart | Event |
qnx.fuse.ui.events.TextEventqnx.fuse.ui.events.TextEvent.EDIT_STARTDispatched when an edit session begins.
This event is fired when an editing session starts on the text component.| editStop | Event |
qnx.fuse.ui.events.TextEventqnx.fuse.ui.events.TextEvent.EDIT_STOPDispatched when an edit session ends.
This event is fired when an editing session stops on the text component.