Packageflashx.textLayout.operations
Classpublic class CompositeOperation
InheritanceCompositeOperation Inheritance FlowOperation Inheritance Object

Language Version : ActionScript 3.0
Runtime Versions : Flash Player 10, AIR 1.5

The CompositeOperation class encapsulates a group of transformations managed as a unit.

The CompositeOperation class provides a grouping mechanism for combining multiple FlowOperations into a single atomic operation. Grouping operations allows them to be undone and redone as a unit. For example, several single character inserts followed by several backspaces can be undone together as if they were a single operation. Grouping also provides a mechanism for representing complex operations. For example, a replace operation that modifies more than one text ranges can be represented and managed as a single composite operation.

Note: It can be more efficient to merge individual atomic operations rather than to combine separate operations into a group. For example, several sequential character inserts can easily be represented as a single insert operation, and undoing or redoing that single operation is more efficient than undoing or redoing a group of insert operations.

See also

flashx.textLayout.edit.EditManager
flashx.textLayout.events.FlowOperationEvent


Public Properties
 PropertyDefined By
 InheritedbeginGeneration : uint
[read-only] The text flow generation before the operation.
FlowOperation
 InheritedendGeneration : uint
[read-only] The text flow generation after the operation.
FlowOperation
  operations : Array
An array containing the operations grouped by this composite operation.
CompositeOperation
 InheritedtextFlow : TextFlow
The TextFlow object to which this operation is applied.
FlowOperation
 InheriteduserData : *
Arbitrary data associated with an element.
FlowOperation
Public Methods
 MethodDefined By
  
CompositeOperation(operations:Array = null)
Creates a CompositeOperation object.
CompositeOperation
  
addOperation(operation:FlowOperation):void
Adds an additional operation to the end of the list.
CompositeOperation
 Inherited
canUndo():Boolean
Test if this operation be placed on the undo stack.
FlowOperation
 Inherited
doOperation():Boolean
Executes the operation.
FlowOperation
 Inherited
Re-executes the operation.
FlowOperation
 Inherited
Reverses the operation.
FlowOperation
Property Detail
operationsproperty
operations:Array

Language Version : ActionScript 3.0
Runtime Versions : Flash Player 10, AIR 1.5

An array containing the operations grouped by this composite operation.


Implementation
    public function get operations():Array
    public function set operations(value:Array):void
Constructor Detail
CompositeOperation()Constructor
public function CompositeOperation(operations:Array = null)

Language Version : ActionScript 3.0
Runtime Versions : Flash Player 10, AIR 1.5

Creates a CompositeOperation object.

Parameters
operations:Array (default = null) — The operations to group.
Method Detail
addOperation()method
public function addOperation(operation:FlowOperation):void

Language Version : ActionScript 3.0
Runtime Versions : Flash Player 10, AIR 1.5

Adds an additional operation to the end of the list.

The new operation must operate on the same TextFlow object as the other operations in the list.

Parameters

operation:FlowOperation