Hi HardCod3r,

hardc0d3r <[EMAIL PROTECTED]> wrote on 05/10/2007 11:34:52 PM:

> i tried to extend the JSVGCanvas and add a new zoom interactor. but when 
i
> tried my custom canvas, the interactor did not work.. here is the code:

   Is anyone calling 'setEnableMouseClickZoomInteractor(true)'?
Is your startInteracation method being called?  I would add
a println to that method with the value of 'getID' and 'mods'.

> public class CustomSVGCanvas extends JSVGCanvas{
> 
>    //public boolean activate = true;
> 
>     public CustomSVGCanvas() {
>        super();
>     }
> 
>    protected Interactor zoomInteractorMouseClick = new
> AbstractZoomInteractor() {
>         public boolean startInteraction(InputEvent ie) {
>             int mods = ie.getModifiers();
>             return 
>                ie.getID() == MouseEvent.MOUSE_PRESSED && 
>                //activate == true &&
>                (mods & InputEvent.BUTTON1_MASK) != 0;
>         }
>     };
> 
>     public void setEnableMouseClickZoomInteractor(boolean b) {
>        if (b) {
>           getInteractors().add(zoomInteractorMouseClick);
>        } else {
>           getInteractors().remove(zoomInteractorMouseClick);
>        }
>    }
> }
> 
> i did call the setEnableMouseClickZoomInteractor but nothing happens.. 
can
> anyone please help me?
> -- 
> View this message in context: http://www.nabble.com/custom-zoom-
> interactor-not-working-tf3725323.html#a10425442
> Sent from the Batik - Users mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> 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]

Reply via email to