()
| 79 | SwingUtilities.invokeLater(new Runnable() { |
| 80 | |
| 81 | public void run() { |
| 82 | // Setup GC to run every 1 second in EDT |
| 83 | vtkObject.JAVA_OBJECT_MANAGER.getAutoGarbageCollector().SetScheduleTime(5, TimeUnit.SECONDS); |
| 84 | vtkObject.JAVA_OBJECT_MANAGER.getAutoGarbageCollector().SetDebug(true); |
| 85 | vtkObject.JAVA_OBJECT_MANAGER.getAutoGarbageCollector().Start(); |
| 86 | |
| 87 | JButton startVTKApp = new JButton("Start VTK application"); |
| 88 | startVTKApp.addActionListener(new ActionListener() { |
| 89 | |
| 90 | public void actionPerformed(ActionEvent e) { |
| 91 | final VtkApplication app = new VtkApplication(); |
| 92 | JFrame f = buildFrame("VtkApp", app, 400, 200); |
| 93 | f.addWindowListener(new WindowAdapter() { |
| 94 | public void windowClosing(WindowEvent e) { |
| 95 | app.Delete(); |
| 96 | } |
| 97 | }); |
| 98 | f.setVisible(true); |
| 99 | } |
| 100 | }); |
| 101 | JFrame mainFrame = buildFrame("Launcher", startVTKApp, 200, 200); |
| 102 | mainFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); |
| 103 | mainFrame.setVisible(true); |
| 104 | } |
| 105 | }); |
| 106 | } |
| 107 |
nothing calls this directly
no test coverage detected