Apache Flex 4.16.0 API Reference | All Packages | All Classes | Index | Frames No Frames |
SelectionFormat

Package | flashx.textLayout.edit
Class | public class SelectionFormat
Inheritance | SelectionFormat Object

Language Version : | ActionScript 3.0

Runtime Versions : | Flash Player 10, AIR 1.5

The SelectionFormat class defines the properties of a selection highlight.

See also

flashx.textLayout.edit.ISelectionManager
flashx.textLayout.edit.SelectionManager

Public Properties

| Property | Defined By
--- | --- | ---
|  | pointAlpha : Number [read-only] The alpha for drawing the cursor. | SelectionFormat
|  | pointBlendMode : String [read-only] The blend mode for drawing the cursor. | SelectionFormat
|  | pointBlinkRate : Number [read-only] The rate at which the cursor blinks, in milliseconds. | SelectionFormat
|  | pointColor : uint [read-only] The color for drawing the cursor. | SelectionFormat
|  | rangeAlpha : Number [read-only] The alpha for drawing the highlight of a range selection. | SelectionFormat
|  | rangeBlendMode : String [read-only] The blending mode for drawing the highlight of a range selection. | SelectionFormat
|  | rangeColor : uint [read-only] The color for drawing the highlight of a range selection. | SelectionFormat

Public Methods

| Method | Defined By
--- | --- | ---
|  | SelectionFormat(rangeColor:uint = 0xffffff, rangeAlpha:Number = 1.0, rangeBlendMode:String = difference, pointColor:uint = 0xffffff, pointAlpha:Number = 1.0, pointBlendMode:String = difference, pointBlinkRate:Number = 500) Creates a SelectionFormat object with the specified properties. | SelectionFormat
|  | equals(selectionFormat:SelectionFormat):Boolean Determines whether this SelectionFormat object has the same property values as another SelectionFormat object. | SelectionFormat

Property Detail

pointAlpha | property

`pointAlpha:Number` [read-only]

Language Version : | ActionScript 3.0

Runtime Versions : | Flash Player 10, AIR 1.5

The alpha for drawing the cursor. Valid values are between 0 (completely transparent) and 1 (completely opaque, which is the default).

Setting the `pointAlpha` and `rangeAlpha` properties to zero disables selection highlighting.

Implementation
`public function get pointAlpha():Number`

See also

rangeAlpha

pointBlendMode | property |

`pointBlendMode:String` [read-only]

Language Version : | ActionScript 3.0

Runtime Versions : | Flash Player 10, AIR 1.5

The blend mode for drawing the cursor.

Implementation
`public function get pointBlendMode():String`

See also

flash.display.BlendMode

pointBlinkRate | property |

`pointBlinkRate:Number` [read-only]

Language Version : | ActionScript 3.0

Runtime Versions : | Flash Player 10, AIR 1.5

The rate at which the cursor blinks, in milliseconds.

Implementation
`public function get pointBlinkRate():Number`

pointColor | property |

`pointColor:uint` [read-only]

Language Version : | ActionScript 3.0

Runtime Versions : | Flash Player 10, AIR 1.5

The color for drawing the cursor.

Implementation
`public function get pointColor():uint`

rangeAlpha | property |

`rangeAlpha:Number` [read-only]

Language Version : | ActionScript 3.0

Runtime Versions : | Flash Player 10, AIR 1.5

The alpha for drawing the highlight of a range selection. Valid values are between 0 (completely transparent) and 1 (completely opaque, which is the default).

Setting the `pointAlpha` and `rangeAlpha` properties to zero disables selection highlighting.

Implementation
`public function get rangeAlpha():Number`

See also

pointAlpha

rangeBlendMode | property |

`rangeBlendMode:String` [read-only]

Language Version : | ActionScript 3.0

Runtime Versions : | Flash Player 10, AIR 1.5

The blending mode for drawing the highlight of a range selection.

Implementation
`public function get rangeBlendMode():String`

See also

flash.display.BlendMode

rangeColor | property |

`rangeColor:uint` [read-only]

Language Version : | ActionScript 3.0

Runtime Versions : | Flash Player 10, AIR 1.5

The color for drawing the highlight of a range selection.

Implementation
`public function get rangeColor():uint`
Constructor Detail

SelectionFormat | () | Constructor

`public function SelectionFormat(rangeColor:uint = 0xffffff, rangeAlpha:Number = 1.0, rangeBlendMode:String = difference, pointColor:uint = 0xffffff, pointAlpha:Number = 1.0, pointBlendMode:String = difference, pointBlinkRate:Number = 500)`

Language Version : | ActionScript 3.0

Runtime Versions : | Flash Player 10, AIR 1.5

Creates a SelectionFormat object with the specified properties.

A SelectionFormat created with the default values will use black for the highlight colors, 1.0 for the alphas, and BlendMode.DIFFERENCE for the blending modes. The cursor blink rate is 500 milliseconds.

Setting the `pointAlpha` and `rangeAlpha` properties to zero disables selection highlighting.

Non-zero blink rate is only used when an EditManager is attached to the TextFlow.

Parameters

| `rangeColor:uint` (default = `0xffffff`)`` — The color for drawing the highlight.
| `rangeAlpha:Number` (default = `1.0`)`` — The transparency value for drawing the highlight. Valid values are between 0 (completely transparent) and 1 (completely opaque, which is the default).
| `rangeBlendMode:String` (default = `difference`)`` — The blend mode for drawing the highlight. Use constants defined in the BlendMode class to set this parameter.
| `pointColor:uint` (default = `0xffffff`)`` — The color for the drawing cursor.
| `pointAlpha:Number` (default = `1.0`)`` — The transparency value for drawing the cursor. Valid values are between 0 (completely transparent) and 1 (completely opaque, which is the default).
| `pointBlendMode:String` (default = `difference`)`` — The blend mode for drawing the cursor. Use constants defined in the BlendMode class to set this parameter.
| `pointBlinkRate:Number` (default = `500`)`` — The rate at which the cursor blinks, in milliseconds.

See also

flash.display.BlendMode
pointAlpha
rangeAlpha
Method Detail

equals | () | method

`public function equals(selectionFormat:SelectionFormat):Boolean`

Language Version : | ActionScript 3.0

Runtime Versions : | Flash Player 10, AIR 1.5

Determines whether this SelectionFormat object has the same property values as another SelectionFormat object.

Parameters

| `selectionFormat:SelectionFormat` — the SelectionFormat to compare against.

Returns

| `Boolean` — `true`, if the property values are identical; `false`, otherwise.

Sun Mar 5 2017, 03:42 PM +11:00