Hi KWL, "K. W. Landry" <[EMAIL PROTECTED]> wrote on 11/18/2006 09:44:33 PM:
> I have to believe if there were another way you'd mention it, but just in case, > is there another way you'd suggest going about enumerating all active listeners? There isn't a way that I would suggest enumerating listeners. However if you are willing to hack Batik enough it can be done. You would need to replace the standard EventSupport class in the DOM, by overriding batik.dom.AbstractDOMImplementation.createEventSupport, to return a custom subclass of batik.dom.events.EventSupport that exposed public getters for the capturingListenrs and bubblingListeners HashTables. Then you could call 'getEventSupport()' on any node and get those two HashTables which would give you all the active listeners. The main problem with this is that you will likely be surprised at the number of listeners that are present on even a simple document as Batik uses listeners to implement much if it's own update/change management and you will see these listeners mixed with your own... > I know in the API there is an org.apache.batik.dom.events.EventListenerList, I > haven't been able to get it to work as I would like, however. > > Any thoughts appreciated, > > Thanks, > > KWL > On 11/17/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Hi K. W. > > "K. W. Landry" <[EMAIL PROTECTED]> wrote on 11/13/2006 10:34:33 PM: > > > Anyone have an example of iterating through a DOM to return all active > > Listeners (of any flavor)? > > To my knowledge this can't be done in DOM. > > > --------------------------------------------------------------------- > 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]
