xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Henric Rosvall" <henric.rosv...@swipnet.se>
Subject Override keyevents
Date Thu, 09 Mar 2006 15:16:55 GMT
I have a class that extends JSvgCanvas.
Now I want to have my own key-event-handlers and disable the default ones.
For example, I want to be able to "select" multiple objects when holding
down the Ctrl-key, but right now, holding down the Ctrl-key will make it
drag a zoom-box instead.
I tried the following code (which will probably make more experienced
Java-devellopers will probably laugh your asses of), but to no avail:
  // Tell the Canvas not to use the Tab-key to move to the next control
// Remove all the current KeyListeners
  KeyListener[] kl = this.getKeyListeners();
  for (int x = 0; x < kl.length; x++)
  // Implement a Key-listener for Tab, Ctrl, Shift and Delete-Key-Presses
  this.addKeyListener(new JSvgCanvasEnhKeyHandler());
Henric Rosvall

View raw message