added no arg constructor back to CueBannerPanel

This commit is contained in:
Brian Carrier 2013-08-24 23:22:41 -04:00
parent 8126ed6184
commit 1366f6e268
2 changed files with 7 additions and 11 deletions

View File

@ -29,12 +29,9 @@ import javax.swing.JDialog;
import javax.swing.JFrame;
import javax.swing.JPanel;
import org.openide.util.Lookup;
import org.sleuthkit.autopsy.coreutils.Version;
import org.netbeans.api.options.OptionsDisplayer;
/**
*
* @author jantonius
*/
public class CueBannerPanel extends javax.swing.JPanel {
@ -46,18 +43,17 @@ public class CueBannerPanel extends javax.swing.JPanel {
private static JPanel caller = new JPanel();
private String className = this.getClass().toString();
/** Creates new form CueBannerPanel
*
* @param welcomeLogo Java-centric path to an image file, e.g. "/org/sleuthkit/autopsy/casemodule/welcome_logo.png".
*/
public CueBannerPanel() {
initComponents();
}
public CueBannerPanel(String welcomeLogo) {
initComponents();
ImageIcon icon = null;
ClassLoader cl = Lookup.getDefault().lookup(ClassLoader.class);
if (cl != null) {
icon = new ImageIcon(cl.getResource(welcomeLogo));
ImageIcon icon = new ImageIcon(cl.getResource(welcomeLogo));
autopsyLogo.setIcon(icon);
}
autopsyLogo.setIcon(icon); //if null then no icon will be shown
}
/** This method is called from within the constructor to

View File

@ -59,7 +59,7 @@ public final class StartupWindow extends JDialog implements StartupWindowInterfa
// set the location of the popUp Window on the center of the screen
setLocation((screenDimension.width - w) / 2, (screenDimension.height - h) / 2);
CueBannerPanel welcomeWindow = new CueBannerPanel("/org/sleuthkit/autopsy/casemodule/welcome_logo.png");
CueBannerPanel welcomeWindow = new CueBannerPanel();
// add the command to close the window to the button on the Volume Detail Panel
welcomeWindow.setCloseButtonActionListener(new ActionListener() {