xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gerard Murphy <gerardtmur...@yahoo.com>
Subject Graphics2D and events
Date Wed, 11 Jan 2006 23:32:25 GMT
How can I add onClick and onMouseOver events to the
generated svg output?  I am using the SVGGraphics2D
object and can draw my objects using it.  What I would
like is to be able to associate certain objects within
the document with mouse events.

Here is a snipet where the draw method uses the
Graphics2D object to render various types of objects.

            DOMImplementation domImpl =
            Document document =
SVGDOMImplementation.SVG_NAMESPACE_URI, "svg", null );

            SVGGraphics2D svgG2D = new SVGGraphics2D(
document );
            svgG2D.setSVGCanvasSize( new Dimension(
dim.width + borderWidth, dim.height + borderHeight) );

            draw( svgG2D );

            ByteArrayOutputStream baos = new
ByteArrayOutputStream( 8192 );
            Writer svgOutput = new OutputStreamWriter(
baos, "UTF-8" );
            svgG2D.stream( svgOutput, true);

Any help would be appreciated.


Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 

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

View raw message