MCPcopy Create free account
hub / github.com/OpenSourcePhysics/osp / setControl

Method setControl

src/debugging/physicsapps/IsingWRApp.java:39–51  ·  view source on GitHub ↗

Sets the Control. A null value is sent by an applet's destroy method. @param control

(Control control)

Source from the content-addressed store, hash-verified

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.

Callers 1

mainMethod · 0.95

Calls 3

addViewMethod · 0.80
initMyControlMethod · 0.80
stopAnimationMethod · 0.65

Tested by

no test coverage detected