20 package org.sleuthkit.autopsy.casemodule;
22 import java.awt.EventQueue;
23 import java.awt.event.ActionEvent;
24 import java.awt.event.ActionListener;
26 import java.util.logging.Level;
27 import javax.swing.JOptionPane;
28 import javax.swing.JPanel;
29 import org.openide.util.NbBundle;
36 class RecentItems
implements ActionListener {
40 private JPanel caller;
43 public RecentItems(String caseName, String casePath){
44 this.caseName = caseName;
45 this.casePath = casePath;
54 public void actionPerformed(ActionEvent e) {
56 if(caseName.equals(
"") || casePath.equals(
"") || (!
new File(casePath).exists())){
58 JOptionPane.showMessageDialog(caller,
59 NbBundle.getMessage(
this.getClass(),
"RecentItems.openRecentCase.msgDlg.text",
61 NbBundle.getMessage(
this.getClass(),
"RecentItems.openRecentCase.msgDlg.err"),
62 JOptionPane.ERROR_MESSAGE);
63 RecentCases.getInstance().removeRecentCase(caseName, casePath);
66 if (Case.isCaseOpen() ==
false) {
67 EventQueue.invokeLater(
new Runnable() {
71 StartupWindowProvider.getInstance().open();
81 }
catch (CaseActionException ex) {
82 Logger.
getLogger(RecentItems.class.getName()).log(Level.WARNING,
"Error: Couldn't open recent case at " + casePath, ex);
static Logger getLogger(String name)