George Armhold wrote:
Thomas DeWeese wrote:
> What you really have is an interactor that can do one of two things.
> On mouse down your interactor starts, if the mouse moves you setup
> to add a line, when the mouse goes up - if there has been motion you
> want to draw the line - if there has not been motion you want to
> fire the link under cursor (if there is one).
OK, that sounds doable... if it's possible to figure out whether there
is currently a link under the cursor. Since we are dealing with AWT
MouseEvents I suspect this is not straightforward.
I'd have to look at the code but you should be able to
'manually' dispatch an AWT Click event to the canvas so it does it
for you.
> So I took a look at the source. linkActivationListers are notifed
> when a link is traversed but the link is still traversed - so this
> might be useful if you wanted to create a history log or some such.
So does that mean that JSVGComponent is trying to launch the browser
itself? And I'm merely getting a log message about it?
Correct, except it's not trying to launch the browser it's just trying
to display the link as SVG.
> I think what you want to do is provide a custom SVGUserAgent and
> implement openLink to forward the link to showDocument. Right now
> the Canvas tries to open the link and apparently fails - not sure
> why you don't get notified some how.
From the API, it looks like implementing SVGUserAgent is not trivial.
I see a org.apache.batik.bridge.UserAgentAdaptor that has all the
required methods, but it seems to implement UserAgent rather than
SVGUserAgent, so maybe this is really not the right path to take.
Take a look at batik.apps.svgbrowser.JSVGViewerFrame It has
a complete implementation that you can either subclass that or
just copy it. I'll look into providing an Adapter implementation.
Thanks again for your time.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]