Initializes the animation;
()
| 123 | * Initializes the animation; |
| 124 | */ |
| 125 | @Override |
| 126 | public void initialize() { |
| 127 | plottingPanel.setMessage(null, MessageDrawable.TOP_LEFT); |
| 128 | // clears all trajectories |
| 129 | plottingPanel.removeDrawables(AbstractTrajectory.class); // XXX WC JS Bug |
| 130 | trajectories.clear(); |
| 131 | markers.clear(); |
| 132 | maxTime = control.getDouble("maximum time"); |
| 133 | enableInspector = control.getBoolean("enable inspector"); |
| 134 | if ((inspector != null) && !enableInspector) { |
| 135 | inspector.plot.setVisible(false); |
| 136 | } |
| 137 | dt = control.getDouble("dt"); |
| 138 | time = 0; |
| 139 | plottingPanel.setMessage("t=" + ControlUtils.f2(time)); |
| 140 | if (control.getBoolean("autoscale")) { |
| 141 | double[] array = scale.getArray(control.getString("scale min max")); |
| 142 | ((PolarAxes) plottingPanel.getAxes()).autospaceRings(true); |
| 143 | plottingPanel.setAutoscaleX(true); |
| 144 | plottingPanel.setAutoscaleY(true); |
| 145 | plottingPanel.limitAutoscaleX(array[0], array[1]); |
| 146 | plottingPanel.limitAutoscaleY(array[2], array[3]); |
| 147 | } else { |
| 148 | double[] array = scale.getArray(control.getString("scale min max")); |
| 149 | ((PolarAxes) plottingPanel.getAxes()).setDeltaR(1.0); |
| 150 | plottingPanel.setPreferredMinMax(array[0], array[1], array[2], array[3]); |
| 151 | } |
| 152 | } |
| 153 | |
| 154 | /** |
| 155 | * Handles the mouse action. |
no test coverage detected