[vtkusers] vtkPanel questions

Steve M. Robbins steven.robbins at videotron.ca
Tue Jan 25 21:15:13 EST 2005


On Tue, Jan 25, 2005 at 02:07:40PM -0500, Steve M. Robbins wrote:
 
> Interaction style: The vtkPanel class implements listeners for mouse
> and keystrokes.  It looks to me like there is a hardcoded interaction
> style with keys r, u, w, and s bound.  Does this mean that
> vtkRenderWindowInteractor is completely out of the picture?  

OK, I have since found the vtkCanvas class.

However, it looks to me like there's a slight bug there: if you press
a mouse button with zero visible actors, the drawing surface will get
locked up and never unlocked.  I think the following patch fixes it.
Comments?

-Steve


Index: Wrapping/Java/vtk/vtkCanvas.java
===================================================================
RCS file: /cvsroot/VTK/VTK/Wrapping/Java/vtk/vtkCanvas.java,v
retrieving revision 1.5
diff -u -b -B -r1.5 vtkCanvas.java
--- Wrapping/Java/vtk/vtkCanvas.java	3 Apr 2003 17:13:23 -0000	1.5
+++ Wrapping/Java/vtk/vtkCanvas.java	26 Jan 2005 02:11:06 -0000
@@ -106,8 +106,8 @@
   
   public void mousePressed(MouseEvent e)
   {
-    Lock(); 
     if (ren.VisibleActorCount() == 0) return;
+    Lock(); 
     rw.SetDesiredUpdateRate(5.0);
     lastX = e.getX();
     lastY = e.getY();



More information about the vtkusers mailing list