You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-dev@xmlgraphics.apache.org by James McArthur <ja...@pcorp.com.au> on 2002/08/16 06:53:24 UTC

JSVGCanvas.eventsEnabled has wrong description?

Hi,

I have a class that has extended JSVGCanvas, and I want to disable mouse
events being received.

In the javadocs, it says there is a protected member variable
'eventsEnabled' that has the description:

"eventEnabled - Whether the GVT tree should be reactive to mouse and key
events."

The problem I have is that when I disable this I can no longer
communicate with the UpdateManager; when I try to get the UpdateManager,
(via getUpdateManager().getUpdateRunnableQueue()) I receive a
NullPointerException.

If I set eventEnabled = true, this problem disappears.

So ... is the description of this variable incorrect, or is there
something else that I'm missing?

(This is on RH Linux 7.3, Sun JDK 1.3, Batik 1.5(beta3))

James



JSVGCanvas.eventsEnabled has wrong description?

Posted by Thomas E Deweese <th...@kodak.com>.
>>>>> "JM" == James McArthur <ja...@pcorp.com.au> writes:

JM> Hi, I have a class that has extended JSVGCanvas, and I want to
JM> disable mouse events being received.

JM> In the javadocs, it says there is a protected member variable
JM> 'eventsEnabled' that has the description:

JM> "eventEnabled - Whether the GVT tree should be reactive to mouse
JM> and key events."

    When this is false I think it doesn't create an UpdateManager,
which does mean that it is insensitive to mouse and key events, it
also means that all dynamic functionality is removed.

JM> The problem I have is that when I disable this I can no longer
JM> communicate with the UpdateManager; when I try to get the
JM> UpdateManager, (via getUpdateManager().getUpdateRunnableQueue()) I
JM> receive a NullPointerException.

JM> If I set eventEnabled = true, this problem disappears.

JM> So ... is the description of this variable incorrect, or is there
JM> something else that I'm missing?

    You might try using the 'pointer-events' property to control
sensitivity to mouse events in the SVG.

    Otherwise someone needs to introduce additional variables to
control event sensativity (perhaps an event filter class) in the
Canvas.


---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-dev-help@xml.apache.org