From dc67e309b520802490e11f6c50ac9cfd7df19516 Mon Sep 17 00:00:00 2001 From: "Samuel H. Kenyon" Date: Fri, 23 Aug 2013 13:11:08 -0400 Subject: [PATCH 1/5] Move the About box Close button to a more reasonable location. --- .../org/netbeans/core/windows/view/ui/Bundle.properties | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/branding/modules/org-netbeans-core-windows.jar/org/netbeans/core/windows/view/ui/Bundle.properties b/branding/modules/org-netbeans-core-windows.jar/org/netbeans/core/windows/view/ui/Bundle.properties index e718444a20..be1ae09a6d 100644 --- a/branding/modules/org-netbeans-core-windows.jar/org/netbeans/core/windows/view/ui/Bundle.properties +++ b/branding/modules/org-netbeans-core-windows.jar/org/netbeans/core/windows/view/ui/Bundle.properties @@ -1,5 +1,5 @@ #Updated by build script -#Wed, 07 Aug 2013 08:19:27 -0400 +#Fri, 23 Aug 2013 13:08:16 -0400 -CTL_MainWindow_Title=Autopsy 20130807 -CTL_MainWindow_Title_No_Project=Autopsy 20130807 +CTL_MainWindow_Title=Autopsy 20130823 +CTL_MainWindow_Title_No_Project=Autopsy 20130823 From 7b418369bddc2241a4e9067fb50ed63c20a0cadb Mon Sep 17 00:00:00 2001 From: "Samuel H. Kenyon" Date: Fri, 23 Aug 2013 16:39:59 -0400 Subject: [PATCH 2/5] CueBannerPanel (the startup panel) now takes an image path in its constructor, which is useful for NB modules that want to change the logo. --- .../autopsy/casemodule/CueBannerPanel.java | 16 +++++++++++++--- .../autopsy/casemodule/StartupWindow.java | 4 ++-- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/CueBannerPanel.java b/Core/src/org/sleuthkit/autopsy/casemodule/CueBannerPanel.java index 501b1f488e..d28c040669 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/CueBannerPanel.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/CueBannerPanel.java @@ -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 @@ -254,7 +264,7 @@ public class CueBannerPanel extends javax.swing.JPanel { */ public void setCloseButtonText(String text) { closeButton.setText(text); - } + } /** * Close the open recent cases window. diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/StartupWindow.java b/Core/src/org/sleuthkit/autopsy/casemodule/StartupWindow.java index 8d477b18fa..f6f9f540bd 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/StartupWindow.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/StartupWindow.java @@ -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 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() { From 07bd6905e0e1844c3de27130f3e3c7f3831dadf4 Mon Sep 17 00:00:00 2001 From: "Samuel H. Kenyon" Date: Fri, 23 Aug 2013 16:43:16 -0400 Subject: [PATCH 3/5] Changes so that NB modules can set custom copyright text in the About box. Also the proper commit for previous "Move the About box Close button to a more reasonable location." --- .../ProductInformationPanel.form | 62 +++++++++---------- .../ProductInformationPanel.java | 61 +++++++++--------- 2 files changed, 59 insertions(+), 64 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/corecomponents/ProductInformationPanel.form b/Core/src/org/sleuthkit/autopsy/corecomponents/ProductInformationPanel.form index e37b43cc05..d529361ded 100644 --- a/Core/src/org/sleuthkit/autopsy/corecomponents/ProductInformationPanel.form +++ b/Core/src/org/sleuthkit/autopsy/corecomponents/ProductInformationPanel.form @@ -21,16 +21,19 @@ - + + - - - - + + + + + + @@ -43,17 +46,15 @@ - + - + - - - - - - - + + + + + @@ -80,26 +81,6 @@ - - - - - - - - - - - - - - - - - - - - @@ -159,5 +140,18 @@ + + + + + + + + + + + + + diff --git a/Core/src/org/sleuthkit/autopsy/corecomponents/ProductInformationPanel.java b/Core/src/org/sleuthkit/autopsy/corecomponents/ProductInformationPanel.java index 20c1508000..0499404c42 100644 --- a/Core/src/org/sleuthkit/autopsy/corecomponents/ProductInformationPanel.java +++ b/Core/src/org/sleuthkit/autopsy/corecomponents/ProductInformationPanel.java @@ -43,13 +43,13 @@ import org.sleuthkit.datamodel.SleuthkitJNI; /** * Custom "About" window panel. */ -class ProductInformationPanel extends JPanel implements HyperlinkListener { +public class ProductInformationPanel extends JPanel implements HyperlinkListener { private URL url = null; private Icon about; private boolean verboseLogging; - ProductInformationPanel() { + public ProductInformationPanel() { about = new ImageIcon(org.netbeans.core.startup.Splash.loadContent(true)); initComponents(); jLabel1.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); @@ -67,16 +67,15 @@ class ProductInformationPanel extends JPanel implements HyperlinkListener { // //GEN-BEGIN:initComponents private void initComponents() { - java.awt.GridBagConstraints gridBagConstraints; jLabel1 = new javax.swing.JLabel(); jPanel1 = new javax.swing.JPanel(); - jButton2 = new javax.swing.JButton(); jScrollPane3 = new javax.swing.JScrollPane(); copyright = new javax.swing.JTextPane(); jScrollPane2 = new javax.swing.JScrollPane(); description = new javax.swing.JTextPane(); verboseLoggingButton = new javax.swing.JButton(); + jButton2 = new javax.swing.JButton(); setBackground(new java.awt.Color(255, 255, 255)); @@ -92,22 +91,10 @@ class ProductInformationPanel extends JPanel implements HyperlinkListener { jPanel1.setBackground(new java.awt.Color(255, 255, 255)); jPanel1.setLayout(new java.awt.GridBagLayout()); - jButton2.setBackground(new java.awt.Color(255, 255, 255)); - jButton2.setText(NbBundle.getMessage(ProductInformationPanel.class, "LBL_Close")); // NOI18N - jButton2.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - jButton2ActionPerformed(evt); - } - }); - gridBagConstraints = new java.awt.GridBagConstraints(); - gridBagConstraints.weightx = 1.0; - gridBagConstraints.weighty = 1.0; - jPanel1.add(jButton2, gridBagConstraints); - jScrollPane3.setBorder(null); copyright.setBorder(null); - copyright.setContentType("text/html"); + copyright.setContentType("text/html"); // NOI18N copyright.setEditable(false); copyright.setText(org.openide.util.NbBundle.getBundle(ProductInformationPanel.class).getString("LBL_Copyright")); // NOI18N copyright.addMouseListener(new java.awt.event.MouseAdapter() { @@ -117,7 +104,7 @@ class ProductInformationPanel extends JPanel implements HyperlinkListener { }); jScrollPane3.setViewportView(copyright); - description.setContentType("text/html"); + description.setContentType("text/html"); // NOI18N description.setEditable(false); jScrollPane2.setViewportView(description); @@ -129,6 +116,14 @@ class ProductInformationPanel extends JPanel implements HyperlinkListener { } }); + jButton2.setBackground(new java.awt.Color(255, 255, 255)); + jButton2.setText(NbBundle.getMessage(ProductInformationPanel.class, "LBL_Close")); // NOI18N + jButton2.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton2ActionPerformed(evt); + } + }); + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup( @@ -136,13 +131,15 @@ class ProductInformationPanel extends JPanel implements HyperlinkListener { .addGroup(layout.createSequentialGroup() .addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 394, Short.MAX_VALUE) .addComponent(jScrollPane3, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 394, Short.MAX_VALUE) .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, 394, Short.MAX_VALUE) - .addGroup(layout.createSequentialGroup() - .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, 237, Short.MAX_VALUE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(verboseLoggingButton))) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() + .addGap(0, 0, Short.MAX_VALUE) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(verboseLoggingButton, javax.swing.GroupLayout.Alignment.TRAILING) + .addComponent(jButton2, javax.swing.GroupLayout.Alignment.TRAILING)))) .addContainerGap()) ); layout.setVerticalGroup( @@ -151,15 +148,15 @@ class ProductInformationPanel extends JPanel implements HyperlinkListener { .addContainerGap() .addComponent(jLabel1) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) - .addComponent(jScrollPane3, javax.swing.GroupLayout.DEFAULT_SIZE, 101, Short.MAX_VALUE) + .addComponent(jScrollPane3, javax.swing.GroupLayout.DEFAULT_SIZE, 94, Short.MAX_VALUE) .addGap(32, 32, 32) - .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 103, Short.MAX_VALUE) + .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 96, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(layout.createSequentialGroup() - .addGap(27, 27, 27) - .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addComponent(verboseLoggingButton)) + .addComponent(verboseLoggingButton) + .addGap(0, 0, 0) + .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(18, 18, 18) + .addComponent(jButton2) .addContainerGap()) ); }// //GEN-END:initComponents @@ -253,7 +250,11 @@ private void jLabel1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:eve private static String getEncodingValue() { return System.getProperty("file.encoding", "unknown"); } - + + public void setCopyright(String text) { + copyright.setText(text); + } + @Override public void hyperlinkUpdate(HyperlinkEvent event) { if (HyperlinkEvent.EventType.ENTERED == event.getEventType()) { From c86345d7ee3ac5e310d4cb9297b51e827e82d82f Mon Sep 17 00:00:00 2001 From: "Samuel H. Kenyon" Date: Fri, 23 Aug 2013 16:44:49 -0400 Subject: [PATCH 4/5] Latest timestamps. --- .../core/core.jar/org/netbeans/core/startup/Bundle.properties | 4 ++-- .../org/netbeans/core/windows/view/ui/Bundle.properties | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/branding/core/core.jar/org/netbeans/core/startup/Bundle.properties b/branding/core/core.jar/org/netbeans/core/startup/Bundle.properties index 8d7719d668..0c8b9abcbd 100644 --- a/branding/core/core.jar/org/netbeans/core/startup/Bundle.properties +++ b/branding/core/core.jar/org/netbeans/core/startup/Bundle.properties @@ -1,5 +1,5 @@ #Updated by build script -#Wed, 07 Aug 2013 08:19:27 -0400 +#Fri, 23 Aug 2013 15:47:56 -0400 LBL_splash_window_title=Starting Autopsy SPLASH_HEIGHT=288 SPLASH_WIDTH=538 @@ -8,4 +8,4 @@ SplashRunningTextBounds=5,266,530,17 SplashRunningTextColor=0x0 SplashRunningTextFontSize=18 -currentVersion=Autopsy 20130807 +currentVersion=Autopsy 20130823 diff --git a/branding/modules/org-netbeans-core-windows.jar/org/netbeans/core/windows/view/ui/Bundle.properties b/branding/modules/org-netbeans-core-windows.jar/org/netbeans/core/windows/view/ui/Bundle.properties index be1ae09a6d..60b4d85f0e 100644 --- a/branding/modules/org-netbeans-core-windows.jar/org/netbeans/core/windows/view/ui/Bundle.properties +++ b/branding/modules/org-netbeans-core-windows.jar/org/netbeans/core/windows/view/ui/Bundle.properties @@ -1,5 +1,5 @@ #Updated by build script -#Fri, 23 Aug 2013 13:08:16 -0400 +#Fri, 23 Aug 2013 15:47:56 -0400 CTL_MainWindow_Title=Autopsy 20130823 CTL_MainWindow_Title_No_Project=Autopsy 20130823 From 1366f6e26878aa7b84c77f72c32725ac57f2bc0f Mon Sep 17 00:00:00 2001 From: Brian Carrier Date: Sat, 24 Aug 2013 23:22:41 -0400 Subject: [PATCH 5/5] added no arg constructor back to CueBannerPanel --- .../autopsy/casemodule/CueBannerPanel.java | 16 ++++++---------- .../autopsy/casemodule/StartupWindow.java | 2 +- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/CueBannerPanel.java b/Core/src/org/sleuthkit/autopsy/casemodule/CueBannerPanel.java index d28c040669..49c5b313a0 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/CueBannerPanel.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/CueBannerPanel.java @@ -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 diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/StartupWindow.java b/Core/src/org/sleuthkit/autopsy/casemodule/StartupWindow.java index f6f9f540bd..f100123479 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/StartupWindow.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/StartupWindow.java @@ -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() {