[vtkusers] [Java] Removing default shortcut
Sebastien Jourdain
sebastien.jourdain at kitware.com
Tue Mar 27 11:02:07 EDT 2018
Are you using vtkPanel or vtkCanvas or something else to bring the
rendering into the Java GUI?
I see hard coded key press handling within vtkPanel (r, u, w, s).
Seb
On Tue, Mar 27, 2018 at 6:04 AM, Jean-Max Redonnet <jmax.red at gmail.com>
wrote:
> Hello everyone,
>
> I'm trying to define my own shortcuts for my app, but I can't figure out
> how to remove existing shortcuts.
>
> First, I wonder if the best way to do that is using the Swing/AWT
> architecture or the VTK one. I tried both, both allow me to define new
> shortcuts, but none of them allow me to remove individual default shortcut.
>
> I tried to subclass vtkInteractorStyle as in this example :
> https://lorensen.github.io/VTKExamples/site/Cxx/
> Interaction/KeypressEvents/
>
> The direct C++ to Java translation just do nothing. The custom interactor
> style is never called. But default shortcut is still registred ('q' key
> quits and so on...)
>
> I also tied to remove all keybord related interactor observers to make the
> whole shortcuts managed by Swing/AWT. To do this, I wrote :
>
> renderWindowInteractor.RemoveObservers("KeyPressEvent");
> renderWindowInteractor.RemoveObservers("KeyReleaseEvent");
> renderWindowInteractor.RemoveObservers("CharEvent");
>
> but it did not work either.
>
> All this stuff seems to work properly with other languages than Java. Is
> there is something special with Java ?
>
> I must admit I'm a bit confused. Any help would be gratefully appreciated.
> Thanks.
>
> JMR
>
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/
> opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Search the list archives at: http://markmail.org/search/?q=vtkusers
>
> Follow this link to subscribe/unsubscribe:
> https://vtk.org/mailman/listinfo/vtkusers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://vtk.org/pipermail/vtkusers/attachments/20180327/be18a01e/attachment.html>
More information about the vtkusers
mailing list