Adobe® Flex® 4 Language Reference
Show Packages and Classes List |  Packages  |  Classes  |  Index  |  Appendixes
flashx.textLayout.operations 
CompositeOperation 
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



Public Properties
 PropertyDefined By
 InheritedbeginGeneration : uint
[read-only] The text flow generation before the operation.
FlowOperation
 Inheritedconstructor : Object
A reference to the class object or constructor function for a given object instance.
Object
 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
 Inheritedprototype : Object
[static] A reference to the prototype object of a class or function object.
Object
 InheritedtextFlow : flashx.textLayout.elements: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
  
Adds an additional operation to the end of the list.
CompositeOperation
 Inherited
Test if this operation be placed on the undo stack.
FlowOperation
 Inherited
Executes the operation.
FlowOperation
 Inherited
Indicates whether an object has a specified property defined.
Object
 Inherited
Indicates whether an instance of the Object class is in the prototype chain of the object specified as the parameter.
Object
 Inherited
Indicates whether the specified property exists and is enumerable.
Object
 Inherited
Re-executes the operation.
FlowOperation
 Inherited
Sets the availability of a dynamic property for loop operations.
Object
 Inherited
Returns the string representation of this object, formatted according to locale-specific conventions.
Object
 Inherited
Returns the string representation of the specified object.
Object
 Inherited
Reverses the operation.
FlowOperation
 Inherited
Returns the primitive value of the specified object.
Object
Property Detail

operations

property
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