[vtkusers] java's vtkPanel does too much

Steve M. Robbins steven.robbins at videotron.ca
Sat Feb 26 03:38:37 EST 2005


On Fri, Feb 25, 2005 at 08:57:12AM -0500, Jeff Lee wrote:

> That being said, I would recommend overriding vtkPanel.java in your
> own build area - just make sure your package name is
> vtk/vtkPanel.java and then you can do whatever you want (make sure
> you retain the native methods).

I hadn't thought about doing that, but it's an option.  The 
drawback is that I would have to merge any bugfixes to the
vtkPanel.Render() method that might come along.  That's my
main motivation to have VTK provide a bare-bones base class
that sets up a java window for VTK rendering.


> In the long run, we should probably provide a base class with only 
> native methods which can then be extended, without the above tinkering.  
> Probably call it vtkNativeHook or something obvious, then vtkPanel is a 
> subclass.  This will require changes to the c++ code in vtkJavaAwt.h to 
> change the mangled jni method signatures, but it is trivial.

What I had in mind is for the base class to have the three native
methods, as well as Render() and paint().  Is that what you
had in mind, or is vtkNativeHook just the three native methods?

-Steve



More information about the vtkusers mailing list