MCPcopy Create free account
hub / github.com/Kitware/VTK / Initialize

Method Initialize

Wrapping/Java/vtk/vtkCanvas.java:51–79  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

49 }
50
51 protected void Initialize() {
52 iren.SetRenderWindow(rw);
53 iren.TimerEventResetsTimerOff();
54 iren.AddObserver("CreateTimerEvent", this, "StartTimer");
55 iren.AddObserver("DestroyTimerEvent", this, "DestroyTimer");
56 iren.SetSize(200, 200);
57 iren.ConfigureEvent();
58 pw.AddObserver("EnableEvent", this, "BeginPlaneInteraction");
59 bw.AddObserver("EnableEvent", this, "BeginBoxInteraction");
60 pw.SetKeyPressActivationValue('l');
61 bw.SetKeyPressActivationValue('b');
62 pw.SetInteractor(iren);
63 bw.SetInteractor(iren);
64
65 addComponentListener(new ComponentAdapter() {
66 public void componentResized(ComponentEvent event) {
67 // The Canvas is being resized, get the new size
68 int width = getWidth();
69 int height = getHeight();
70 setSize(width, height);
71 }
72 });
73
74 ren.SetBackground(0.0, 0.0, 0.0);
75
76 // Setup same interactor style than vtkPanel
77 vtkInteractorStyleTrackballCamera style = new vtkInteractorStyleTrackballCamera();
78 iren.SetInteractorStyle(style);
79 }
80
81 public void StartTimer() {
82 if (timer.isRunning())

Callers 6

vtkCanvasMethod · 0.95
mainMethod · 0.45
runMethod · 0.45
mainMethod · 0.45
mainMethod · 0.45
mainMethod · 0.45

Calls 6

SetRenderWindowMethod · 0.45
AddObserverMethod · 0.45
SetSizeMethod · 0.45
ConfigureEventMethod · 0.45
SetInteractorMethod · 0.45
SetInteractorStyleMethod · 0.45

Tested by 5

mainMethod · 0.36
runMethod · 0.36
mainMethod · 0.36
mainMethod · 0.36
mainMethod · 0.36