Packagecom.adobe.portfolio.components.supportClasses
Classpublic class CustomizableTextArea
InheritanceCustomizableTextArea Inheritance spark.components.TextArea
Implements IListenAndWatch
Subclasses FieldTextArea, SessionTextArea

A text area that is capable of providing both single- and multi-line behavior, as well as a context for styling text.

Default MXML Propertycontent



Public Properties
 PropertyDefined By
  allowStyling : Boolean
A boolean indicating whether or not this component supports styled text.
CustomizableTextArea
  forceMeasuredWidth : Number
The number to be used as the measuredWidth when measure() is called for this component.
CustomizableTextArea
  multiline : Boolean
A boolean indicating whether or not this component supports multiline text.
CustomizableTextArea
Protected Properties
 PropertyDefined By
  pendingChanges : Boolean = false
True if changes to the text have been made that have not yet been applied.
CustomizableTextArea
Public Methods
 MethodDefined By
  
Default constructor
CustomizableTextArea
  
A function to add event listeners and change watchers required by this canvas list.
CustomizableTextArea
  
Clears the property context for this text component as the current property context.
CustomizableTextArea
  
A function to clean up event listeners and change watchers required by this canvas list.
CustomizableTextArea
  
Sets the property context for this text component as the current property context.
CustomizableTextArea
  
textAreaHasFocus(focusManager:IFocusManager):Boolean
[static] Return true if a TextArea component currently has focus.
CustomizableTextArea
Protected Methods
 MethodDefined By
  
[override]
CustomizableTextArea
  
measure():void
[override]
CustomizableTextArea
  
onCreationComplete(event:FlexEvent):void
Event listener invoked when this component is created..
CustomizableTextArea
  
Event listener invoked on CollectionManagerEvents.
CustomizableTextArea
  
onTextChanged(event:TextOperationEvent):void
Event listener invoked when this components text is changed by the user.
CustomizableTextArea
  
partAdded(partName:String, instance:Object):void
[override]
CustomizableTextArea
  
Applies pending text changes to the data model.
CustomizableTextArea
  
setTextDirection(textStr:String):void
A function that is invoked when the text direction is changed.
CustomizableTextArea
  
Updates this component's text based on the data model.
CustomizableTextArea
  
Returns true if this component should be editable by the user.
CustomizableTextArea
  
Updates the editable state of this component based on current state.
CustomizableTextArea
Skin States

To skin the component, implement a skin that defines the following states. Although you must implement all skin states, a skin state can be empty. An empty skin state specifies no changes to the default skin state.


 Skin State Description Defined By
  
disabledMultiline
The disabled state for multiline text. CustomizableTextArea
  
editableMultiline
The editable state for multiline text. CustomizableTextArea
  
normalMultiline
The normal state for multiline text. CustomizableTextArea
Public Constants
 ConstantDefined By
  STATE_DISABLED : String = disabled
[static] A string literal representing the name of the disabled state.
CustomizableTextArea
  STATE_DISABLED_MULTILINE : String = disabledMultiline
[static] A string literal representing the name of the disabled multiline state.
CustomizableTextArea
  STATE_EDITABLE : String = editable
[static] A string literal representing the name of the editable state.
CustomizableTextArea
  STATE_EDITABLE_MULTILINE : String = editableMultiline
[static] A string literal representing the name of the editable multiline state.
CustomizableTextArea
  STATE_NORMAL : String = normal
[static] A string literal representing the name of the normal state.
CustomizableTextArea
  STATE_NORMAL_MULTILINE : String = normalMultiline
[static] A string literal representing the name of the normal multiline state.
CustomizableTextArea
Protected Constants
 ConstantDefined By
  collectionManager : CollectionManager
[static] The navigator's CollectionManager instance.
CustomizableTextArea
Property Detail
allowStylingproperty
allowStyling:Boolean

A boolean indicating whether or not this component supports styled text.

This property can be used as the source for data binding.


Implementation
    public function get allowStyling():Boolean
    public function set allowStyling(value:Boolean):void
forceMeasuredWidthproperty 
public var forceMeasuredWidth:Number

The number to be used as the measuredWidth when measure() is called for this component. This can be used to prevent long text values from affecting the measuredWidth of the parent container. This value is ignored when set to NaN.

multilineproperty 
multiline:Boolean

A boolean indicating whether or not this component supports multiline text.

This property can be used as the source for data binding.


Implementation
    public function get multiline():Boolean
    public function set multiline(value:Boolean):void
pendingChangesproperty 
protected var pendingChanges:Boolean = false

True if changes to the text have been made that have not yet been applied.

Constructor Detail
CustomizableTextArea()Constructor
public function CustomizableTextArea()

Default constructor

Method Detail
addListenAndWatch()method
public function addListenAndWatch():void

A function to add event listeners and change watchers required by this canvas list.

getCurrentSkinState()method 
override protected function getCurrentSkinState():String

Returns
String
loseContext()method 
public function loseContext():void

Clears the property context for this text component as the current property context.

See also

PropertyContext
PropertyManager.setCurrentContext
measure()method 
override protected function measure():void

onCreationComplete()method 
protected function onCreationComplete(event:FlexEvent):void

Event listener invoked when this component is created..

Parameters

event:FlexEvent

onNavHostEvent()method 
protected function onNavHostEvent(event:CollectionManagerEvent):void

Event listener invoked on CollectionManagerEvents.

Parameters

event:CollectionManagerEvent

onTextChanged()method 
protected function onTextChanged(event:TextOperationEvent):void

Event listener invoked when this components text is changed by the user.

Parameters

event:TextOperationEvent

partAdded()method 
override protected function partAdded(partName:String, instance:Object):void

Parameters

partName:String
 
instance:Object

removeListenAndWatch()method 
public function removeListenAndWatch():void

A function to clean up event listeners and change watchers required by this canvas list.

setDataFromText()method 
protected function setDataFromText():void

Applies pending text changes to the data model. Subclasses should override this function.

setTextDirection()method 
protected function setTextDirection(textStr:String):void

A function that is invoked when the text direction is changed.

Parameters

textStr:String

setTextFromData()method 
protected function setTextFromData():void

Updates this component's text based on the data model. Subclasses should override this function.

shouldBeEditable()method 
protected function shouldBeEditable():Boolean

Returns true if this component should be editable by the user.

Returns
Boolean
takeContext()method 
public function takeContext():void

Sets the property context for this text component as the current property context.

See also

PropertyContext
PropertyManager.setCurrentContext
textAreaHasFocus()method 
public static function textAreaHasFocus(focusManager:IFocusManager):Boolean

Return true if a TextArea component currently has focus.

Parameters

focusManager:IFocusManager

Returns
Boolean
updateEditable()method 
protected function updateEditable():void

Updates the editable state of this component based on current state.

Constant Detail
collectionManagerConstant
protected static const collectionManager:CollectionManager

The navigator's CollectionManager instance. All host interaction should go through this instance, rather than the INavigatorHost directly.

STATE_DISABLEDConstant 
public static const STATE_DISABLED:String = disabled

A string literal representing the name of the disabled state.

STATE_DISABLED_MULTILINEConstant 
public static const STATE_DISABLED_MULTILINE:String = disabledMultiline

A string literal representing the name of the disabled multiline state.

STATE_EDITABLEConstant 
public static const STATE_EDITABLE:String = editable

A string literal representing the name of the editable state.

STATE_EDITABLE_MULTILINEConstant 
public static const STATE_EDITABLE_MULTILINE:String = editableMultiline

A string literal representing the name of the editable multiline state.

STATE_NORMALConstant 
public static const STATE_NORMAL:String = normal

A string literal representing the name of the normal state.

STATE_NORMAL_MULTILINEConstant 
public static const STATE_NORMAL_MULTILINE:String = normalMultiline

A string literal representing the name of the normal multiline state.