mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-12 07:56:16 +00:00
CueBannerPanel (the startup panel) now takes an image path in its constructor, which is useful for NB modules that want to change the logo.
This commit is contained in:
parent
dc67e309b5
commit
7b418369bd
@ -24,6 +24,7 @@ import java.awt.Dimension;
|
||||
import java.awt.Toolkit;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
import javax.swing.ImageIcon;
|
||||
import javax.swing.JDialog;
|
||||
import javax.swing.JFrame;
|
||||
import javax.swing.JPanel;
|
||||
@ -45,9 +46,18 @@ public class CueBannerPanel extends javax.swing.JPanel {
|
||||
private static JPanel caller = new JPanel();
|
||||
private String className = this.getClass().toString();
|
||||
|
||||
/** Creates new form CueBannerPanel */
|
||||
public CueBannerPanel() {
|
||||
/** Creates new form CueBannerPanel
|
||||
*
|
||||
* @param welcomeLogo Java-centric path to an image file, e.g. "/org/sleuthkit/autopsy/casemodule/welcome_logo.png".
|
||||
*/
|
||||
public CueBannerPanel(String welcomeLogo) {
|
||||
initComponents();
|
||||
ImageIcon icon = null;
|
||||
ClassLoader cl = Lookup.getDefault().lookup(ClassLoader.class);
|
||||
if (cl != null) {
|
||||
icon = new ImageIcon(cl.getResource(welcomeLogo));
|
||||
}
|
||||
autopsyLogo.setIcon(icon); //if null then no icon will be shown
|
||||
}
|
||||
|
||||
/** This method is called from within the constructor to
|
||||
|
@ -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();
|
||||
CueBannerPanel welcomeWindow = new CueBannerPanel("/org/sleuthkit/autopsy/casemodule/welcome_logo.png");
|
||||
|
||||
// add the command to close the window to the button on the Volume Detail Panel
|
||||
welcomeWindow.setCloseButtonActionListener(new ActionListener() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user