[vtkusers] SetWindowID not in Java wrappers?

Jeff Lee jeff at cdnorthamerica.com
Tue Jul 2 06:44:50 EDT 2002


Christopher,
Apology in advance for answering a question with another question, but 
why do you need the drawing surface info?   I am guessing there is some 
functionality missing in vtkPanel.java that you would like to add?  If 
so, what?  Is it not sufficient to subclass vtkPanel.java?  You cannot 
render into a java frame, you must use a Canvas - which is what vtkPanel 
is.  Not exposing methods like SetWindowId was a decision I made because 
it is rare that someone wants to take an arbitrary Canvas and turn it 
into something which can display opengl graphics.  vtkPanel provides 
RenderCreate which does the SetWindowId for you.  It also provides 
Lock/UnLock methods which allow primitive mutex locking on the Canvas. 
 That's it.  If you want that functionality, but not all the other cruft 
in a vtkPanel, you can subclass it and do whatever you like.  I think 
that with this approach you can do almost anything, while still having 
access to the native methods in vtkJavaAwt.h.  You can also re-invent  - 
just write your own JNI wrappers and expose whatever you like.
-Jeff

Christopher Navarro wrote:

>I was looking at the vtkRenderWindow class and the vtkJavaAwt.h file that 
>is essentialy used by vtkPanel class (ie it uses RenderCreate() , etc 
>) and I was wondering why SetWindowId is not part of the java wrappers?  
>What I mean is if I have a java frame I would like to render to, I 
>could use the awt native interface to get the drawing surface info, return 
>that frames Id, and then set the RenderWindow's ID to the frames ID.  Has 
>this been looked at and found to difficult to do or am I completely wrong 
>here?  It looks like the vtkJavaAwt.h (written in C), creates 
>native calls that can be used by the vtkPanel class to send it a 
>RenderWindow Id for it to render.  I would like to do something similar 
>to what vtkPanel does except return the drawing surface info once it is 
>obtained and then set the RenderWindow ID to that ID and render it.  
>
>-chris   
>
>
>_______________________________________________
>This is the private VTK discussion list. 
>Please keep messages on-topic. Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
>Follow this link to subscribe/unsubscribe:
>http://public.kitware.com/mailman/listinfo/vtkusers
>
>
>  
>




More information about the vtkusers mailing list