qnx.fuse.ui.text.TextInputBase

TextInputBase

Properties | Methods


Packageqnx.fuse.ui.text
Classpublic class TextInputBase
InheritanceTextInputBase Inheritance SkinnableComponent Inheritance UIComponent Inheritance flash.display.MovieClip
Subclasses TextArea, TextInput

Provides base functionality for input text components.

This is the base class for the TextInput and TextArea classes.



Class information:
PlayBook Tablet OS Version:   1.0.6

See also

TextArea
TextInput



Public Properties

 PropertyDefined By
  autoCapitalize : String
Gets or sets a value that enables auto-capitalization when the user inputs text.
TextInputBase
  autoCorrect : Boolean
Gets or sets a value that enables auto-correct when text is entered by the user.
TextInputBase
  disableReturnKey : Boolean
Gets or sets a value that disables the return key on the soft keyboard.
TextInputBase
  displayAsPassword : Boolean
Gets or sets a value that determines whether text is masked (as in a password field).
TextInputBase
  editable : Boolean
Gets or sets a value that determines if text can be modified.
TextInputBase
 InheritedexplicitHeight : Number
[read-only] Returns the explicit height (actual height, in pixels) of the UI component.
UIComponent
 InheritedexplicitWidth : Number
[read-only] Returns the explicit width (actual width, in pixels) of the UI component.
UIComponent
  format : TextFormat
Gets or sets the format of the text.
TextInputBase
 InheritedincludeInLayout : Boolean
Specifies whether or not the component should be included in its parent container's layout.
UIComponent
 InheritedlayoutData : Object
Returns the layout data for the object.
UIComponent
  length : int
[read-only] Returns the length of the text that is being rendered.
TextInputBase
  locale : String
Gets or sets the current locale of the text.
TextInputBase
  maxChars : int
Gets or sets the maximum number of characters that can be entered in the field.
TextInputBase
 InheritedminHeight : Number
Gets or sets the minimum preferred height of the control.
UIComponent
 InheritedminWidth : Number
Gets or sets the minimum preferred width of the control.
UIComponent
  restrict : String
Gets or sets the set of characters (as a String) that a user can enter into the text field.
TextInputBase
  returnKeyLabel : String
Gets or sets the label of the return key on the soft keyboard.
TextInputBase
  selectable : Boolean
Gets or sets a value that determines whether text can be selected.
TextInputBase
  selectionActiveIndex : int
[read-only] Returns the zero-based index of the first character in the selection.
TextInputBase
  selectionAnchorIndex : int
[read-only] Returns the zero-based index of the last character in the selection.
TextInputBase
  softKeyboardType : String
Gets or sets the type of keyboard to be displayed when an editing session begins.
TextInputBase
  spellCheck : Boolean
Gets or sets a value that enables spell-check.
TextInputBase
 Inheritedstate : String
Gets or sets the state of the component.
SkinnableComponent
  text : String
Gets or sets the text of the component.
TextInputBase

Public Methods

 MethodDefined By
  
Do not instantiate this class.
TextInputBase
 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
 Inherited
destroy():void
Call this method when you want to have your object collected by the garbage collector.
UIComponent
 Inherited
Returns the size options for the given control.
UIComponent
 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
This method calls doMeasure() in order to calculate the preferred size of the control.
UIComponent
  
registerEmoticons(emoticons:Vector.<Emoticon>):void
Registers a set of emoticons with the TextField.
TextInputBase
  
replaceText(startIndex:int, endIndex:int, insert:String):void
Replaces the text between at a given start and end index.
TextInputBase
 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
  
setSelection(anchorIndex:int, activeIndex:int):void
Sets the range of selected text.
TextInputBase
 Inherited
setSkin(newSkin:Object):void
Set the skin object on the component for it to render.
SkinnableComponent
 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
doMeasure(availableWidth:Number, availableHeight:Number):LayoutMeasurement
Performs a measurement on the control, and returns a LayoutMeasurement instance containing the available width and height within the layout.
UIComponent
 Inherited
flushCache():void
Invoked as part of parentLayoutChanged.
UIComponent
 Inherited
onAdded():void
Called when the instance is added to the stage.
UIComponent
 Inherited
onRemoved():void
Called when the instance is removed from the stage.
UIComponent
 Inherited
Invalidates the parent's size and display list if includeInLayout property is set to true.
UIComponent
 Inherited
updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
Sets the size and position of the children of the component.
UIComponent
 Inherited
updateSkin(unscaledWidth:Number, unscaledHeight:Number):void
Updates the skin.
SkinnableComponent

Property Detail

autoCapitalize


autoCapitalize:String

Gets or sets a value that enables auto-capitalization when the user inputs text. Possible values are:

  • AutoCapitalize.NONE - no capitalization.
  • AutoCapitalize.SENTENCE - Sentence case capitalization (first word only).


Implementation

public function get autoCapitalize():String
public function set autoCapitalize(value:String):void

autoCorrect


autoCorrect:Boolean

Gets or sets a value that enables auto-correct when text is entered by the user.


Implementation

public function get autoCorrect():Boolean
public function set autoCorrect(value:Boolean):void

disableReturnKey


disableReturnKey:Boolean

Gets or sets a value that disables the return key on the soft keyboard.


Implementation

public function get disableReturnKey():Boolean
public function set disableReturnKey(value:Boolean):void

displayAsPassword


displayAsPassword:Boolean

Gets or sets a value that determines whether text is masked (as in a password field).


Implementation

public function get displayAsPassword():Boolean
public function set displayAsPassword(value:Boolean):void

editable


editable:Boolean

Gets or sets a value that determines if text can be modified. Set to true to make the text editable. Setting this value to false disables editing, however the text can still be selected.


Implementation

public function get editable():Boolean
public function set editable(value:Boolean):void

format


format:TextFormat

Gets or sets the format of the text.


Implementation

public function get format():TextFormat
public function set format(value:TextFormat):void

length


length:int  [read-only]

Returns the length of the text that is being rendered.

This may be different than calling text.length(); Emoticons in the text count as 1 character.


Implementation

public function get length():int

locale


locale:String

Gets or sets the current locale of the text.

The locale property controls whether text is rendered left to right or right to left.


Implementation

public function get locale():String
public function set locale(value:String):void

maxChars


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.


Implementation

public function get maxChars():int
public function set maxChars(value:int):void

restrict


restrict:String

Gets or sets the set of characters (as a String) that a user can enter into the text field.


Implementation

public function get restrict():String
public function set restrict(value:String):void

returnKeyLabel


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

selectable


selectable:Boolean

Gets or sets a value that determines whether text can be selected.


Implementation

public function get selectable():Boolean
public function set selectable(value:Boolean):void

selectionActiveIndex


selectionActiveIndex:int  [read-only]

Returns the zero-based index of the first character in the selection.


Implementation

public function get selectionActiveIndex():int

selectionAnchorIndex


selectionAnchorIndex:int  [read-only]

Returns the zero-based index of the last character in the selection.


Implementation

public function get selectionAnchorIndex():int

softKeyboardType


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

spellCheck


spellCheck:Boolean

Gets or sets a value that enables spell-check. When spellcheck is enabled, red edit marks will be displayed below misspelled words when the user inserts text.


Implementation

public function get spellCheck():Boolean
public function set spellCheck(value:Boolean):void

text


text:String

Gets or sets the text of the component.


Implementation

public function get text():String
public function set text(value:String):void

Constructor Detail

TextInputBase()


public function TextInputBase()

Do not instantiate this class.

Instead, use the TextInput or TextArea classes.

Method Detail

registerEmoticons()


public function registerEmoticons(emoticons:Vector.<Emoticon>):void

Registers a set of emoticons with the TextField.

Parameters

emoticons:Vector.<Emoticon> — A vector of emoticons to register.

replaceText()


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 insert.

setSelection()


public function setSelection(anchorIndex:int, activeIndex:int):void

Sets the range of selected text.

You must set the selectable and enabled to true in order to create a selection.

Parameters

anchorIndex:int — The first character position of the selection.
activeIndex:int — The last character position of the seletion.