Packageflexlib.controls
Classpublic class Highlighter



Public Properties
 PropertyDefined by
  bitmap : Bitmap
The Bitmap object used for drawing the highlights.
Highlighter
  field : TextField
The TextField being highlighted.
Highlighter
  highlightColor : uint
The color used to highlight strings (RGBA).
Highlighter
  xOffset : Number
The horizontal offset for highlights.
Highlighter
  yOffset : Number
The vertical offset for highlights.
Highlighter
Public Methods
 MethodDefined by
  
highlightBoundaries(stringBoundries:StringBoundaries):void
Highlighter
  
highlightNext(word:String, caseSensitive:Boolean = true):void
Highlights the first instance of a string after the cursor position.
Highlighter
  
highlightPrevious(word:String, caseSensitive:Boolean = true):void
Highlights the first instance of a string before the cursor position.
Highlighter
  
highlightWordInstances(word:String, caseSensitive:Boolean = true):void
Highlights all instances of a string.
Highlighter
  
reset():void
Resets the Highlighter, clearing all visible highlights and emptying the array of character boundaries.
Highlighter
Property detail
bitmapproperty
public var bitmap:Bitmap

The Bitmap object used for drawing the highlights. Publicly exposed so that effects can be applied if desired.

fieldproperty 
public var field:TextField

The TextField being highlighted.

highlightColorproperty 
public var highlightColor:uint

The color used to highlight strings (RGBA).

The default value is 0xffff0000 (red).

xOffsetproperty 
public var xOffset:Number

The horizontal offset for highlights.

The default value is 0.

yOffsetproperty 
public var yOffset:Number

The vertical offset for highlights.

The default value is 0.

Method detail
highlightBoundaries()method
public function highlightBoundaries(stringBoundries:StringBoundaries):voidParameters
stringBoundries:StringBoundaries
highlightNext()method 
public function highlightNext(word:String, caseSensitive:Boolean = true):void

Highlights the first instance of a string after the cursor position.

Parameters
word:String — The string to find and highlight.
 
caseSensitive:Boolean (default = true)
highlightPrevious()method 
public function highlightPrevious(word:String, caseSensitive:Boolean = true):void

Highlights the first instance of a string before the cursor position.

Parameters
word:String — The string to find and highlight.
 
caseSensitive:Boolean (default = true)
highlightWordInstances()method 
public function highlightWordInstances(word:String, caseSensitive:Boolean = true):void

Highlights all instances of a string.

Parameters
word:String — The string to find and highlight.
 
caseSensitive:Boolean (default = true)
reset()method 
public function reset():void

Resets the Highlighter, clearing all visible highlights and emptying the array of character boundaries.