Yaroslav Bulatov: > Actually the reason I want to provide my own implementation is to > enable XForms events generated by another framework (Chiba) to > propagate to the DOM hierarchy generated by Batik.
Ok. > Right now those XForms events are dispatched through > org.apache.batik.dom.events.EventSupport.dispatch(), which discards > all events that are not instances of w3c's CustomEvent or batik's > AbstractEvent > > Since I can't get Chiba to usea different implementation for event > generation, I understand that I must provide my own DOMImplementation > which overrides getEventSupport and getDocumentEventSupport to provide > my own event support classes. In particular my version of EventSupport > would override "dispatchEvent" to wrap Chiba's XFormsEvent into an > implementation compatible with Batik, and call the original > dispatchEvent method. > > The question is -- how do I substitute this DOM implementation into > SVG document loaded into JSVGCanvas using loadSVGDocument? > > As far as I can see, the DOM implementation used when I invoke > JSVGCanvas.loadDocument() is hardcoded to be SVGDOMImplementation (it > uses DocumentLoader, which uses SAXSVGDocumentFactory which uses > SVGDocumentImplementation), so I would need to override at least those > 3 classes, is that correct? Yes. It doesn’t look like the nicest way that Batik can handle foreign event objects (DOM 3 Events doesn’t require it to), but it should work. -- Cameron McCormack, http://mcc.id.au/ xmpp:[EMAIL PROTECTED] ▪ ICQ 26955922 ▪ MSN [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
