From 4ba06e7b74021e70a6ece57fef4cf2eeb49fb382 Mon Sep 17 00:00:00 2001 From: "U-BASIS\\dgrove" Date: Wed, 6 Dec 2017 01:16:56 -0500 Subject: [PATCH 1/5] Reorganized welcome panel and Case menu. --- .../autopsy/casemodule/Bundle.properties | 11 +- .../autopsy/casemodule/Bundle_ja.properties | 4 +- .../autopsy/casemodule/CaseOpenAction.java | 21 ++- .../autopsy/casemodule/CueBannerPanel.form | 52 ++++---- .../autopsy/casemodule/CueBannerPanel.java | 123 ++++++++++-------- Core/src/org/sleuthkit/autopsy/core/layer.xml | 12 +- 6 files changed, 121 insertions(+), 102 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/Bundle.properties b/Core/src/org/sleuthkit/autopsy/casemodule/Bundle.properties index 60db8edaf8..186864c2e4 100755 --- a/Core/src/org/sleuthkit/autopsy/casemodule/Bundle.properties +++ b/Core/src/org/sleuthkit/autopsy/casemodule/Bundle.properties @@ -4,7 +4,6 @@ CTL_CaseCloseAct=Close Case CTL_CaseNewAction=New Case CTL_CasePropertiesAction=Case Properties CTL_CaseDeleteAction=Delete Case -CTL_CaseOpenAction=Open Case Menu/Case/OpenRecentCase=Open Recent Case CTL_CaseDeleteAction=Delete Case OpenIDE-Module-Name=Case @@ -210,14 +209,9 @@ CasePropertiesPanel.lbDbName.text=Database Name: CasePropertiesPanel.lbDbType.text=Case Type: CasePropertiesPanel.caseNumberLabel.text=Case Number: LocalDiskPanel.changeDatabasePathCheckbox.text=Update case to use VHD file upon completion -CueBannerPanel.openMultiUserCaseButton.text= -CueBannerPanel.openExistingCaseButton.text= CueBannerPanel.openRecentCaseButton.text= CueBannerPanel.createNewCaseButton.text= -CueBannerPanel.createNewCaseLabel.text=Create New Case CueBannerPanel.openRecentCaseLabel.text=Open Recent Case -CueBannerPanel.openExistingCaseLabel.text=Open Existing Case -CueBannerPanel.openMultiUserCaseLabel.text=Open Multi-User Case ReviewModeCasePanel.cannotOpenCase=Cannot Open Case ReviewModeCasePanel.casePathNotFound=Case path not found ReviewModeCasePanel.caseIsLocked=Single-user case is locked. @@ -239,3 +233,8 @@ MultiUserCasesPanel.bnRefresh.text=&Refresh MultiUserCasesPanel.bnOpen.text=&Open MultiUserCasesPanel.rbGroupLabel.text=Show cases accessed in the last 10: MultiUserCasesPanel.rbMonths.text=Months +CueBannerPanel.primaryOpenCaseButton.text= +CueBannerPanel.secondaryOpenCaseButton.text= +CueBannerPanel.primaryOpenCaseLabel.text=Open Multi-User Case +CueBannerPanel.secondaryOpenCaseLabel.text=Open Single-User Case +CueBannerPanel.newCaseLabel.text=New Case diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/Bundle_ja.properties b/Core/src/org/sleuthkit/autopsy/casemodule/Bundle_ja.properties index de333e790f..7e70df3316 100755 --- a/Core/src/org/sleuthkit/autopsy/casemodule/Bundle_ja.properties +++ b/Core/src/org/sleuthkit/autopsy/casemodule/Bundle_ja.properties @@ -190,10 +190,10 @@ CasePropertiesPanel.caseNumberLabel.text=\u30b1\u30fc\u30b9\u756a\u53f7\uff1a CasePropertiesPanel.examinerLabel.text=\u8abf\u67fb\u62c5\u5f53\u8005\uff1a OptionalCasePropertiesPanel.examinerLabel.text=\u8abf\u67fb\u62c5\u5f53\u8005\uff1a OptionalCasePropertiesPanel.caseDisplayNameLabel.text=\u30b1\u30fc\u30b9\u756a\u53f7\uff1a -CueBannerPanel.createNewCaseLabel.text=\u65b0\u898f\u30b1\u30fc\u30b9\u3092\u4f5c\u6210 CueBannerPanel.openRecentCaseLabel.text=\u6700\u8fd1\u958b\u3044\u305f\u30b1\u30fc\u30b9\u3092\u958b\u304f -CueBannerPanel.openExistingCaseLabel.text=\u65e2\u5b58\u30b1\u30fc\u30b9\u3092\u958b\u304f CueBannerPanel.openAutoIngestCaseLabel.text=\u65e2\u5b58\u30b1\u30fc\u30b9\u3092\u958b\u304f OpenMultiUserCasePanel.openButton.text=\u958b\u304f OpenMultiUserCasePanel.cancelButton.text=\u30ad\u30e3\u30f3\u30bb\u30eb OpenMultiUserCasePanel.jLabel1.text=\u6700\u8fd1\u958b\u3044\u305f\u30d5\u30a1\u30a4\u30eb +CueBannerPanel.primaryOpenCaseLabel.text=\u65e2\u5b58\u30b1\u30fc\u30b9\u3092\u958b\u304f +CueBannerPanel.newCaseLabel.text=\u65b0\u898f\u30b1\u30fc\u30b9\u3092\u4f5c\u6210 diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/CaseOpenAction.java b/Core/src/org/sleuthkit/autopsy/casemodule/CaseOpenAction.java index e4ed92d897..1237b5600e 100755 --- a/Core/src/org/sleuthkit/autopsy/casemodule/CaseOpenAction.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/CaseOpenAction.java @@ -29,12 +29,16 @@ import javax.swing.JOptionPane; import javax.swing.SwingWorker; import javax.swing.filechooser.FileFilter; import javax.swing.filechooser.FileNameExtensionFilter; +import org.openide.awt.ActionID; +import org.openide.awt.ActionReference; +import org.openide.awt.ActionRegistration; import org.openide.util.HelpCtx; import org.openide.util.NbBundle; import org.openide.util.actions.CallableSystemAction; import org.openide.util.lookup.ServiceProvider; import org.openide.windows.WindowManager; import org.sleuthkit.autopsy.actions.IngestRunningCheck; +import org.sleuthkit.autopsy.core.UserPreferences; import org.sleuthkit.autopsy.coreutils.Logger; import org.sleuthkit.autopsy.coreutils.ModuleSettings; import org.sleuthkit.autopsy.coreutils.Version; @@ -46,6 +50,13 @@ import org.sleuthkit.autopsy.coreutils.Version; * * This action should only be invoked in the event dispatch thread (EDT). */ +@ActionID(category = "Case", id = "org.sleuthkit.autopsy.casemodule.CaseOpenAction") +@ActionReference(path = "Menu/Case", position = 103) +@ActionRegistration(displayName = "#CTL_CaseOpenAction", lazy = false) +@NbBundle.Messages({ + "CTL_CaseOpenAction=Open Case", + "CTL_CaseOpenSingleUserAction=Open Single-User Case" +}) @ServiceProvider(service = CaseOpenAction.class) public final class CaseOpenAction extends CallableSystemAction implements ActionListener { @@ -141,7 +152,15 @@ public final class CaseOpenAction extends CallableSystemAction implements Action @Override public String getName() { - return NbBundle.getMessage(CaseOpenAction.class, "CTL_CaseOpenAction"); + String name; + + if(UserPreferences.getIsMultiUserModeEnabled()) { + name = Bundle.CTL_CaseOpenSingleUserAction(); + } else { + name = Bundle.CTL_CaseOpenAction(); + } + + return name; } @Override diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/CueBannerPanel.form b/Core/src/org/sleuthkit/autopsy/casemodule/CueBannerPanel.form index 0d6525db8b..4e347413ad 100755 --- a/Core/src/org/sleuthkit/autopsy/casemodule/CueBannerPanel.form +++ b/Core/src/org/sleuthkit/autopsy/casemodule/CueBannerPanel.form @@ -27,15 +27,15 @@ - - + + - + - - + + @@ -52,7 +52,7 @@ - + @@ -61,14 +61,14 @@ - - + + - + - + @@ -76,7 +76,7 @@ - + @@ -139,15 +139,15 @@ - + - + - + @@ -163,13 +163,13 @@ - + - + @@ -184,18 +184,18 @@ - + - + - + - + @@ -216,13 +216,13 @@ - + - + @@ -237,18 +237,18 @@ - + - + - + - + diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/CueBannerPanel.java b/Core/src/org/sleuthkit/autopsy/casemodule/CueBannerPanel.java index 2c81d100e4..4d0fbd5abc 100755 --- a/Core/src/org/sleuthkit/autopsy/casemodule/CueBannerPanel.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/CueBannerPanel.java @@ -20,6 +20,7 @@ package org.sleuthkit.autopsy.casemodule; import java.awt.Dialog; import java.awt.Dimension; +import java.awt.Rectangle; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.KeyEvent; @@ -107,9 +108,15 @@ public class CueBannerPanel extends javax.swing.JPanel { openRecentCaseButton.setEnabled(enableOpenRecentCaseButton); openRecentCaseLabel.setEnabled(enableOpenRecentCaseButton); - boolean enableOpenMultiUserCaseButton = UserPreferences.getIsMultiUserModeEnabled(); - openMultiUserCaseButton.setEnabled(enableOpenMultiUserCaseButton); - openMultiUserCaseLabel.setEnabled(enableOpenMultiUserCaseButton); + if(UserPreferences.getIsMultiUserModeEnabled()) { + primaryOpenCaseLabel.setText("Open Multi-User Case"); + secondaryOpenCaseButton.setVisible(true); + secondaryOpenCaseLabel.setVisible(true); + } else { + primaryOpenCaseLabel.setText("Open Case"); + secondaryOpenCaseButton.setVisible(false); + secondaryOpenCaseLabel.setVisible(false); + } } /** @@ -125,14 +132,14 @@ public class CueBannerPanel extends javax.swing.JPanel { this.autopsyLogo.setText(""); createNewCaseButton = new javax.swing.JButton(); openRecentCaseButton = new javax.swing.JButton(); - createNewCaseLabel = new javax.swing.JLabel(); + newCaseLabel = new javax.swing.JLabel(); openRecentCaseLabel = new javax.swing.JLabel(); - openExistingCaseButton = new javax.swing.JButton(); - openExistingCaseLabel = new javax.swing.JLabel(); + primaryOpenCaseButton = new javax.swing.JButton(); + primaryOpenCaseLabel = new javax.swing.JLabel(); closeButton = new javax.swing.JButton(); jSeparator1 = new javax.swing.JSeparator(); - openMultiUserCaseButton = new javax.swing.JButton(); - openMultiUserCaseLabel = new javax.swing.JLabel(); + secondaryOpenCaseButton = new javax.swing.JButton(); + secondaryOpenCaseLabel = new javax.swing.JLabel(); autopsyLogo.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/casemodule/welcome_logo.png"))); // NOI18N autopsyLogo.setText(org.openide.util.NbBundle.getMessage(CueBannerPanel.class, "CueBannerPanel.autopsyLogo.text")); // NOI18N @@ -161,48 +168,48 @@ public class CueBannerPanel extends javax.swing.JPanel { } }); - createNewCaseLabel.setFont(createNewCaseLabel.getFont().deriveFont(createNewCaseLabel.getFont().getStyle() & ~java.awt.Font.BOLD, 13)); - createNewCaseLabel.setText(org.openide.util.NbBundle.getMessage(CueBannerPanel.class, "CueBannerPanel.createNewCaseLabel.text")); // NOI18N + newCaseLabel.setFont(newCaseLabel.getFont().deriveFont(newCaseLabel.getFont().getStyle() & ~java.awt.Font.BOLD, 13)); + newCaseLabel.setText(org.openide.util.NbBundle.getMessage(CueBannerPanel.class, "CueBannerPanel.newCaseLabel.text")); // NOI18N openRecentCaseLabel.setFont(openRecentCaseLabel.getFont().deriveFont(openRecentCaseLabel.getFont().getStyle() & ~java.awt.Font.BOLD, 13)); openRecentCaseLabel.setText(org.openide.util.NbBundle.getMessage(CueBannerPanel.class, "CueBannerPanel.openRecentCaseLabel.text")); // NOI18N - openExistingCaseButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/casemodule/btn_icon_open_existing.png"))); // NOI18N - openExistingCaseButton.setText(org.openide.util.NbBundle.getMessage(CueBannerPanel.class, "CueBannerPanel.openExistingCaseButton.text")); // NOI18N - openExistingCaseButton.setBorder(null); - openExistingCaseButton.setBorderPainted(false); - openExistingCaseButton.setContentAreaFilled(false); - openExistingCaseButton.setMargin(new java.awt.Insets(1, 1, 1, 1)); - openExistingCaseButton.setPreferredSize(new java.awt.Dimension(64, 64)); - openExistingCaseButton.addActionListener(new java.awt.event.ActionListener() { + primaryOpenCaseButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/casemodule/btn_icon_open_existing.png"))); // NOI18N + primaryOpenCaseButton.setText(org.openide.util.NbBundle.getMessage(CueBannerPanel.class, "CueBannerPanel.primaryOpenCaseButton.text")); // NOI18N + primaryOpenCaseButton.setBorder(null); + primaryOpenCaseButton.setBorderPainted(false); + primaryOpenCaseButton.setContentAreaFilled(false); + primaryOpenCaseButton.setMargin(new java.awt.Insets(1, 1, 1, 1)); + primaryOpenCaseButton.setPreferredSize(new java.awt.Dimension(64, 64)); + primaryOpenCaseButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { - openExistingCaseButtonActionPerformed(evt); + primaryOpenCaseButtonActionPerformed(evt); } }); - openExistingCaseLabel.setFont(openExistingCaseLabel.getFont().deriveFont(openExistingCaseLabel.getFont().getStyle() & ~java.awt.Font.BOLD, 13)); - openExistingCaseLabel.setText(org.openide.util.NbBundle.getMessage(CueBannerPanel.class, "CueBannerPanel.openExistingCaseLabel.text")); // NOI18N + primaryOpenCaseLabel.setFont(primaryOpenCaseLabel.getFont().deriveFont(primaryOpenCaseLabel.getFont().getStyle() & ~java.awt.Font.BOLD, 13)); + primaryOpenCaseLabel.setText(org.openide.util.NbBundle.getMessage(CueBannerPanel.class, "CueBannerPanel.primaryOpenCaseLabel.text")); // NOI18N closeButton.setFont(closeButton.getFont().deriveFont(closeButton.getFont().getStyle() & ~java.awt.Font.BOLD, 11)); closeButton.setText(org.openide.util.NbBundle.getMessage(CueBannerPanel.class, "CueBannerPanel.closeButton.text")); // NOI18N jSeparator1.setOrientation(javax.swing.SwingConstants.VERTICAL); - openMultiUserCaseButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/casemodule/btn_icon_open_existing.png"))); // NOI18N - openMultiUserCaseButton.setText(org.openide.util.NbBundle.getMessage(CueBannerPanel.class, "CueBannerPanel.openMultiUserCaseButton.text")); // NOI18N - openMultiUserCaseButton.setBorder(null); - openMultiUserCaseButton.setBorderPainted(false); - openMultiUserCaseButton.setContentAreaFilled(false); - openMultiUserCaseButton.setMargin(new java.awt.Insets(1, 1, 1, 1)); - openMultiUserCaseButton.setPreferredSize(new java.awt.Dimension(64, 64)); - openMultiUserCaseButton.addActionListener(new java.awt.event.ActionListener() { + secondaryOpenCaseButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/casemodule/btn_icon_open_existing.png"))); // NOI18N + secondaryOpenCaseButton.setText(org.openide.util.NbBundle.getMessage(CueBannerPanel.class, "CueBannerPanel.secondaryOpenCaseButton.text")); // NOI18N + secondaryOpenCaseButton.setBorder(null); + secondaryOpenCaseButton.setBorderPainted(false); + secondaryOpenCaseButton.setContentAreaFilled(false); + secondaryOpenCaseButton.setMargin(new java.awt.Insets(1, 1, 1, 1)); + secondaryOpenCaseButton.setPreferredSize(new java.awt.Dimension(64, 64)); + secondaryOpenCaseButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { - openMultiUserCaseButtonActionPerformed(evt); + secondaryOpenCaseButtonActionPerformed(evt); } }); - openMultiUserCaseLabel.setFont(openMultiUserCaseLabel.getFont().deriveFont(openMultiUserCaseLabel.getFont().getStyle() & ~java.awt.Font.BOLD, 13)); - openMultiUserCaseLabel.setText(org.openide.util.NbBundle.getMessage(CueBannerPanel.class, "CueBannerPanel.openMultiUserCaseLabel.text")); // NOI18N + secondaryOpenCaseLabel.setFont(secondaryOpenCaseLabel.getFont().deriveFont(secondaryOpenCaseLabel.getFont().getStyle() & ~java.awt.Font.BOLD, 13)); + secondaryOpenCaseLabel.setText(org.openide.util.NbBundle.getMessage(CueBannerPanel.class, "CueBannerPanel.secondaryOpenCaseLabel.text")); // NOI18N javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); this.setLayout(layout); @@ -219,14 +226,14 @@ public class CueBannerPanel extends javax.swing.JPanel { .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER) .addComponent(createNewCaseButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(openRecentCaseButton, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(openExistingCaseButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(openMultiUserCaseButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addComponent(primaryOpenCaseButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(secondaryOpenCaseButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(createNewCaseLabel) + .addComponent(newCaseLabel) .addComponent(openRecentCaseLabel) - .addComponent(openExistingCaseLabel) - .addComponent(openMultiUserCaseLabel))) + .addComponent(primaryOpenCaseLabel) + .addComponent(secondaryOpenCaseLabel))) .addComponent(closeButton, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 73, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap()) ); @@ -238,24 +245,24 @@ public class CueBannerPanel extends javax.swing.JPanel { .addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER) .addComponent(createNewCaseButton, javax.swing.GroupLayout.PREFERRED_SIZE, 56, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(createNewCaseLabel)) + .addComponent(newCaseLabel)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER) .addComponent(openRecentCaseButton, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(openRecentCaseLabel)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER) - .addComponent(openExistingCaseButton, javax.swing.GroupLayout.PREFERRED_SIZE, 58, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(openExistingCaseLabel)) + .addComponent(primaryOpenCaseButton, javax.swing.GroupLayout.PREFERRED_SIZE, 58, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(primaryOpenCaseLabel)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(openMultiUserCaseButton, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 58, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(secondaryOpenCaseButton, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 58, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() - .addComponent(openMultiUserCaseLabel) + .addComponent(secondaryOpenCaseLabel) .addGap(20, 20, 20)))) .addComponent(jSeparator1) .addComponent(autopsyLogo, javax.swing.GroupLayout.PREFERRED_SIZE, 257, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 10, Short.MAX_VALUE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(closeButton) .addContainerGap()) ); @@ -265,9 +272,15 @@ public class CueBannerPanel extends javax.swing.JPanel { Lookup.getDefault().lookup(CaseNewActionInterface.class).actionPerformed(evt); }//GEN-LAST:event_createNewCaseButtonActionPerformed - private void openExistingCaseButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_openExistingCaseButtonActionPerformed - Lookup.getDefault().lookup(CaseOpenAction.class).actionPerformed(evt); - }//GEN-LAST:event_openExistingCaseButtonActionPerformed + private void primaryOpenCaseButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_primaryOpenCaseButtonActionPerformed + if(UserPreferences.getIsMultiUserModeEnabled()) { + MultiUserCasesDialog multiUserCaseWindow = MultiUserCasesDialog.getInstance(); + multiUserCaseWindow.setLocationRelativeTo(WindowManager.getDefault().getMainWindow()); + multiUserCaseWindow.setVisible(true); + } else { + Lookup.getDefault().lookup(CaseOpenAction.class).actionPerformed(evt); + } + }//GEN-LAST:event_primaryOpenCaseButtonActionPerformed private void openRecentCaseButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_openRecentCaseButtonActionPerformed recentCasesWindow.setLocationRelativeTo(WindowManager.getDefault().getMainWindow()); @@ -275,24 +288,22 @@ public class CueBannerPanel extends javax.swing.JPanel { recentCasesWindow.setVisible(true); }//GEN-LAST:event_openRecentCaseButtonActionPerformed - private void openMultiUserCaseButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_openMultiUserCaseButtonActionPerformed - MultiUserCasesDialog multiUserCaseWindow = MultiUserCasesDialog.getInstance(); - multiUserCaseWindow.setLocationRelativeTo(WindowManager.getDefault().getMainWindow()); - multiUserCaseWindow.setVisible(true); - }//GEN-LAST:event_openMultiUserCaseButtonActionPerformed + private void secondaryOpenCaseButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_secondaryOpenCaseButtonActionPerformed + Lookup.getDefault().lookup(CaseOpenAction.class).actionPerformed(evt); + }//GEN-LAST:event_secondaryOpenCaseButtonActionPerformed // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JLabel autopsyLogo; private javax.swing.JButton closeButton; private javax.swing.JButton createNewCaseButton; - private javax.swing.JLabel createNewCaseLabel; private javax.swing.JSeparator jSeparator1; - private javax.swing.JButton openMultiUserCaseButton; - private javax.swing.JLabel openMultiUserCaseLabel; - private javax.swing.JButton openExistingCaseButton; - private javax.swing.JLabel openExistingCaseLabel; + private javax.swing.JLabel newCaseLabel; private javax.swing.JButton openRecentCaseButton; private javax.swing.JLabel openRecentCaseLabel; + private javax.swing.JButton primaryOpenCaseButton; + private javax.swing.JLabel primaryOpenCaseLabel; + private javax.swing.JButton secondaryOpenCaseButton; + private javax.swing.JLabel secondaryOpenCaseLabel; // End of variables declaration//GEN-END:variables } diff --git a/Core/src/org/sleuthkit/autopsy/core/layer.xml b/Core/src/org/sleuthkit/autopsy/core/layer.xml index fb5618c6e6..9939e747b6 100755 --- a/Core/src/org/sleuthkit/autopsy/core/layer.xml +++ b/Core/src/org/sleuthkit/autopsy/core/layer.xml @@ -49,12 +49,6 @@ - - - - - - @@ -152,12 +146,8 @@ - - - - - + From e16b0636d2eef5699b66111d45193c01fbc4da4c Mon Sep 17 00:00:00 2001 From: "U-BASIS\\dgrove" Date: Thu, 7 Dec 2017 14:35:29 -0500 Subject: [PATCH 2/5] Implemented dynamic 'Open Case' button and menu item. --- .../autopsy/casemodule/Bundle.properties | 7 +- .../autopsy/casemodule/Bundle_ja.properties | 2 +- .../autopsy/casemodule/CaseOpenAction.java | 53 ++++--- .../casemodule/CaseOpenMultiUserAction.java | 91 ------------ .../autopsy/casemodule/CueBannerPanel.form | 120 +++++---------- .../autopsy/casemodule/CueBannerPanel.java | 139 ++++++------------ .../casemodule/MultiUserCasesPanel.form | 23 ++- .../casemodule/MultiUserCasesPanel.java | 29 +++- Core/src/org/sleuthkit/autopsy/core/layer.xml | 4 +- 9 files changed, 167 insertions(+), 301 deletions(-) delete mode 100755 Core/src/org/sleuthkit/autopsy/casemodule/CaseOpenMultiUserAction.java diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/Bundle.properties b/Core/src/org/sleuthkit/autopsy/casemodule/Bundle.properties index 186864c2e4..cc75f4d6a9 100755 --- a/Core/src/org/sleuthkit/autopsy/casemodule/Bundle.properties +++ b/Core/src/org/sleuthkit/autopsy/casemodule/Bundle.properties @@ -233,8 +233,7 @@ MultiUserCasesPanel.bnRefresh.text=&Refresh MultiUserCasesPanel.bnOpen.text=&Open MultiUserCasesPanel.rbGroupLabel.text=Show cases accessed in the last 10: MultiUserCasesPanel.rbMonths.text=Months -CueBannerPanel.primaryOpenCaseButton.text= -CueBannerPanel.secondaryOpenCaseButton.text= -CueBannerPanel.primaryOpenCaseLabel.text=Open Multi-User Case -CueBannerPanel.secondaryOpenCaseLabel.text=Open Single-User Case CueBannerPanel.newCaseLabel.text=New Case +CueBannerPanel.openCaseButton.text= +CueBannerPanel.openCaseLabel.text=Open Case +MultiUserCasesPanel.bnOpenSingleUserCase.text=Open Single-User Case... diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/Bundle_ja.properties b/Core/src/org/sleuthkit/autopsy/casemodule/Bundle_ja.properties index 7e70df3316..8b7bfae3eb 100755 --- a/Core/src/org/sleuthkit/autopsy/casemodule/Bundle_ja.properties +++ b/Core/src/org/sleuthkit/autopsy/casemodule/Bundle_ja.properties @@ -195,5 +195,5 @@ CueBannerPanel.openAutoIngestCaseLabel.text=\u65e2\u5b58\u30b1\u30fc\u30b9\u3092 OpenMultiUserCasePanel.openButton.text=\u958b\u304f OpenMultiUserCasePanel.cancelButton.text=\u30ad\u30e3\u30f3\u30bb\u30eb OpenMultiUserCasePanel.jLabel1.text=\u6700\u8fd1\u958b\u3044\u305f\u30d5\u30a1\u30a4\u30eb -CueBannerPanel.primaryOpenCaseLabel.text=\u65e2\u5b58\u30b1\u30fc\u30b9\u3092\u958b\u304f CueBannerPanel.newCaseLabel.text=\u65b0\u898f\u30b1\u30fc\u30b9\u3092\u4f5c\u6210 +CueBannerPanel.openCaseLabel.text=\u65e2\u5b58\u30b1\u30fc\u30b9\u3092\u958b\u304f diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/CaseOpenAction.java b/Core/src/org/sleuthkit/autopsy/casemodule/CaseOpenAction.java index 1237b5600e..202b2ee3c3 100755 --- a/Core/src/org/sleuthkit/autopsy/casemodule/CaseOpenAction.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/CaseOpenAction.java @@ -24,6 +24,7 @@ import java.awt.event.ActionListener; import java.io.File; import java.util.concurrent.ExecutionException; import java.util.logging.Level; +import javax.swing.JDialog; import javax.swing.JFileChooser; import javax.swing.JOptionPane; import javax.swing.SwingWorker; @@ -51,18 +52,17 @@ import org.sleuthkit.autopsy.coreutils.Version; * This action should only be invoked in the event dispatch thread (EDT). */ @ActionID(category = "Case", id = "org.sleuthkit.autopsy.casemodule.CaseOpenAction") -@ActionReference(path = "Menu/Case", position = 103) +@ActionReference(path = "Menu/Case", position = 102) @ActionRegistration(displayName = "#CTL_CaseOpenAction", lazy = false) -@NbBundle.Messages({ - "CTL_CaseOpenAction=Open Case", - "CTL_CaseOpenSingleUserAction=Open Single-User Case" -}) +@NbBundle.Messages({"CTL_CaseOpenAction=Open Case",}) @ServiceProvider(service = CaseOpenAction.class) public final class CaseOpenAction extends CallableSystemAction implements ActionListener { private static final long serialVersionUID = 1L; + private static final String DISPLAY_NAME = Bundle.CTL_CaseOpenAction(); private static final String PROP_BASECASE = "LBL_BaseCase_PATH"; //NON-NLS private static final Logger logger = Logger.getLogger(CaseOpenAction.class.getName()); + private static JDialog multiUserCaseWindow; private final JFileChooser fileChooser = new JFileChooser(); private final FileFilter caseMetadataFileFilter; @@ -71,7 +71,6 @@ public final class CaseOpenAction extends CallableSystemAction implements Action * the layer.xml file, a toolbar button, and the Create New Case button of * the start up window that allows a user to open a case. It opens an * existing case. - * */ public CaseOpenAction() { caseMetadataFileFilter = new FileNameExtensionFilter(NbBundle.getMessage(CaseOpenAction.class, "CaseOpenAction.autFilter.title", Version.getName(), CaseMetadata.getFileExtension()), CaseMetadata.getFileExtension().substring(1)); @@ -85,13 +84,11 @@ public final class CaseOpenAction extends CallableSystemAction implements Action } /** - * Pops up a file chooser to allow the user to select a case metadata file - * (.aut file) and attempts to open the case described by the file. - * - * @param e The action event. + * Open the case selection window to allow the user to select a case + * metadata file (.aut file). Upon confirming the selection, it will attempt + * to open the case described by the file. */ - @Override - public void actionPerformed(ActionEvent e) { + void openCaseSelectionWindow() { String optionsDlgTitle = NbBundle.getMessage(Case.class, "CloseCaseWhileIngesting.Warning.title"); String optionsDlgMessage = NbBundle.getMessage(Case.class, "CloseCaseWhileIngesting.Warning"); if (IngestRunningCheck.checkAndConfirmProceed(optionsDlgTitle, optionsDlgMessage)) { @@ -105,6 +102,9 @@ public final class CaseOpenAction extends CallableSystemAction implements Action * Close the startup window, if it is open. */ StartupWindowProvider.getInstance().close(); + if (multiUserCaseWindow != null) { + multiUserCaseWindow.setVisible(false); + } /* * Try to open the case associated with the case metadata file @@ -145,6 +145,25 @@ public final class CaseOpenAction extends CallableSystemAction implements Action } } + /** + * Pops up either the case selection window or the Open Multi-User Case + * window, depending on the multi-user case settings. + * + * @param e The action event. + */ + @Override + public void actionPerformed(ActionEvent e) { + if (UserPreferences.getIsMultiUserModeEnabled()) { + if (multiUserCaseWindow == null) { + multiUserCaseWindow = MultiUserCasesDialog.getInstance(); + } + multiUserCaseWindow.setLocationRelativeTo(WindowManager.getDefault().getMainWindow()); + multiUserCaseWindow.setVisible(true); + } else { + openCaseSelectionWindow(); + } + } + @Override public void performAction() { actionPerformed(null); @@ -152,15 +171,7 @@ public final class CaseOpenAction extends CallableSystemAction implements Action @Override public String getName() { - String name; - - if(UserPreferences.getIsMultiUserModeEnabled()) { - name = Bundle.CTL_CaseOpenSingleUserAction(); - } else { - name = Bundle.CTL_CaseOpenAction(); - } - - return name; + return DISPLAY_NAME; } @Override diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/CaseOpenMultiUserAction.java b/Core/src/org/sleuthkit/autopsy/casemodule/CaseOpenMultiUserAction.java deleted file mode 100755 index 7a12b69cf7..0000000000 --- a/Core/src/org/sleuthkit/autopsy/casemodule/CaseOpenMultiUserAction.java +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Autopsy Forensic Browser - * - * Copyright 2011-2017 Basis Technology Corp. - * Contact: carrier sleuthkit org - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.sleuthkit.autopsy.casemodule; - -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; -import javax.swing.JDialog; -import org.openide.awt.ActionID; -import org.openide.awt.ActionReference; -import org.openide.awt.ActionRegistration; -import org.openide.util.HelpCtx; -import org.openide.util.NbBundle; -import org.openide.util.actions.CallableSystemAction; -import org.openide.windows.WindowManager; -import org.sleuthkit.autopsy.core.UserPreferences; - -/** - * The action associated with the Open Multi-User Case menu item via the - * layer.xml file. - * - * This action should only be invoked in the event dispatch thread (EDT). - */ -@ActionID(category = "Case", id = "org.sleuthkit.autopsy.casemodule.CaseOpenMultiUserAction") -@ActionReference(path = "Menu/Case", position = 102) -@ActionRegistration(displayName = "#CTL_CaseOpenMultiUserAction", lazy = false) -@NbBundle.Messages({"CTL_CaseOpenMultiUserAction=Open Multi-User Case"}) -public final class CaseOpenMultiUserAction extends CallableSystemAction implements ActionListener { - - private static final long serialVersionUID = 1L; - private static JDialog multiUserCaseWindow; - - private static final String DISPLAY_NAME = Bundle.CTL_CaseOpenMultiUserAction(); - - public CaseOpenMultiUserAction() {} - - @Override - public boolean isEnabled() { - return UserPreferences.getIsMultiUserModeEnabled(); - } - - /** - * Pops up a case selection panel to allow the user to select a multi-user - * case to open. - * - * @param event The action event. - */ - @Override - public void actionPerformed(ActionEvent event) { - if(multiUserCaseWindow == null) { - multiUserCaseWindow = MultiUserCasesDialog.getInstance(); - } - multiUserCaseWindow.setLocationRelativeTo(WindowManager.getDefault().getMainWindow()); - multiUserCaseWindow.setVisible(true); - } - - @Override - public void performAction() { - actionPerformed(null); - } - - @Override - public String getName() { - return DISPLAY_NAME; - } - - @Override - public HelpCtx getHelpCtx() { - return HelpCtx.DEFAULT_HELP; - } - - @Override - public boolean asynchronous() { - return false; // run on edt - } -} diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/CueBannerPanel.form b/Core/src/org/sleuthkit/autopsy/casemodule/CueBannerPanel.form index 4e347413ad..83f2662859 100755 --- a/Core/src/org/sleuthkit/autopsy/casemodule/CueBannerPanel.form +++ b/Core/src/org/sleuthkit/autopsy/casemodule/CueBannerPanel.form @@ -18,29 +18,31 @@ + @@ -48,37 +50,31 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - + - - @@ -163,13 +159,13 @@ - + - + @@ -184,18 +180,18 @@ - + - + - + - + @@ -216,41 +212,5 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/CueBannerPanel.java b/Core/src/org/sleuthkit/autopsy/casemodule/CueBannerPanel.java index 4d0fbd5abc..241f89cf62 100755 --- a/Core/src/org/sleuthkit/autopsy/casemodule/CueBannerPanel.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/CueBannerPanel.java @@ -20,7 +20,6 @@ package org.sleuthkit.autopsy.casemodule; import java.awt.Dialog; import java.awt.Dimension; -import java.awt.Rectangle; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.KeyEvent; @@ -107,16 +106,6 @@ public class CueBannerPanel extends javax.swing.JPanel { boolean enableOpenRecentCaseButton = (RecentCases.getInstance().getTotalRecentCases() > 0); openRecentCaseButton.setEnabled(enableOpenRecentCaseButton); openRecentCaseLabel.setEnabled(enableOpenRecentCaseButton); - - if(UserPreferences.getIsMultiUserModeEnabled()) { - primaryOpenCaseLabel.setText("Open Multi-User Case"); - secondaryOpenCaseButton.setVisible(true); - secondaryOpenCaseLabel.setVisible(true); - } else { - primaryOpenCaseLabel.setText("Open Case"); - secondaryOpenCaseButton.setVisible(false); - secondaryOpenCaseLabel.setVisible(false); - } } /** @@ -134,12 +123,10 @@ public class CueBannerPanel extends javax.swing.JPanel { openRecentCaseButton = new javax.swing.JButton(); newCaseLabel = new javax.swing.JLabel(); openRecentCaseLabel = new javax.swing.JLabel(); - primaryOpenCaseButton = new javax.swing.JButton(); - primaryOpenCaseLabel = new javax.swing.JLabel(); + openCaseButton = new javax.swing.JButton(); + openCaseLabel = new javax.swing.JLabel(); closeButton = new javax.swing.JButton(); jSeparator1 = new javax.swing.JSeparator(); - secondaryOpenCaseButton = new javax.swing.JButton(); - secondaryOpenCaseLabel = new javax.swing.JLabel(); autopsyLogo.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/casemodule/welcome_logo.png"))); // NOI18N autopsyLogo.setText(org.openide.util.NbBundle.getMessage(CueBannerPanel.class, "CueBannerPanel.autopsyLogo.text")); // NOI18N @@ -174,97 +161,77 @@ public class CueBannerPanel extends javax.swing.JPanel { openRecentCaseLabel.setFont(openRecentCaseLabel.getFont().deriveFont(openRecentCaseLabel.getFont().getStyle() & ~java.awt.Font.BOLD, 13)); openRecentCaseLabel.setText(org.openide.util.NbBundle.getMessage(CueBannerPanel.class, "CueBannerPanel.openRecentCaseLabel.text")); // NOI18N - primaryOpenCaseButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/casemodule/btn_icon_open_existing.png"))); // NOI18N - primaryOpenCaseButton.setText(org.openide.util.NbBundle.getMessage(CueBannerPanel.class, "CueBannerPanel.primaryOpenCaseButton.text")); // NOI18N - primaryOpenCaseButton.setBorder(null); - primaryOpenCaseButton.setBorderPainted(false); - primaryOpenCaseButton.setContentAreaFilled(false); - primaryOpenCaseButton.setMargin(new java.awt.Insets(1, 1, 1, 1)); - primaryOpenCaseButton.setPreferredSize(new java.awt.Dimension(64, 64)); - primaryOpenCaseButton.addActionListener(new java.awt.event.ActionListener() { + openCaseButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/casemodule/btn_icon_open_existing.png"))); // NOI18N + openCaseButton.setText(org.openide.util.NbBundle.getMessage(CueBannerPanel.class, "CueBannerPanel.openCaseButton.text")); // NOI18N + openCaseButton.setBorder(null); + openCaseButton.setBorderPainted(false); + openCaseButton.setContentAreaFilled(false); + openCaseButton.setMargin(new java.awt.Insets(1, 1, 1, 1)); + openCaseButton.setPreferredSize(new java.awt.Dimension(64, 64)); + openCaseButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { - primaryOpenCaseButtonActionPerformed(evt); + openCaseButtonActionPerformed(evt); } }); - primaryOpenCaseLabel.setFont(primaryOpenCaseLabel.getFont().deriveFont(primaryOpenCaseLabel.getFont().getStyle() & ~java.awt.Font.BOLD, 13)); - primaryOpenCaseLabel.setText(org.openide.util.NbBundle.getMessage(CueBannerPanel.class, "CueBannerPanel.primaryOpenCaseLabel.text")); // NOI18N + openCaseLabel.setFont(openCaseLabel.getFont().deriveFont(openCaseLabel.getFont().getStyle() & ~java.awt.Font.BOLD, 13)); + openCaseLabel.setText(org.openide.util.NbBundle.getMessage(CueBannerPanel.class, "CueBannerPanel.openCaseLabel.text")); // NOI18N closeButton.setFont(closeButton.getFont().deriveFont(closeButton.getFont().getStyle() & ~java.awt.Font.BOLD, 11)); closeButton.setText(org.openide.util.NbBundle.getMessage(CueBannerPanel.class, "CueBannerPanel.closeButton.text")); // NOI18N jSeparator1.setOrientation(javax.swing.SwingConstants.VERTICAL); - secondaryOpenCaseButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/casemodule/btn_icon_open_existing.png"))); // NOI18N - secondaryOpenCaseButton.setText(org.openide.util.NbBundle.getMessage(CueBannerPanel.class, "CueBannerPanel.secondaryOpenCaseButton.text")); // NOI18N - secondaryOpenCaseButton.setBorder(null); - secondaryOpenCaseButton.setBorderPainted(false); - secondaryOpenCaseButton.setContentAreaFilled(false); - secondaryOpenCaseButton.setMargin(new java.awt.Insets(1, 1, 1, 1)); - secondaryOpenCaseButton.setPreferredSize(new java.awt.Dimension(64, 64)); - secondaryOpenCaseButton.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - secondaryOpenCaseButtonActionPerformed(evt); - } - }); - - secondaryOpenCaseLabel.setFont(secondaryOpenCaseLabel.getFont().deriveFont(secondaryOpenCaseLabel.getFont().getStyle() & ~java.awt.Font.BOLD, 13)); - secondaryOpenCaseLabel.setText(org.openide.util.NbBundle.getMessage(CueBannerPanel.class, "CueBannerPanel.secondaryOpenCaseLabel.text")); // NOI18N - javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() + .addComponent(autopsyLogo) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 5, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() - .addComponent(autopsyLogo) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 5, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER) .addComponent(createNewCaseButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(openRecentCaseButton, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(primaryOpenCaseButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(secondaryOpenCaseButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addComponent(openCaseButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(newCaseLabel) .addComponent(openRecentCaseLabel) - .addComponent(primaryOpenCaseLabel) - .addComponent(secondaryOpenCaseLabel))) - .addComponent(closeButton, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 73, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addContainerGap()) + .addComponent(openCaseLabel)) + .addGap(18, 18, 18)) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 139, Short.MAX_VALUE) + .addComponent(closeButton, javax.swing.GroupLayout.PREFERRED_SIZE, 73, javax.swing.GroupLayout.PREFERRED_SIZE) + .addContainerGap()))) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) - .addGroup(layout.createSequentialGroup() - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER) - .addComponent(createNewCaseButton, javax.swing.GroupLayout.PREFERRED_SIZE, 56, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(newCaseLabel)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER) - .addComponent(openRecentCaseButton, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(openRecentCaseLabel)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER) - .addComponent(primaryOpenCaseButton, javax.swing.GroupLayout.PREFERRED_SIZE, 58, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(primaryOpenCaseLabel)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(secondaryOpenCaseButton, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 58, javax.swing.GroupLayout.PREFERRED_SIZE) - .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() - .addComponent(secondaryOpenCaseLabel) - .addGap(20, 20, 20)))) - .addComponent(jSeparator1) - .addComponent(autopsyLogo, javax.swing.GroupLayout.PREFERRED_SIZE, 257, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(closeButton) - .addContainerGap()) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(autopsyLogo, javax.swing.GroupLayout.PREFERRED_SIZE, 257, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) + .addGroup(layout.createSequentialGroup() + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER) + .addComponent(createNewCaseButton, javax.swing.GroupLayout.PREFERRED_SIZE, 56, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(newCaseLabel)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER) + .addComponent(openRecentCaseButton, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(openRecentCaseLabel)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER) + .addComponent(openCaseButton, javax.swing.GroupLayout.PREFERRED_SIZE, 58, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(openCaseLabel)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(closeButton)) + .addComponent(jSeparator1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 260, javax.swing.GroupLayout.PREFERRED_SIZE))) + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); }// //GEN-END:initComponents @@ -272,15 +239,9 @@ public class CueBannerPanel extends javax.swing.JPanel { Lookup.getDefault().lookup(CaseNewActionInterface.class).actionPerformed(evt); }//GEN-LAST:event_createNewCaseButtonActionPerformed - private void primaryOpenCaseButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_primaryOpenCaseButtonActionPerformed - if(UserPreferences.getIsMultiUserModeEnabled()) { - MultiUserCasesDialog multiUserCaseWindow = MultiUserCasesDialog.getInstance(); - multiUserCaseWindow.setLocationRelativeTo(WindowManager.getDefault().getMainWindow()); - multiUserCaseWindow.setVisible(true); - } else { - Lookup.getDefault().lookup(CaseOpenAction.class).actionPerformed(evt); - } - }//GEN-LAST:event_primaryOpenCaseButtonActionPerformed + private void openCaseButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_openCaseButtonActionPerformed + Lookup.getDefault().lookup(CaseOpenAction.class).actionPerformed(evt); + }//GEN-LAST:event_openCaseButtonActionPerformed private void openRecentCaseButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_openRecentCaseButtonActionPerformed recentCasesWindow.setLocationRelativeTo(WindowManager.getDefault().getMainWindow()); @@ -288,22 +249,16 @@ public class CueBannerPanel extends javax.swing.JPanel { recentCasesWindow.setVisible(true); }//GEN-LAST:event_openRecentCaseButtonActionPerformed - private void secondaryOpenCaseButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_secondaryOpenCaseButtonActionPerformed - Lookup.getDefault().lookup(CaseOpenAction.class).actionPerformed(evt); - }//GEN-LAST:event_secondaryOpenCaseButtonActionPerformed - // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JLabel autopsyLogo; private javax.swing.JButton closeButton; private javax.swing.JButton createNewCaseButton; private javax.swing.JSeparator jSeparator1; private javax.swing.JLabel newCaseLabel; + private javax.swing.JButton openCaseButton; + private javax.swing.JLabel openCaseLabel; private javax.swing.JButton openRecentCaseButton; private javax.swing.JLabel openRecentCaseLabel; - private javax.swing.JButton primaryOpenCaseButton; - private javax.swing.JLabel primaryOpenCaseLabel; - private javax.swing.JButton secondaryOpenCaseButton; - private javax.swing.JLabel secondaryOpenCaseLabel; // End of variables declaration//GEN-END:variables } diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/MultiUserCasesPanel.form b/Core/src/org/sleuthkit/autopsy/casemodule/MultiUserCasesPanel.form index 18d99fa0dc..153f81561f 100755 --- a/Core/src/org/sleuthkit/autopsy/casemodule/MultiUserCasesPanel.form +++ b/Core/src/org/sleuthkit/autopsy/casemodule/MultiUserCasesPanel.form @@ -7,6 +7,9 @@ + + + @@ -30,8 +33,10 @@ + + - + @@ -41,9 +46,8 @@ - + - @@ -60,9 +64,9 @@ + - @@ -72,6 +76,7 @@ + @@ -224,5 +229,15 @@ + + + + + + + + + + diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/MultiUserCasesPanel.java b/Core/src/org/sleuthkit/autopsy/casemodule/MultiUserCasesPanel.java index d0676e1966..e461860b1c 100755 --- a/Core/src/org/sleuthkit/autopsy/casemodule/MultiUserCasesPanel.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/MultiUserCasesPanel.java @@ -35,6 +35,7 @@ import javax.swing.event.ListSelectionEvent; import javax.swing.table.DefaultTableModel; import javax.swing.table.TableColumn; import javax.swing.table.TableRowSorter; +import org.openide.util.Lookup; import org.sleuthkit.autopsy.casemodule.MultiUserCaseManager.MultiUserCase; import org.sleuthkit.autopsy.coordinationservice.CoordinationService; import org.sleuthkit.autopsy.coreutils.Logger; @@ -369,8 +370,10 @@ final class MultiUserCasesPanel extends javax.swing.JPanel { rbWeeks = new javax.swing.JRadioButton(); rbMonths = new javax.swing.JRadioButton(); rbGroupLabel = new javax.swing.JLabel(); + bnOpenSingleUserCase = new javax.swing.JButton(); setName("Completed Cases"); // NOI18N + setPreferredSize(new java.awt.Dimension(960, 485)); org.openide.awt.Mnemonics.setLocalizedText(bnOpen, org.openide.util.NbBundle.getMessage(MultiUserCasesPanel.class, "MultiUserCasesPanel.bnOpen.text")); // NOI18N bnOpen.setEnabled(false); @@ -458,6 +461,13 @@ final class MultiUserCasesPanel extends javax.swing.JPanel { rbGroupLabel.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N org.openide.awt.Mnemonics.setLocalizedText(rbGroupLabel, org.openide.util.NbBundle.getMessage(MultiUserCasesPanel.class, "MultiUserCasesPanel.rbGroupLabel.text")); // NOI18N + org.openide.awt.Mnemonics.setLocalizedText(bnOpenSingleUserCase, org.openide.util.NbBundle.getMessage(MultiUserCasesPanel.class, "MultiUserCasesPanel.bnOpenSingleUserCase.text")); // NOI18N + bnOpenSingleUserCase.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + bnOpenSingleUserCaseActionPerformed(evt); + } + }); + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup( @@ -469,8 +479,10 @@ final class MultiUserCasesPanel extends javax.swing.JPanel { .addGap(4, 4, 4) .addComponent(bnOpen, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(bnOpenSingleUserCase) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(bnShowLog) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 13, Short.MAX_VALUE) .addComponent(rbGroupLabel) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(rbDays) @@ -480,9 +492,8 @@ final class MultiUserCasesPanel extends javax.swing.JPanel { .addComponent(rbMonths) .addGap(0, 0, 0) .addComponent(panelFilter, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) - .addComponent(bnRefresh) - .addGap(4, 4, 4)) + .addGap(14, 14, 14) + .addComponent(bnRefresh)) .addComponent(scrollPaneTable)) .addContainerGap()) ); @@ -495,15 +506,16 @@ final class MultiUserCasesPanel extends javax.swing.JPanel { .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(bnOpen) + .addComponent(bnOpenSingleUserCase) .addComponent(bnShowLog)) - .addComponent(bnRefresh) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(rbDays) .addComponent(rbWeeks) .addComponent(rbMonths) .addComponent(rbGroupLabel)) - .addComponent(panelFilter, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) + .addComponent(panelFilter, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addComponent(bnRefresh, javax.swing.GroupLayout.Alignment.TRAILING)) .addGap(0, 0, 0)) ); }// //GEN-END:initComponents @@ -586,8 +598,13 @@ final class MultiUserCasesPanel extends javax.swing.JPanel { } }//GEN-LAST:event_casesTableMouseClicked + private void bnOpenSingleUserCaseActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_bnOpenSingleUserCaseActionPerformed + Lookup.getDefault().lookup(CaseOpenAction.class).openCaseSelectionWindow(); + }//GEN-LAST:event_bnOpenSingleUserCaseActionPerformed + // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JButton bnOpen; + private javax.swing.JButton bnOpenSingleUserCase; private javax.swing.JButton bnRefresh; private javax.swing.JButton bnShowLog; private javax.swing.JTable casesTable; diff --git a/Core/src/org/sleuthkit/autopsy/core/layer.xml b/Core/src/org/sleuthkit/autopsy/core/layer.xml index 9939e747b6..04c519e181 100755 --- a/Core/src/org/sleuthkit/autopsy/core/layer.xml +++ b/Core/src/org/sleuthkit/autopsy/core/layer.xml @@ -155,11 +155,11 @@ - + - + From 4f20f1ce3fc6d09fa3d6e16cfa61dfe1bf3bc7a9 Mon Sep 17 00:00:00 2001 From: "U-BASIS\\dgrove" Date: Thu, 7 Dec 2017 16:20:41 -0500 Subject: [PATCH 3/5] Cleanup. --- .../autopsy/casemodule/Bundle.properties | 2 +- .../autopsy/casemodule/CaseOpenAction.java | 12 ++++---- .../autopsy/casemodule/CueBannerPanel.form | 10 +++---- .../autopsy/casemodule/CueBannerPanel.java | 29 +++++++++---------- .../casemodule/MultiUserCasesPanel.java | 1 - 5 files changed, 26 insertions(+), 28 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/Bundle.properties b/Core/src/org/sleuthkit/autopsy/casemodule/Bundle.properties index cc75f4d6a9..ba8c4f867a 100755 --- a/Core/src/org/sleuthkit/autopsy/casemodule/Bundle.properties +++ b/Core/src/org/sleuthkit/autopsy/casemodule/Bundle.properties @@ -210,7 +210,6 @@ CasePropertiesPanel.lbDbType.text=Case Type: CasePropertiesPanel.caseNumberLabel.text=Case Number: LocalDiskPanel.changeDatabasePathCheckbox.text=Update case to use VHD file upon completion CueBannerPanel.openRecentCaseButton.text= -CueBannerPanel.createNewCaseButton.text= CueBannerPanel.openRecentCaseLabel.text=Open Recent Case ReviewModeCasePanel.cannotOpenCase=Cannot Open Case ReviewModeCasePanel.casePathNotFound=Case path not found @@ -237,3 +236,4 @@ CueBannerPanel.newCaseLabel.text=New Case CueBannerPanel.openCaseButton.text= CueBannerPanel.openCaseLabel.text=Open Case MultiUserCasesPanel.bnOpenSingleUserCase.text=Open Single-User Case... +CueBannerPanel.newCaseButton.text= diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/CaseOpenAction.java b/Core/src/org/sleuthkit/autopsy/casemodule/CaseOpenAction.java index 202b2ee3c3..5f62b5830a 100755 --- a/Core/src/org/sleuthkit/autopsy/casemodule/CaseOpenAction.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/CaseOpenAction.java @@ -54,23 +54,23 @@ import org.sleuthkit.autopsy.coreutils.Version; @ActionID(category = "Case", id = "org.sleuthkit.autopsy.casemodule.CaseOpenAction") @ActionReference(path = "Menu/Case", position = 102) @ActionRegistration(displayName = "#CTL_CaseOpenAction", lazy = false) -@NbBundle.Messages({"CTL_CaseOpenAction=Open Case",}) +@NbBundle.Messages({"CTL_CaseOpenAction=Open Case"}) @ServiceProvider(service = CaseOpenAction.class) public final class CaseOpenAction extends CallableSystemAction implements ActionListener { private static final long serialVersionUID = 1L; private static final String DISPLAY_NAME = Bundle.CTL_CaseOpenAction(); private static final String PROP_BASECASE = "LBL_BaseCase_PATH"; //NON-NLS - private static final Logger logger = Logger.getLogger(CaseOpenAction.class.getName()); + private static final Logger LOGGER = Logger.getLogger(CaseOpenAction.class.getName()); private static JDialog multiUserCaseWindow; private final JFileChooser fileChooser = new JFileChooser(); private final FileFilter caseMetadataFileFilter; /** * Constructs the action associated with the Case/Open Case menu item via - * the layer.xml file, a toolbar button, and the Create New Case button of - * the start up window that allows a user to open a case. It opens an - * existing case. + * the layer.xml file, a toolbar button, and the Open Case button of the + * start up window that allows a user to open a case. It opens an existing + * case. */ public CaseOpenAction() { caseMetadataFileFilter = new FileNameExtensionFilter(NbBundle.getMessage(CaseOpenAction.class, "CaseOpenAction.autFilter.title", Version.getName(), CaseMetadata.getFileExtension()), CaseMetadata.getFileExtension().substring(1)); @@ -128,7 +128,7 @@ public final class CaseOpenAction extends CallableSystemAction implements Action get(); } catch (InterruptedException | ExecutionException ex) { if (ex instanceof InterruptedException || (null != ex.getCause() && !(ex.getCause() instanceof CaseActionCancelledException))) { - logger.log(Level.SEVERE, String.format("Error opening case with metadata file path %s", path), ex); //NON-NLS + LOGGER.log(Level.SEVERE, String.format("Error opening case with metadata file path %s", path), ex); //NON-NLS JOptionPane.showMessageDialog( WindowManager.getDefault().getMainWindow(), ex.getCause().getMessage(), //get the message of the wrapped exception diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/CueBannerPanel.form b/Core/src/org/sleuthkit/autopsy/casemodule/CueBannerPanel.form index 83f2662859..8e14feba22 100755 --- a/Core/src/org/sleuthkit/autopsy/casemodule/CueBannerPanel.form +++ b/Core/src/org/sleuthkit/autopsy/casemodule/CueBannerPanel.form @@ -25,7 +25,7 @@ - + @@ -55,7 +55,7 @@ - + @@ -93,13 +93,13 @@ - + - + @@ -111,7 +111,7 @@ - + diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/CueBannerPanel.java b/Core/src/org/sleuthkit/autopsy/casemodule/CueBannerPanel.java index 241f89cf62..42e462dc37 100755 --- a/Core/src/org/sleuthkit/autopsy/casemodule/CueBannerPanel.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/CueBannerPanel.java @@ -30,7 +30,6 @@ import javax.swing.KeyStroke; import org.openide.util.Lookup; import org.openide.util.NbBundle; import org.openide.windows.WindowManager; -import org.sleuthkit.autopsy.core.UserPreferences; /* * The panel in the default Autopsy startup window. @@ -119,7 +118,7 @@ public class CueBannerPanel extends javax.swing.JPanel { autopsyLogo = new javax.swing.JLabel(); this.autopsyLogo.setText(""); - createNewCaseButton = new javax.swing.JButton(); + newCaseButton = new javax.swing.JButton(); openRecentCaseButton = new javax.swing.JButton(); newCaseLabel = new javax.swing.JLabel(); openRecentCaseLabel = new javax.swing.JLabel(); @@ -131,15 +130,15 @@ public class CueBannerPanel extends javax.swing.JPanel { autopsyLogo.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/casemodule/welcome_logo.png"))); // NOI18N autopsyLogo.setText(org.openide.util.NbBundle.getMessage(CueBannerPanel.class, "CueBannerPanel.autopsyLogo.text")); // NOI18N - createNewCaseButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/casemodule/btn_icon_create_new_case.png"))); // NOI18N - createNewCaseButton.setText(org.openide.util.NbBundle.getMessage(CueBannerPanel.class, "CueBannerPanel.createNewCaseButton.text")); // NOI18N - createNewCaseButton.setBorder(null); - createNewCaseButton.setBorderPainted(false); - createNewCaseButton.setContentAreaFilled(false); - createNewCaseButton.setPreferredSize(new java.awt.Dimension(64, 64)); - createNewCaseButton.addActionListener(new java.awt.event.ActionListener() { + newCaseButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/casemodule/btn_icon_create_new_case.png"))); // NOI18N + newCaseButton.setText(org.openide.util.NbBundle.getMessage(CueBannerPanel.class, "CueBannerPanel.newCaseButton.text")); // NOI18N + newCaseButton.setBorder(null); + newCaseButton.setBorderPainted(false); + newCaseButton.setContentAreaFilled(false); + newCaseButton.setPreferredSize(new java.awt.Dimension(64, 64)); + newCaseButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { - createNewCaseButtonActionPerformed(evt); + newCaseButtonActionPerformed(evt); } }); @@ -195,7 +194,7 @@ public class CueBannerPanel extends javax.swing.JPanel { .addGroup(layout.createSequentialGroup() .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER) - .addComponent(createNewCaseButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(newCaseButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(openRecentCaseButton, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(openCaseButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) @@ -218,7 +217,7 @@ public class CueBannerPanel extends javax.swing.JPanel { .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) .addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER) - .addComponent(createNewCaseButton, javax.swing.GroupLayout.PREFERRED_SIZE, 56, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(newCaseButton, javax.swing.GroupLayout.PREFERRED_SIZE, 56, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(newCaseLabel)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER) @@ -235,9 +234,9 @@ public class CueBannerPanel extends javax.swing.JPanel { ); }// //GEN-END:initComponents - private void createNewCaseButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_createNewCaseButtonActionPerformed + private void newCaseButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_newCaseButtonActionPerformed Lookup.getDefault().lookup(CaseNewActionInterface.class).actionPerformed(evt); - }//GEN-LAST:event_createNewCaseButtonActionPerformed + }//GEN-LAST:event_newCaseButtonActionPerformed private void openCaseButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_openCaseButtonActionPerformed Lookup.getDefault().lookup(CaseOpenAction.class).actionPerformed(evt); @@ -252,8 +251,8 @@ public class CueBannerPanel extends javax.swing.JPanel { // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JLabel autopsyLogo; private javax.swing.JButton closeButton; - private javax.swing.JButton createNewCaseButton; private javax.swing.JSeparator jSeparator1; + private javax.swing.JButton newCaseButton; private javax.swing.JLabel newCaseLabel; private javax.swing.JButton openCaseButton; private javax.swing.JLabel openCaseLabel; diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/MultiUserCasesPanel.java b/Core/src/org/sleuthkit/autopsy/casemodule/MultiUserCasesPanel.java index e461860b1c..018def8ad3 100755 --- a/Core/src/org/sleuthkit/autopsy/casemodule/MultiUserCasesPanel.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/MultiUserCasesPanel.java @@ -29,7 +29,6 @@ import java.util.List; import java.util.logging.Level; import javax.swing.JDialog; import javax.swing.JOptionPane; -import javax.swing.RowSorter; import javax.swing.SortOrder; import javax.swing.event.ListSelectionEvent; import javax.swing.table.DefaultTableModel; From 6d4eb2af0887e2c58c05d7401e1ba28e8add7949 Mon Sep 17 00:00:00 2001 From: "U-BASIS\\dgrove" Date: Thu, 7 Dec 2017 16:23:16 -0500 Subject: [PATCH 4/5] Cleanup. --- Core/src/org/sleuthkit/autopsy/casemodule/CaseOpenAction.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/CaseOpenAction.java b/Core/src/org/sleuthkit/autopsy/casemodule/CaseOpenAction.java index 5f62b5830a..adb84b680e 100755 --- a/Core/src/org/sleuthkit/autopsy/casemodule/CaseOpenAction.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/CaseOpenAction.java @@ -102,6 +102,10 @@ public final class CaseOpenAction extends CallableSystemAction implements Action * Close the startup window, if it is open. */ StartupWindowProvider.getInstance().close(); + + /* + * Close the Open Multi-User Case window, if it is open. + */ if (multiUserCaseWindow != null) { multiUserCaseWindow.setVisible(false); } From 0d292fb7013a5fee542cb81e5c4cede5b72e5139 Mon Sep 17 00:00:00 2001 From: "U-BASIS\\dgrove" Date: Sun, 10 Dec 2017 20:46:23 -0500 Subject: [PATCH 5/5] Formatting. --- .../org/sleuthkit/autopsy/casemodule/CaseOpenAction.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/CaseOpenAction.java b/Core/src/org/sleuthkit/autopsy/casemodule/CaseOpenAction.java index 50a6ce5ade..a8e18da650 100755 --- a/Core/src/org/sleuthkit/autopsy/casemodule/CaseOpenAction.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/CaseOpenAction.java @@ -102,7 +102,7 @@ public final class CaseOpenAction extends CallableSystemAction implements Action * Close the startup window, if it is open. */ StartupWindowProvider.getInstance().close(); - + /* * Close the Open Multi-User Case window, if it is open. */ @@ -159,13 +159,13 @@ public final class CaseOpenAction extends CallableSystemAction implements Action public void actionPerformed(ActionEvent e) { if (UserPreferences.getIsMultiUserModeEnabled()) { WindowManager.getDefault().getMainWindow().setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); - + if (multiUserCaseWindow == null) { multiUserCaseWindow = MultiUserCasesDialog.getInstance(); } multiUserCaseWindow.setLocationRelativeTo(WindowManager.getDefault().getMainWindow()); multiUserCaseWindow.setVisible(true); - + WindowManager.getDefault().getMainWindow().setCursor(null); } else { openCaseSelectionWindow();