>>>>> "ED" == Eric Delacroix <[EMAIL PROTECTED]> writes:

ED> I'm still trying to customize the zoom and pan functions of
ED> JSVGCanvas, by making them working on clicking their button. So
ED> when you press a button it enables the associated function and
ED> disables all the others. But I'd like to make it possible to do
ED> that just by clicking the left mouse-button. So I wrote a class
ED> that extends JSVGCanvas and tried to override the interactors
ED> (just erasing tha part between stars)

ED> protected Interactor zoomInteractor = new AbstractZoomInteractor()
ED> { public boolean startInteraction(InputEvent ie) { int mods =
ED> ie.getModifiers(); return ie.getID() == MouseEvent.MOUSE_PRESSED;
ED> /*&& (mods & ie.BUTTON1_MASK) != 0 && (mods & ie.CTRL_MASK) !=
ED> 0;*/ } };

    If you just put the above code in a subclass it would do almost
nothing.  It would define a new class member zoomInterator, but you
probably wanted to replace the zoomInteractor defined by JSVGCanvas.

    In general what you want to do is write your own classes that
create a new Affine Matrix to set with 'setRenderingTransform'.
Capturing the user events and the creation of the affine transform are
all done using the standard JDK mechanisms.

ED> but when trying to use it, I still have to push the CTRL key to
ED> have the effect.  Is there other functions to override? 

    Probably because you never register your new zoom interactor.

 Thank you
ED> Eric Delacroix ULB Brussel




ED> _________________________________________________________________
ED> MSN Search, le moteur de recherche qui pense comme vous !
ED> http://search.fr.msn.be


ED> ---------------------------------------------------------------------
ED> To unsubscribe, e-mail: [EMAIL PROTECTED] For
ED> additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to