This commit is contained in:
U-BASIS\dgrove 2017-12-07 16:20:41 -05:00
parent c9bf7c6da3
commit 4f20f1ce3f
5 changed files with 26 additions and 28 deletions

View File

@ -210,7 +210,6 @@ CasePropertiesPanel.lbDbType.text=Case Type:
CasePropertiesPanel.caseNumberLabel.text=Case Number: CasePropertiesPanel.caseNumberLabel.text=Case Number:
LocalDiskPanel.changeDatabasePathCheckbox.text=Update case to use VHD file upon completion LocalDiskPanel.changeDatabasePathCheckbox.text=Update case to use VHD file upon completion
CueBannerPanel.openRecentCaseButton.text= CueBannerPanel.openRecentCaseButton.text=
CueBannerPanel.createNewCaseButton.text=
CueBannerPanel.openRecentCaseLabel.text=Open Recent Case CueBannerPanel.openRecentCaseLabel.text=Open Recent Case
ReviewModeCasePanel.cannotOpenCase=Cannot Open Case ReviewModeCasePanel.cannotOpenCase=Cannot Open Case
ReviewModeCasePanel.casePathNotFound=Case path not found ReviewModeCasePanel.casePathNotFound=Case path not found
@ -237,3 +236,4 @@ CueBannerPanel.newCaseLabel.text=New Case
CueBannerPanel.openCaseButton.text= CueBannerPanel.openCaseButton.text=
CueBannerPanel.openCaseLabel.text=Open Case CueBannerPanel.openCaseLabel.text=Open Case
MultiUserCasesPanel.bnOpenSingleUserCase.text=Open Single-User Case... MultiUserCasesPanel.bnOpenSingleUserCase.text=Open Single-User Case...
CueBannerPanel.newCaseButton.text=

View File

@ -54,23 +54,23 @@ import org.sleuthkit.autopsy.coreutils.Version;
@ActionID(category = "Case", id = "org.sleuthkit.autopsy.casemodule.CaseOpenAction") @ActionID(category = "Case", id = "org.sleuthkit.autopsy.casemodule.CaseOpenAction")
@ActionReference(path = "Menu/Case", position = 102) @ActionReference(path = "Menu/Case", position = 102)
@ActionRegistration(displayName = "#CTL_CaseOpenAction", lazy = false) @ActionRegistration(displayName = "#CTL_CaseOpenAction", lazy = false)
@NbBundle.Messages({"CTL_CaseOpenAction=Open Case",}) @NbBundle.Messages({"CTL_CaseOpenAction=Open Case"})
@ServiceProvider(service = CaseOpenAction.class) @ServiceProvider(service = CaseOpenAction.class)
public final class CaseOpenAction extends CallableSystemAction implements ActionListener { public final class CaseOpenAction extends CallableSystemAction implements ActionListener {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
private static final String DISPLAY_NAME = Bundle.CTL_CaseOpenAction(); private static final String DISPLAY_NAME = Bundle.CTL_CaseOpenAction();
private static final String PROP_BASECASE = "LBL_BaseCase_PATH"; //NON-NLS 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 static JDialog multiUserCaseWindow;
private final JFileChooser fileChooser = new JFileChooser(); private final JFileChooser fileChooser = new JFileChooser();
private final FileFilter caseMetadataFileFilter; private final FileFilter caseMetadataFileFilter;
/** /**
* Constructs the action associated with the Case/Open Case menu item via * 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 layer.xml file, a toolbar button, and the Open Case button of the
* the start up window that allows a user to open a case. It opens an * start up window that allows a user to open a case. It opens an existing
* existing case. * case.
*/ */
public CaseOpenAction() { public CaseOpenAction() {
caseMetadataFileFilter = new FileNameExtensionFilter(NbBundle.getMessage(CaseOpenAction.class, "CaseOpenAction.autFilter.title", Version.getName(), CaseMetadata.getFileExtension()), CaseMetadata.getFileExtension().substring(1)); 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(); get();
} catch (InterruptedException | ExecutionException ex) { } catch (InterruptedException | ExecutionException ex) {
if (ex instanceof InterruptedException || (null != ex.getCause() && !(ex.getCause() instanceof CaseActionCancelledException))) { 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( JOptionPane.showMessageDialog(
WindowManager.getDefault().getMainWindow(), WindowManager.getDefault().getMainWindow(),
ex.getCause().getMessage(), //get the message of the wrapped exception ex.getCause().getMessage(), //get the message of the wrapped exception

View File

@ -25,7 +25,7 @@
<Group type="102" attributes="0"> <Group type="102" attributes="0">
<EmptySpace max="-2" attributes="0"/> <EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="2" attributes="0"> <Group type="103" groupAlignment="2" attributes="0">
<Component id="createNewCaseButton" alignment="2" min="-2" max="-2" attributes="1"/> <Component id="newCaseButton" alignment="2" min="-2" max="-2" attributes="1"/>
<Component id="openRecentCaseButton" alignment="2" min="-2" pref="70" max="-2" attributes="1"/> <Component id="openRecentCaseButton" alignment="2" min="-2" pref="70" max="-2" attributes="1"/>
<Component id="openCaseButton" alignment="2" min="-2" max="-2" attributes="1"/> <Component id="openCaseButton" alignment="2" min="-2" max="-2" attributes="1"/>
</Group> </Group>
@ -55,7 +55,7 @@
<Group type="103" alignment="0" groupAlignment="1" max="-2" attributes="0"> <Group type="103" alignment="0" groupAlignment="1" max="-2" attributes="0">
<Group type="102" attributes="0"> <Group type="102" attributes="0">
<Group type="103" groupAlignment="2" attributes="0"> <Group type="103" groupAlignment="2" attributes="0">
<Component id="createNewCaseButton" alignment="2" min="-2" pref="56" max="-2" attributes="0"/> <Component id="newCaseButton" alignment="2" min="-2" pref="56" max="-2" attributes="0"/>
<Component id="newCaseLabel" alignment="2" min="-2" max="-2" attributes="0"/> <Component id="newCaseLabel" alignment="2" min="-2" max="-2" attributes="0"/>
</Group> </Group>
<EmptySpace max="-2" attributes="0"/> <EmptySpace max="-2" attributes="0"/>
@ -93,13 +93,13 @@
<AuxValue name="JavaCodeGenerator_CreateCodePost" type="java.lang.String" value="this.autopsyLogo.setText(&quot;&quot;);"/> <AuxValue name="JavaCodeGenerator_CreateCodePost" type="java.lang.String" value="this.autopsyLogo.setText(&quot;&quot;);"/>
</AuxValues> </AuxValues>
</Component> </Component>
<Component class="javax.swing.JButton" name="createNewCaseButton"> <Component class="javax.swing.JButton" name="newCaseButton">
<Properties> <Properties>
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
<Image iconType="3" name="/org/sleuthkit/autopsy/casemodule/btn_icon_create_new_case.png"/> <Image iconType="3" name="/org/sleuthkit/autopsy/casemodule/btn_icon_create_new_case.png"/>
</Property> </Property>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="CueBannerPanel.createNewCaseButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/> <ResourceString bundle="org/sleuthkit/autopsy/casemodule/Bundle.properties" key="CueBannerPanel.newCaseButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property> </Property>
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.RADConnectionPropertyEditor"> <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
<Connection code="null" type="code"/> <Connection code="null" type="code"/>
@ -111,7 +111,7 @@
</Property> </Property>
</Properties> </Properties>
<Events> <Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="createNewCaseButtonActionPerformed"/> <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="newCaseButtonActionPerformed"/>
</Events> </Events>
</Component> </Component>
<Component class="javax.swing.JButton" name="openRecentCaseButton"> <Component class="javax.swing.JButton" name="openRecentCaseButton">

View File

@ -30,7 +30,6 @@ import javax.swing.KeyStroke;
import org.openide.util.Lookup; import org.openide.util.Lookup;
import org.openide.util.NbBundle; import org.openide.util.NbBundle;
import org.openide.windows.WindowManager; import org.openide.windows.WindowManager;
import org.sleuthkit.autopsy.core.UserPreferences;
/* /*
* The panel in the default Autopsy startup window. * The panel in the default Autopsy startup window.
@ -119,7 +118,7 @@ public class CueBannerPanel extends javax.swing.JPanel {
autopsyLogo = new javax.swing.JLabel(); autopsyLogo = new javax.swing.JLabel();
this.autopsyLogo.setText(""); this.autopsyLogo.setText("");
createNewCaseButton = new javax.swing.JButton(); newCaseButton = new javax.swing.JButton();
openRecentCaseButton = new javax.swing.JButton(); openRecentCaseButton = new javax.swing.JButton();
newCaseLabel = new javax.swing.JLabel(); newCaseLabel = new javax.swing.JLabel();
openRecentCaseLabel = 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.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 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 newCaseButton.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 newCaseButton.setText(org.openide.util.NbBundle.getMessage(CueBannerPanel.class, "CueBannerPanel.newCaseButton.text")); // NOI18N
createNewCaseButton.setBorder(null); newCaseButton.setBorder(null);
createNewCaseButton.setBorderPainted(false); newCaseButton.setBorderPainted(false);
createNewCaseButton.setContentAreaFilled(false); newCaseButton.setContentAreaFilled(false);
createNewCaseButton.setPreferredSize(new java.awt.Dimension(64, 64)); newCaseButton.setPreferredSize(new java.awt.Dimension(64, 64));
createNewCaseButton.addActionListener(new java.awt.event.ActionListener() { newCaseButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) { 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() .addGroup(layout.createSequentialGroup()
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER) .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(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)) .addComponent(openCaseButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .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.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
.addGroup(layout.createSequentialGroup() .addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER) .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)) .addComponent(newCaseLabel))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
@ -235,9 +234,9 @@ public class CueBannerPanel extends javax.swing.JPanel {
); );
}// </editor-fold>//GEN-END:initComponents }// </editor-fold>//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); 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 private void openCaseButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_openCaseButtonActionPerformed
Lookup.getDefault().lookup(CaseOpenAction.class).actionPerformed(evt); 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 // Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JLabel autopsyLogo; private javax.swing.JLabel autopsyLogo;
private javax.swing.JButton closeButton; private javax.swing.JButton closeButton;
private javax.swing.JButton createNewCaseButton;
private javax.swing.JSeparator jSeparator1; private javax.swing.JSeparator jSeparator1;
private javax.swing.JButton newCaseButton;
private javax.swing.JLabel newCaseLabel; private javax.swing.JLabel newCaseLabel;
private javax.swing.JButton openCaseButton; private javax.swing.JButton openCaseButton;
private javax.swing.JLabel openCaseLabel; private javax.swing.JLabel openCaseLabel;

View File

@ -29,7 +29,6 @@ import java.util.List;
import java.util.logging.Level; import java.util.logging.Level;
import javax.swing.JDialog; import javax.swing.JDialog;
import javax.swing.JOptionPane; import javax.swing.JOptionPane;
import javax.swing.RowSorter;
import javax.swing.SortOrder; import javax.swing.SortOrder;
import javax.swing.event.ListSelectionEvent; import javax.swing.event.ListSelectionEvent;
import javax.swing.table.DefaultTableModel; import javax.swing.table.DefaultTableModel;