Hi Nedim, > > Nedim Skalonjic <[EMAIL PROTECTED]> wrote on 11/16/2005 04:57:06 AM: > > > > > I m trying to develop a SVG viewer/browser written in Java as > > > part of my project. I m using Apache-Batik framework. The app > > > is working fine but I would like an added functionality of a > > > button on the GUI that when pressed will simulate ctrl key, > > > in that when pressed I will be able to select the area I wish > > > to zoom in with the mouse...
> --- In [email protected], [EMAIL PROTECTED] wrote: > > [..] the easiest way to accomplish this would be to modify the existing > > ZoomInteractor (the current one is an anonymous inner class in > > batik.swing.JSVGCanvas) so that in it's rather than checking if > > the ctrl key is down (in it's startInteraction method) it checks > > if the 'zoom mode' button has been pressed. You will probably > > need to do something with the cursor as well - so users know what > > mode they are in, there will also need to be some way to 'cancel' > > zoom mode of course. Nedim Skalonjic <[EMAIL PROTECTED]> wrote on 11/16/2005 04:57:06 AM: > I am a newbie with SVG and Batik framework so if you could be more > clear as to what exactly i ll need to change in the existing > ZoomInteractor... Did you look at the code? The zoom interactor inner class has one method 'startInteraction' that is seven lines long. It checks if the mouse was pressed and if the ctrl key is down, as I said before you will need to change this so that rather than checking if the ctrl key is down it checks if your application is in 'zoom mode'. Other than writing the code for you, I don't know how to be clearer. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
