AT&T Home | AT&T Labs | Research
AT&T Labs, Inc. - Research

The Yoix® Scripting Language

Home | What's New | Grammar | Documentation | Download | License | YDAT | YWAIT | Byzgraf | FAQs
getHighlights (Object comp, [, int fields [, int flags]]) yoix.swing
 
Returns an Array that describes the current text highlights (there can be more than one) in comp, which must be a JTextArea, JTextField, or JTextPane. The amount of information that is returned depends on the optional fields and flags arguments. Omitting fields, or setting it to 2, means only include starting and ending integer offsets of the highlights in the array. Setting fields to 3 means include the color of each highlight, right after its ending offset. Setting fields to 4 means include flags that identify the type of each highlight (1 means the caret, 2 means the owner of the caret, 4 covers everything else). Omitting flags or setting it to 0, means include information about all highlights, otherwise it is used to select highlights based on the type flags that we just described.

Text can be highlighted by user actions (e.g., by dragging the mouse) or by the setHighlights builtin, but in all cases what actually happens is controlled by the highlightflags field that is defined in a JTextArea, JTextField, and JTextPane.
 
 Return:   Array
 
 See Also:   JTextArea, JTextField, JTextPane, setHighlights

 

Yoix is a registered trademark of AT&T Intellectual Property.