Adds a marker to the plot.
()
| 194 | * Adds a marker to the plot. |
| 195 | */ |
| 196 | public void createMarker() { |
| 197 | final ShellParticle marker = new ShellParticle(); |
| 198 | marker.setStepSize(dt); |
| 199 | OSPTableInspector editor = marker.edit(); |
| 200 | editor.setLocationRelativeTo(plottingPanel); |
| 201 | |
| 202 | final Control control = editor.getControl(); |
| 203 | editor.addWindowListener(new java.awt.event.WindowAdapter() { |
| 204 | |
| 205 | @Override |
| 206 | public void windowClosed(WindowEvent e) { |
| 207 | marker.setEnabled(control.getBoolean("draggable state")); |
| 208 | marker.label = control.getString("label"); |
| 209 | double r = control.getDouble("r"); |
| 210 | double phi = control.getDouble(Trajectory.PHI); |
| 211 | marker.setXY(r * Math.cos(phi), r * Math.sin(phi)); |
| 212 | markers.add(marker); |
| 213 | plottingPanel.addDrawable(marker); |
| 214 | plottingPanel.repaint(); |
| 215 | } |
| 216 | }); |
| 217 | editor.setVisible(true); |
| 218 | /* */ |
| 219 | } |
| 220 | |
| 221 | void createDefaultParticle() { |
| 222 | defaultTrajectory = new ClassicalTrajectory(); |
nothing calls this directly
no test coverage detected