import java.util.concurrent.locks.ReentrantLock;
+import org.eclipse.swt.internal.DPIUtil;
+
import vtk.vtkAxesActor;
import vtk.vtkCamera;
import vtk.vtkGenericRenderWindowInteractor;
* Commissariat a l'Energie Atomique et aux Energies Alternatives,
* 15 avenue des Sablieres, CS 60001, 33116 Le Barp, France.
*/
+@SuppressWarnings("restriction")
public abstract class vtkAbstractComponent<T> implements vtkComponent<T> {
protected vtkRenderWindow renderWindow;
protected vtkRenderer renderer;
if (renderWindow == null || windowInteractor == null) {
return; // Nothing to do we are deleted...
}
-
+ w = DPIUtil.autoScaleUp(w);
+ h = DPIUtil.autoScaleUp(h);
try {
lock.lockInterruptibly();
renderWindow.SetSize(w, h);
public void Delete() {
this.lock.lock();
+ this.renderer.DrawOff();
+ this.renderer.Delete();
this.renderer = null;
+ this.camera.Delete();
this.camera = null;
+ this.windowInteractor.Delete();
this.windowInteractor = null;
// removing the renderWindow is let to the superclass
// because in the very special case of an AWT component