xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marios Depountis <depountismar...@yahoo.com>
Subject Re: JSVGCanvas ZoomIn Action problem.
Date Thu, 10 Jul 2003 03:42:03 GMT
Hi Tomas,
First of all I want to thank for all your help. I followed exactly the steps you have proposed
to me but I still have not managed to make it work properly. When I render the DOM object
in my Canvas all the capabilities of JSVGCanvas exist, so what I want to do is to add the
zoom functionality only when my JButton for zoom  is pressed.
I created the following class:The super call inside the mouseReleased method cannot be compiled(Do
you have any idea why this may happen?)

abstract class  Zoomer extends AbstractZoomInteractor 
            // end interaction defines the condition to end the zoom
         public boolean endInteraction()
            return finished;
         // I want the zoom to end at the release of my mouse, can do it anywhere else
         public void mouseReleased( MouseEvent e )
            finished = true;

Then in the constructor of my class(where JSVGCanvas is defined) the zoom interactor.
         zoomAInteractor = 
               new Zoomer(){         
                  boolean finished = false;
                  public boolean startInteraction(InputEvent ie)
                     return doZoom;

Any time I click my JButton I make doZoom=true but when the mouse is released the zoom doesn't
stop. I have checked that the code never access the mouseReleased method. Furthermore I cannot
stop the zoom after presing another button that makes the variable  doZoom=false.
Have you any idea about what am I doing wrong?
Thanks a lot 

Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
View raw message