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.Toolkit;
|
||||||
import java.awt.event.ActionEvent;
|
import java.awt.event.ActionEvent;
|
||||||
import java.awt.event.ActionListener;
|
import java.awt.event.ActionListener;
|
||||||
|
import javax.swing.ImageIcon;
|
||||||
import javax.swing.JDialog;
|
import javax.swing.JDialog;
|
||||||
import javax.swing.JFrame;
|
import javax.swing.JFrame;
|
||||||
import javax.swing.JPanel;
|
import javax.swing.JPanel;
|
||||||
@ -45,9 +46,18 @@ public class CueBannerPanel extends javax.swing.JPanel {
|
|||||||
private static JPanel caller = new JPanel();
|
private static JPanel caller = new JPanel();
|
||||||
private String className = this.getClass().toString();
|
private String className = this.getClass().toString();
|
||||||
|
|
||||||
/** Creates new form CueBannerPanel */
|
/** Creates new form CueBannerPanel
|
||||||
public CueBannerPanel() {
|
*
|
||||||
|
* @param welcomeLogo Java-centric path to an image file, e.g. "/org/sleuthkit/autopsy/casemodule/welcome_logo.png".
|
||||||
|
*/
|
||||||
|
public CueBannerPanel(String welcomeLogo) {
|
||||||
initComponents();
|
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
|
/** This method is called from within the constructor to
|
||||||
@ -254,7 +264,7 @@ public class CueBannerPanel extends javax.swing.JPanel {
|
|||||||
*/
|
*/
|
||||||
public void setCloseButtonText(String text) {
|
public void setCloseButtonText(String text) {
|
||||||
closeButton.setText(text);
|
closeButton.setText(text);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Close the open recent cases window.
|
* Close the open recent cases window.
|
||||||
|
@ -58,8 +58,8 @@ public final class StartupWindow extends JDialog implements StartupWindowInterfa
|
|||||||
|
|
||||||
// set the location of the popUp Window on the center of the screen
|
// set the location of the popUp Window on the center of the screen
|
||||||
setLocation((screenDimension.width - w) / 2, (screenDimension.height - h) / 2);
|
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
|
// add the command to close the window to the button on the Volume Detail Panel
|
||||||
welcomeWindow.setCloseButtonActionListener(new ActionListener() {
|
welcomeWindow.setCloseButtonActionListener(new ActionListener() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user