1 package prefuse.util.ui; 2 3 import javax.swing.JApplet; 4 5 import prefuse.activity.ActivityManager; 6 7 /** 8 * A convenience class for creating applets that incorporate 9 * prefuse visualizations. Clients can subclass this class to 10 * implement prefuse applets. However if the subclass overrides 11 * the {@link #destroy()} or {@link #stop()} methods, it should 12 * be sure to also call these methods on the super class. 13 * 14 * @author <a HREF="http://jheer.org">jeffrey heer</a> 15 */ 16 public class JPrefuseApplet extends JApplet { 17 18 /** 19 * Automatically shuts down the ActivityManager when the applet is 20 * destroyed. 21 * @see java.applet.Applet#destroy() 22 */ 23 public void destroy() { 24 ActivityManager.stopThread(); 25 } 26 27 /** 28 * Automatically shuts down the ActivityManager when the applet is 29 * stopped. 30 * @see java.applet.Applet#stop() 31 */ 32 public void stop() { 33 ActivityManager.stopThread(); 34 } 35 36 } // end of class JPrefuseApplet 37