Hi Silvan, Shin,

   Hmm, so for those that are interested the problem is that the Canvas is
using setDisableInteractions to implement the 'zoomAndPan="disable"' 
feature
of SVG.  I'll try and make it so that if you have ever called 
setDisableInteractions your value will stick otherwise it will use what 
the
document says it should.

"Silvan Fischer" <[EMAIL PROTECTED]> wrote on 03/30/2006 01:48:28 
AM:

> I solved this by adding a GVTTreeRendererListener to the canvas and 
calling 
> setDisableInteractions(true) after every gvtRenderingCompleted()-event.

   Actually, you should only need to call this in the gvtBuildCompleted 
callback
of the GVTTreeBuilder (which is called once per doc).

"Shin" wrote:
> What I really want to do is to disable canvas-scrolling using arrow 
keys.
> Unfotunately, there is no method to do it, and the 
> setDisableInteractions(true) is the only way, I think.

   The canvas scrolling with arrow keys are in the action map for the 
canvas.
You can get the ActionMap for the canvas and manipulate that (you will 
have
to do it after each document is loaded however):

        ActionMap actionMap = canvas.getActionMap();

        actionMap.get(SCROLL_RIGHT_ACTION)     .setEnabled(false);
        actionMap.get(SCROLL_LEFT_ACTION)      .setEnabled(false);
        actionMap.get(SCROLL_UP_ACTION)        .setEnabled(false);
        actionMap.get(SCROLL_DOWN_ACTION)      .setEnabled(false);

        actionMap.get(FAST_SCROLL_RIGHT_ACTION).setEnabled(false);
        actionMap.get(FAST_SCROLL_LEFT_ACTION) .setEnabled(false);
        actionMap.get(FAST_SCROLL_UP_ACTION)   .setEnabled(false);
        actionMap.get(FAST_SCROLL_DOWN_ACTION) .setEnabled(false);

   Similarly you can get the list of Interactors for the canvas and
manipulate that with getInteractors().


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

Reply via email to