Package com.bit101.components
Class public class InputText
Inheritance InputText InheritanceComponent Inheritance flash.display.Sprite



Public Properties
  Property Defined By
    enabled : Boolean
[override] Sets/gets whether this component is enabled or not.
InputText
  Inherited height : Number
[override] Sets/gets the height of the component.
Component
    maxChars : int
Gets / sets the maximum number of characters that can be shown in this InputText.
InputText
    password : Boolean
Gets / sets whether or not this input text will show up as password (asterisks).
InputText
    restrict : String
Gets / sets the list of characters that are allowed in this TextInput.
InputText
  Inherited tag : int
Sets/gets in integer that can identify the component.
Component
    text : String
Gets / sets the text shown in this InputText.
InputText
    textField : TextField
[read-only] Returns a reference to the internal text field in the component.
InputText
  Inherited width : Number
[override] Sets/gets the width of the component.
Component
  Inherited x : Number
[override] [write-only] Overrides the setter for x to always place the component on a whole pixel.
Component
  Inherited y : Number
[override] [write-only] Overrides the setter for y to always place the component on a whole pixel.
Component
Protected Properties
  Property Defined By
    _back : Sprite
InputText
  Inherited _enabled : Boolean = true
Component
  Inherited _height : Number = 0
Component
    _password : Boolean = false
InputText
  Inherited Ronda : Class
Component
  Inherited _tag : int = -1
Component
    _text : String
InputText
    _tf : TextField
InputText
  Inherited _width : Number = 0
Component
Public Methods
  Method Defined By
   
InputText(parent:DisplayObjectContainer = null, xpos:Number = 0, ypos:Number = 0, text:String, defaultHandler:Function = null)
Constructor
InputText
   
draw():void
[override] Draws the visual ui of the component.
InputText
  Inherited
initStage(stage:Stage):void
[static] Utility method to set up usual stage align and scaling.
Component
  Inherited
move(xpos:Number, ypos:Number):void
Moves the component to the specified position.
Component
  Inherited
setSize(w:Number, h:Number):void
Sets the size of the component.
Component
Protected Methods
  Method Defined By
   
addChildren():void
[override] Creates and adds child display objects.
InputText
  Inherited
getShadow(dist:Number, knockout:Boolean = false):DropShadowFilter
DropShadowFilter factory method, used in many of the components.
Component
   
init():void
[override] Initializes the component.
InputText
  Inherited
invalidate():void
Marks the component to be redrawn on the next frame.
Component
   
onChange(event:Event):void
Internal change handler.
InputText
  Inherited
onInvalidate(event:Event):void
Called one frame after invalidate is called.
Component
Public Constants
  Constant Defined By
  Inherited DRAW : String = draw
[static]
Component
Property Detail
_back property
protected var _back:Sprite

_password property  
protected var _password:Boolean = false

_text property  
protected var _text:String

_tf property  
protected var _tf:TextField

enabled property  
enabled:Boolean[override]

Sets/gets whether this component is enabled or not.


Implementation
    public function get enabled():Boolean
    public function set enabled(value:Boolean):void
maxChars property  
maxChars:int

Gets / sets the maximum number of characters that can be shown in this InputText.


Implementation
    public function get maxChars():int
    public function set maxChars(value:int):void
password property  
password:Boolean

Gets / sets whether or not this input text will show up as password (asterisks).


Implementation
    public function get password():Boolean
    public function set password(value:Boolean):void
restrict property  
restrict:String

Gets / sets the list of characters that are allowed in this TextInput.


Implementation
    public function get restrict():String
    public function set restrict(value:String):void
text property  
text:String

Gets / sets the text shown in this InputText.


Implementation
    public function get text():String
    public function set text(value:String):void
textField property  
textField:TextField  [read-only]

Returns a reference to the internal text field in the component.


Implementation
    public function get textField():TextField
Constructor Detail
InputText () Constructor
public function InputText(parent:DisplayObjectContainer = null, xpos:Number = 0, ypos:Number = 0, text:String, defaultHandler:Function = null)

Constructor

Parameters
parent:DisplayObjectContainer (default = null) — The parent DisplayObjectContainer on which to add this InputText.
 
xpos:Number (default = 0) — The x position to place this component.
 
ypos:Number (default = 0) — The y position to place this component.
 
text:String — The string containing the initial text of this component.
 
defaultHandler:Function (default = null) — The event handling function to handle the default event for this component (change in this case).
Method Detail
addChildren () method
override protected function addChildren():void

Creates and adds child display objects.

draw () method  
override public function draw():void

Draws the visual ui of the component.

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

Initializes the component.

onChange () method  
protected function onChange(event:Event):void

Internal change handler.

Parameters

event:Event — The Event passed by the system.