VTK Examples in Java

vtk.util
Class VtkPanelUtil

java.lang.Object
  extended byvtk.util.VtkPanelUtil

public class VtkPanelUtil
extends java.lang.Object

Utilities to simplify use of vtkPanel.

Version:
$Revision: 1.6 $
Author:
Jarek Sacha

Field Summary
static long MAX_WAIT
          Maximum wait time in milliseonds.
 
Method Summary
static void hardCopyWhenWindowSet(java.lang.String fileName, vtk.vtkPanel renWin)
          Wait (block) till vtkPanel's property windowSet is true then write hard copy of the vtkPanel content to a TIFF file.
static void setSize(vtk.vtkPanel renWin, int xSize, int ySize)
          Set size of vtkPanel so Java JPanel and VTK render window coordinates are synchronised.
static void waitTillWindowSet(vtk.vtkPanel renWin)
          Wait (block) till vtkPanel's property windowSet is true.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAX_WAIT

public static final long MAX_WAIT
Maximum wait time in milliseonds.

See Also:
Constant Field Values
Method Detail

waitTillWindowSet

public static void waitTillWindowSet(vtk.vtkPanel renWin)
                              throws java.lang.InterruptedException
Wait (block) till vtkPanel's property windowSet is true.

Parameters:
renWin - vtkPanel to wait for.
Throws:
java.lang.InterruptedException

setSize

public static void setSize(vtk.vtkPanel renWin,
                           int xSize,
                           int ySize)
Set size of vtkPanel so Java JPanel and VTK render window coordinates are synchronised. When a call to vtkPanel.setSize() is made before panel is rendered, panel size is not forwarded to VTK and there must be another call to setSize once the panel finished rendering for the first time.

Parameters:
renWin - vtkPanel for which to safely set size
xSize - size in X.
ySize - size in Y.

hardCopyWhenWindowSet

public static void hardCopyWhenWindowSet(java.lang.String fileName,
                                         vtk.vtkPanel renWin)
                                  throws java.lang.InterruptedException,
                                         java.lang.reflect.InvocationTargetException
Wait (block) till vtkPanel's property windowSet is true then write hard copy of the vtkPanel content to a TIFF file.

Parameters:
fileName - name of the file where to write vtkPanel content.
renWin - vtkPanel to get hard copy from.
Throws:
java.lang.InterruptedException
java.lang.reflect.InvocationTargetException

SourceForge.net Logo