01: package prefuse.util.ui;
02:
03: import javax.swing.JApplet;
04:
05: import prefuse.activity.ActivityManager;
06:
07: /**
08: * A convenience class for creating applets that incorporate
09: * 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
|