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 Thomas DeWeese <Th...@Kodak.com> on 2005/03/05 20:34:58 UTC

Re: How do get the text that has been highligted

Thomas DeWeese wrote:
> Hi Keith,
> 
> Keith Mayfield wrote:
> 
>> After a user has selected some text on the JSVGCanvas,
>> which api's would give me the text that has been
>> selected.  Some sample code would be great!!!
> 
> 
>    Well the short answer is that it isn't that easy :/

    I just delivered an update to CVS.

    This is now much easier, you can now access the TextSelectionManager
from the JSVGCanavas.  This lets you do one of two things,
first you can register a selection listener and be notified as
the selection changes, or the SelectionManager has a 'getSelection'
method that returns the current selection (if any).


    canvas.getTextSelectionManager().getSelection();

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org