Sets the Control. A null value is sent by an applet's destroy method. @param control
(Control control)
| 37 | * @param control |
| 38 | */ |
| 39 | @Override |
| 40 | public void setControl(Control control){ |
| 41 | stopAnimation(); // make sure the animation is stopped. |
| 42 | this.control=control; |
| 43 | if(this.control==null) return; |
| 44 | viewManager.addView("drawingFrame",drawingFrame); |
| 45 | viewManager.addView("drawingPanel",drawingPanel); |
| 46 | viewManager.addView("energyFrame",enFrame); |
| 47 | viewManager.addView("energyPanel",enPanel); |
| 48 | viewManager.addView("magnetizationFrame",magFrame); |
| 49 | viewManager.addView("magnetizationPanel",magPanel); |
| 50 | initMyControl (); // store initial values in the control |
| 51 | } |
| 52 | |
| 53 | /** |
| 54 | * Gets the Control for this applet. |
no test coverage detected