Le Mon, 17 Nov 2003 11:25:18 -0500 Thomas DeWeese <[EMAIL PROTECTED]> me disait que :
> Jean-Christophe ARNU (JX) wrote: > > > I use Batik for about 8 month now to display maps. I managed to get > > what I > > wanted to until today. I made a CVS Update of the sources and I recompile > > xml-batik and my app with the new jar. > > Hi Jean, > Sorry to hear this. Well, it might be a "bricolage"-of-mine around batik... > It isn't clear to me if you are using Batik's normal behavior here or > some > custom code (Batik doesn't really have context menus). In fact I use an Interactor which only reacts to Right mouse button and some keys interactions (filtered via startInteraction() method). > Well all CVS commits are sent to batik-dev so you can search the > archives. Also you can use the viewCVS interface to browse the changes to > individual source files. Ok for this... (might be long but necessary reading :) ) > > If I have an always_dynamic behaviour, will I have automatically to > > code a > > componentListener to handle Resizing and show/hidden events from the > > container? > > No as far as I am aware there have been no intentional changes to > how resizing is handled in the default applications. I did do some > refactoring of the code, so it is possible that if you were overriding > methods some of the behavior of those methods has changed (JSVGComponent > being the most likely source of problems). If you are familiur with CVS you > can get differences for entire subtrees (like all of swing). > > If you can give me more information on how your application works it > might > jog some memories. Ok. Let's see : I use a class inherinting from JSVGCanvas (which only defines a method to get the bridge context of the canvas). I instanciate this class to the svgPanel object. I set it double buffered I add a GVTTreeBuildListener (which retrives the elements I need to get to perform interaction on left click (give information on the pointed object i.e. add click event listener to them.I add DOMListeners to the bridge context of the svgPanel object then I set it dynamic.) I set the document URI I set the document state to ALWAYS_DYNAMIC and finally I set the default interactors : svgPanel.setEnablePanInteractor(true); svgPanel.setEnableZoomInteractor(true); svgPanel.setEnableRotateInteractor(false); Then I tried two solutions : let the component act naturally (resizing, showing, and so on) or use a component listener to resize or show (adding a method update() to the svgcanvas inherited class which calls scheduleGVTRendering(). Both does not work. Nothing else. FYI the interactor startInteraction() endInteraction() methods are the following (=> all interactions out of left clic) public boolean startInteraction(java.awt.event.InputEvent ie){ if (ie.getClass()==java.awt.event.MouseEvent.class){ return (((java.awt.event.MouseEvent)ie).getButton()!=1); } else return true; } public boolean endInteraction(){return true;} Final precision : Dynamicity (i.e. adding elements to the document dynamically from a database) works well as well as contextual menus. The "hangs" occurs while I try to : 1) resize the component (whereas it only locks the resizing but not others interaction) 2) zoom : all is hung! I hope this would help. Hope we could get the code work. Thank you by advance! :) -- Jean-Christophe Arnu Paratronic Toulouse
pgp00000.pgp
Description: PGP signature