Staging
v0.5.1
swh:1:snp:8af5e945b1aa5b1b5f89bf21e30348f209c5139c
Raw File
JPrefuseApplet.java
package prefuse.util.ui;

import javax.swing.JApplet;

import prefuse.activity.ActivityManager;

/**
 * A convenience class for creating applets that incorporate
 * prefuse visualizations. Clients can subclass this class to
 * implement prefuse applets. However if the subclass overrides
 * the {@link #destroy()} or {@link #stop()} methods, it should
 * be sure to also call these methods on the super class.
 * 
 * @author <a href="http://jheer.org">jeffrey heer</a>
 */
public class JPrefuseApplet extends JApplet {
    
    /**
     * Automatically shuts down the ActivityManager when the applet is
     * destroyed.
     * @see java.applet.Applet#destroy()
     */
    public void destroy() {
        ActivityManager.stopThread();
    }

    /**
     * Automatically shuts down the ActivityManager when the applet is
     * stopped.
     * @see java.applet.Applet#stop()
     */
    public void stop() {
        ActivityManager.stopThread();
    }
    
} // end of class JPrefuseApplet
back to top