1 package vtk.rendering.awt;
3 import java.awt.Canvas;
4 import java.awt.Graphics;
6 import vtk.vtkRenderWindow;
8 public class vtkInternalAwtComponent extends Canvas {
9 protected native int RenderCreate(vtkRenderWindow renderWindow);
11 private static final long serialVersionUID = -7756069664577797620L;
12 private vtkAwtComponent parent;
14 public vtkInternalAwtComponent(vtkAwtComponent parent) {
16 this.addMouseListener(this.parent.getInteractorForwarder());
17 this.addMouseMotionListener(this.parent.getInteractorForwarder());
18 this.addMouseWheelListener(this.parent.getInteractorForwarder());
19 this.addKeyListener(this.parent.getInteractorForwarder());
22 public void addNotify() {
24 parent.isWindowCreated = false;
25 parent.getRenderWindow().SetForceMakeCurrent();
26 parent.updateInRenderCall(false);
29 public void removeNotify() {
30 parent.updateInRenderCall(true);
34 public void paint(Graphics g) {
38 public void update(Graphics g) {