Packagecom.kapit.diagram.actions
Classpublic class TextEditAction
InheritanceTextEditAction Inheritance ComplexAction Inheritance Action



Public Properties
 PropertyDefined by
 Inheritedactivated : Boolean
Indicates whether this ComplexAction is activated or not.
ComplexAction
 Inheritedid : String
ID of this action.
Action
 Inheritedmanager : ActionsManager
The ActionsManager instance controlling this action (cursors, properties...).
Action
 Inheritedsource : IDiagramElement
The DiagramElement instance that has triggered this action.
Action
 Inheritedview : DiagramView
The DiagramView instance where this action has been triggered.
Action
Protected Properties
 PropertyDefined by
 Inherited_activated : Boolean = false
Activation status of this complex action.
ComplexAction
 Inherited_cursorid : int = -1
Cursor ID to be used by this complex action.
ComplexAction
 Inherited_id : String
ID reference of the action.
Action
 Inherited_manager : ActionsManager = null
ActionsManager dealing with the control of this action.
Action
  _prevtext : String = "null"
String holding the previous text before text edition started.
TextEditAction
 Inherited_source : IDiagramElement = null
The DiagramElement that has triggered this action.
Action
  _text : SVGTextElement = null
SVGTextElement generated after TextEditAction is performed successfully (to be appended to the SVGDocument of the edited diagram).
TextEditAction
  _textfield : TextField = null
TextField linked to this TextEditAction (created and displayed when this action is executed).
TextEditAction
 Inherited_view : DiagramView
The DiagramView where this action has been triggered.
Action
Public Methods
 MethodDefined by
  
Creates a new TextEditionAction instance having "textedit" as ID.
TextEditAction
  
abort():void
Aborts the TextEditAction processing and recovers the previous TextField content.
TextEditAction
 Inherited
changeCursor(cursorclass:Class, dx:Number, dy:Number):void
Changes the current cursor.
ComplexAction
  
execute(dob:IDiagramElement = null, event:Event = null, args:Array = null):Boolean
Executes the tasks of this action.
TextEditAction
 Inherited
removeCursor():void
Removes the used cursor.
ComplexAction
 Inherited
rollOut(dob:IDiagramElement, event:MouseEvent):void
Sets the roll out reaction given a DiagramElement and a mouse event.
ComplexAction
 Inherited
rollOver(dob:IDiagramElement, event:MouseEvent):void
Sets the roll over reaction given a DiagramElement and a mouse event.
ComplexAction
  
terminate(success:Boolean):void
Terminates the execution of this action with a termination status equal to success.
TextEditAction
 Inherited
uiCompleted():void
ComplexAction
Protected Methods
 MethodDefined by
  
changeHandler(event:Event):void
TextEditAction
  
handleKeyDown(event:KeyboardEvent):void
TextEditAction
  
handleKeyUp(event:KeyboardEvent):void
Performs test on a pressed key to perform a special processing.
TextEditAction
  
killFocus(event:FocusEvent):void
When the user leaves focus on the edited text field, this function will be called to validate user modifications and to terminate the TextEditAction processing.
TextEditAction
Property detail
_prevtextproperty
protected var _prevtext:String = "null"

String holding the previous text before text edition started.

_textproperty 
protected var _text:SVGTextElement = null

SVGTextElement generated after TextEditAction is performed successfully (to be appended to the SVGDocument of the edited diagram).

_textfieldproperty 
protected var _textfield:TextField = null

TextField linked to this TextEditAction (created and displayed when this action is executed).

Constructor detail
TextEditAction()constructor
public function TextEditAction()

Creates a new TextEditionAction instance having "textedit" as ID.

Method detail
abort()method
public override function abort():void

Aborts the TextEditAction processing and recovers the previous TextField content.

changeHandler()method 
protected function changeHandler(event:Event):voidParameters
event:Event
execute()method 
public override function execute(dob:IDiagramElement = null, event:Event = null, args:Array = null):Boolean

Executes the tasks of this action. It creates a TextField component where we can input text as SVGTextElement.

Parameters
dob:IDiagramElement (default = null) — DiagramElement instance where this action has been triggered.
 
event:Event (default = null) — The triggered Event.
 
args:Array (default = null) — Parameters used in the execution of this action.

Returns
Boolean — Termination status of the execution of this action.
handleKeyDown()method 
protected function handleKeyDown(event:KeyboardEvent):voidParameters
event:KeyboardEvent
handleKeyUp()method 
protected function handleKeyUp(event:KeyboardEvent):void

Performs test on a pressed key to perform a special processing. In this case, the function is senstive to the delete KeyboardAction and given this KeyboardEvent, it prevents processing of any event listeners in nodes subsequent to the current node in the event flow.

Parameters
event:KeyboardEvent — Detetcted KeyboardEvent instance.
killFocus()method 
protected function killFocus(event:FocusEvent):void

When the user leaves focus on the edited text field, this function will be called to validate user modifications and to terminate the TextEditAction processing.

Parameters
event:FocusEvent — Detected FocusEvent (due to losing focus on the TextField)
terminate()method 
public override function terminate(success:Boolean):void

Terminates the execution of this action with a termination status equal to success. A true value of the success parameter indicates that the action has been successfuly finished, while a false value indicates that the action has been aborted.

Parameters
success:Boolean — Termination status of this action. A true value indicates that this action has been successfuly finished, while a false value indicates that the action has been aborted.