[vtkusers] Keyboard interaction with VTK in Java

Jarek Sacha jarek at ieee.org
Thu Oct 13 23:18:02 EDT 2005


Take look how it is done in the vtkPanel.java and vtkCanvas.java that 
are part of VTK source code. You can find additional examples 
(translations of Tcl/Tk code to Java) at:
http://ij-plugins.sourceforge.net/vtk-examples/.

Jarek

tytyty0007 at hotmail.com wrote:
> Hi all,
>
> I'm trying to implement keyboard interaction in my existing vtk 
> project. Unfortunately I cannot find any example Java code to get the 
> desired output. I did found some C++ code (in the tutorial/example 
> section of vtk) that does keyboard interation (using 
> vtkInteractorStyle, overwriting the OnChar function). Unfortunately I 
> am not able to rewrite the C++ code in java since the pointer 
> structures used in the C++ sample.  I did try to create a subclass 
> extending a vtkInteractorStyle object and then overwriting the 
> OnKeyPress method but with no result (the OnKeyPress function did not 
> seem to be called). Does anyone have an idea how to tackle tis problem?
>
> J. Koenduin





More information about the vtkusers mailing list