You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by th...@kodak.com on 2007/01/01 02:28:10 UTC

Re: TextSelectionEvent

Hi K.W.

"K. W. Landry" <kw...@gmail.com> wrote on 12/31/2006 02:17:11 PM:

> Just a quick question, I guess I'm having trouble getting my head 
> around where DOMTextEvent is best used. What is the difference, if 
> any, between using DOMTextEvent and doing an addEventListener such as: 

  A DOMTextEvent instance is what is passed into the 'handleEvent' 
method of your listener.

> Is DOMTextEvent strictly for creating/generating an Event of the 
> type Text Event?

   Yes, essentially.

> If so, then what is DOMTextEvent.getData for? Is 
> this where the implementation provides the data to the calling 
> method of the data the implementation represents as the Text in the 
event? 

  Text events (as opposed to key events) allows for the possability of
many "characters" being delivered at once (for example due to the use of
a complex input method - think voice recog, or Chinese/Japanese), 
'getData' 
returns the string of characters input.

For details check out:
http://www.w3.org/TR/DOM-Level-3-Events/events.html#Events-TextEvents-Interfaces