Apache Flex 4.16.1 API Reference | All Packages | All Classes | Index | Frames No Frames |
ApplyFormatToElementOperation

Package | flashx.textLayout.operations
Class | public class ApplyFormatToElementOperation
Inheritance | ApplyFormatToElementOperation FlowElementOperation FlowTextOperation FlowOperation Object

Language Version : | ActionScript 3.0

Runtime Versions : | Flash Player 10, AIR 1.5

The ApplyFormatToElementOperation class encapsulates a style change to an element.

This operation applies one or more formats to a flow element.

See also

flashx.textLayout.edit.EditManager
flashx.textLayout.formats.TextLayoutFormat
flashx.textLayout.events.FlowOperationEvent

Public Properties
Hide Inherited Public Properties
Show Inherited Public Properties

| Property | Defined By
--- | --- | ---
|  | absoluteEnd : int The absolute end point of the range of text to which this operation is applied. | FlowTextOperation
|  | absoluteStart : int The absolute start point of the range of text to which this operation is applied. | FlowTextOperation
|  | beginGeneration : uint [read-only] The text flow generation before the operation. | FlowOperation
|  | endGeneration : uint [read-only] The text flow generation after the operation. | FlowOperation
|  | format : ITextLayoutFormat The character formats applied in this operation. | ApplyFormatToElementOperation
|  | originalSelectionState : SelectionState The selection state at the start of the operation. | FlowTextOperation
|  | relativeEnd : int An offset from the start of the targetElement. | FlowElementOperation
|  | relativeStart : int An offset from the beginning of the targetElement. | FlowElementOperation
|  | targetElement : FlowElement Specifies the element this operation modifies. | FlowElementOperation
|  | textFlow : TextFlow The TextFlow object to which this operation is applied. | FlowOperation
|  | userData : * Arbitrary data associated with an element. | FlowOperation

Public Methods
Hide Inherited Public Methods
Show Inherited Public Methods

| Method | Defined By
--- | --- | ---
|  | ApplyFormatToElementOperation(operationState:SelectionState, targetElement:FlowElement, format:ITextLayoutFormat, relativeStart:int = 0, relativeEnd:int = -1) Creates an ApplyFormatToElementOperation object. | ApplyFormatToElementOperation
|  | canUndo():Boolean Test if this operation be placed on the undo stack. | FlowOperation
|  | doOperation():Boolean Executes the operation. | FlowOperation
|  | redo():SelectionState [override] Re-executes the operation. | FlowTextOperation
|  | undo():SelectionState Reverses the operation. | FlowOperation

Property Detail

format | property

`format:ITextLayoutFormat`

Language Version : | ActionScript 3.0

Runtime Versions : | Flash Player 10, AIR 1.5

The character formats applied in this operation.

If `null` no character formats are changed.

Implementation
`public function get format():ITextLayoutFormat`
`public function set format(value:ITextLayoutFormat):void`
Constructor Detail

ApplyFormatToElementOperation | () | Constructor

`public function ApplyFormatToElementOperation(operationState:SelectionState, targetElement:FlowElement, format:ITextLayoutFormat, relativeStart:int = 0, relativeEnd:int = -1)`

Language Version : | ActionScript 3.0

Runtime Versions : | Flash Player 10, AIR 1.5

Creates an ApplyFormatToElementOperation object.

Parameters

| `operationState:SelectionState` — Specifies the text flow containing the element to which this operation is applied.
| `targetElement:FlowElement` — specifies the element to which this operation is applied.
| `format:ITextLayoutFormat` — The formats to apply in this operation.
| `relativeStart:int` (default = `0`)``
| `relativeEnd:int` (default = `-1`)``

Wed Nov 15 2017, 09:50 AM +01:00