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.
See also
Property | Defined By | ||
---|---|---|---|
beginGeneration : uint [read-only]
The text flow generation before the operation. | FlowOperation | ||
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 : 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 | ||
addOperation(operation:FlowOperation):void
Adds an additional operation to the end of the list. | CompositeOperation | ||
canUndo():Boolean
Test if this operation be placed on the undo stack. | FlowOperation | ||
doOperation():Boolean
Executes the operation. | FlowOperation | ||
Re-executes the operation. | FlowOperation | ||
Reverses the operation. | FlowOperation |
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.
public function get operations():Array
public function set operations(value:Array):void
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.
Parametersoperations:Array (default = null ) — The operations to group.
|
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 |