Package | flashx.textLayout.operations |
Class | public class CompositeOperation |
Inheritance | CompositeOperation FlowOperation Object |
Language Version: | ActionScript 3.0 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
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.
Related API Elements
Property | Defined By | ||
---|---|---|---|
beginGeneration : uint [read-only]
The text flow generation before the operation. | FlowOperation | ||
constructor : Object
A reference to the class object or constructor function for a given object instance. | Object | ||
endGeneration : uint [read-only]
The text flow generation after the operation. | FlowOperation | ||
operations : Array
An array containing the operations grouped by this composite operation. | CompositeOperation | ||
textFlow : flashx.textLayout.elements:TextFlow
The TextFlow object to which this operation is applied. | FlowOperation | ||
userData : *
Arbitrary data associated with an element. | FlowOperation |
Method | Defined By | ||
---|---|---|---|
CompositeOperation(operations:Array = null)
Creates a CompositeOperation object. | CompositeOperation | ||
Adds an additional operation to the end of the list. | CompositeOperation | ||
Test if this operation be placed on the undo stack. | FlowOperation | ||
Executes the operation. | FlowOperation | ||
Indicates whether an object has a specified property defined. | Object | ||
Indicates whether an instance of the Object class is in the prototype chain of the object specified
as the parameter. | Object | ||
Indicates whether the specified property exists and is enumerable. | Object | ||
Re-executes the operation. | FlowOperation | ||
Sets the availability of a dynamic property for loop operations. | Object | ||
Returns the string representation of this object, formatted according to locale-specific conventions. | Object | ||
Returns the string representation of the specified object. | Object | ||
Reverses the operation. | FlowOperation | ||
Returns the primitive value of the specified object. | Object |
operations | property |
CompositeOperation | () | Constructor |
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 |
Thu Dec 6 2018, 01:12 PM -08:00