diff --git a/Core/src/org/sleuthkit/autopsy/discovery/DetailsPanel.java b/Core/src/org/sleuthkit/autopsy/discovery/DetailsPanel.java index fed9cd4f6b..6b0a37e276 100644 --- a/Core/src/org/sleuthkit/autopsy/discovery/DetailsPanel.java +++ b/Core/src/org/sleuthkit/autopsy/discovery/DetailsPanel.java @@ -53,7 +53,7 @@ final class DetailsPanel extends javax.swing.JPanel { private final DataContentPanel dataContentPanel; private final DefaultListModel instancesListModel = new DefaultListModel<>(); - private ListSelectionListener listener = null; + private final ListSelectionListener listener; /** * Creates new form DetailsPanel. diff --git a/Core/src/org/sleuthkit/autopsy/discovery/DiscoveryDialog.form b/Core/src/org/sleuthkit/autopsy/discovery/DiscoveryDialog.form index 3450ae7817..743a25fc1c 100644 --- a/Core/src/org/sleuthkit/autopsy/discovery/DiscoveryDialog.form +++ b/Core/src/org/sleuthkit/autopsy/discovery/DiscoveryDialog.form @@ -166,6 +166,10 @@ + + + + @@ -180,12 +184,18 @@ + + - + + + + + diff --git a/Core/src/org/sleuthkit/autopsy/discovery/DiscoveryDialog.java b/Core/src/org/sleuthkit/autopsy/discovery/DiscoveryDialog.java index 9cd5d922d9..cdbe78473f 100644 --- a/Core/src/org/sleuthkit/autopsy/discovery/DiscoveryDialog.java +++ b/Core/src/org/sleuthkit/autopsy/discovery/DiscoveryDialog.java @@ -23,27 +23,19 @@ import java.awt.Color; import java.beans.PropertyChangeEvent; import java.beans.PropertyChangeListener; import java.util.EnumSet; -import java.util.HashMap; import java.util.List; -import java.util.Map; import java.util.Set; import java.util.logging.Level; -import javax.swing.JOptionPane; import org.apache.commons.lang.StringUtils; import org.openide.util.NbBundle.Messages; import org.openide.windows.WindowManager; import org.sleuthkit.autopsy.casemodule.Case; -import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException; import org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepoException; import org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepository; import org.sleuthkit.autopsy.coreutils.Logger; import org.sleuthkit.autopsy.discovery.FileGroup.GroupSortingAlgorithm; import org.sleuthkit.autopsy.discovery.FileSearch.GroupingAttributeType; import org.sleuthkit.autopsy.discovery.FileSorter.SortingMethod; -import org.sleuthkit.datamodel.DataSource; -import org.sleuthkit.datamodel.IngestJobInfo; -import org.sleuthkit.datamodel.SleuthkitCase; -import org.sleuthkit.datamodel.TskCoreException; /** * Dialog for displaying the controls and filters for configuration of a @@ -61,7 +53,7 @@ final class DiscoveryDialog extends javax.swing.JDialog { private static final Color SELECTED_COLOR = new Color(216, 230, 242); private static final Color UNSELECTED_COLOR = new Color(240, 240, 240); private SearchWorker searchWorker = null; - private static DiscoveryDialog discoveryDialog; + private static DiscoveryDialog discDialog; private FileSearchData.FileType fileType = FileSearchData.FileType.IMAGE; private final PropertyChangeListener listener; @@ -71,10 +63,10 @@ final class DiscoveryDialog extends javax.swing.JDialog { * @return The instance of the Discovery Dialog. */ static synchronized DiscoveryDialog getDiscoveryDialogInstance() { - if (discoveryDialog == null) { - discoveryDialog = new DiscoveryDialog(); + if (discDialog == null) { + discDialog = new DiscoveryDialog(); } - return discoveryDialog; + return discDialog; } /** @@ -88,13 +80,8 @@ final class DiscoveryDialog extends javax.swing.JDialog { @Override public void propertyChange(PropertyChangeEvent evt) { if (evt.getPropertyName().equals("FilterError") && evt.getNewValue() != null) { - String errorMessage = evt.getNewValue().toString(); - if (!StringUtils.isBlank(errorMessage)) { - setInvalid(errorMessage); - return; - } + setValid(evt.getNewValue().toString()); } - setValid(); } }; for (GroupSortingAlgorithm groupSortAlgorithm : GroupSortingAlgorithm.values()) { @@ -128,6 +115,15 @@ final class DiscoveryDialog extends javax.swing.JDialog { fileType = FileSearchData.FileType.IMAGE; add(imageFilterPanel, CENTER); imageFilterPanel.addPropertyChangeListener(listener); + updateComboBoxes(); + pack(); + repaint(); + } + + /** + * Private helper method to perform combo box updates. + */ + private void updateComboBoxes() { groupByCombobox.removeAllItems(); // Set up the grouping attributes for (FileSearch.GroupingAttributeType type : FileSearch.GroupingAttributeType.getOptionsForGrouping()) { @@ -146,8 +142,6 @@ final class DiscoveryDialog extends javax.swing.JDialog { } } groupSortingComboBox.setSelectedIndex(0); - pack(); - repaint(); } /** @@ -169,7 +163,7 @@ final class DiscoveryDialog extends javax.swing.JDialog { if (documentFilterPanel != null) { documentFilterPanel.validateFields(); } - return; + break; default: break; } @@ -188,9 +182,9 @@ final class DiscoveryDialog extends javax.swing.JDialog { imagesButton = new javax.swing.JButton(); videosButton = new javax.swing.JButton(); documentsButton = new javax.swing.JButton(); - step1Label = new javax.swing.JLabel(); - filler1 = new javax.swing.Box.Filler(new java.awt.Dimension(104, 0), new java.awt.Dimension(104, 0), new java.awt.Dimension(104, 32767)); - jPanel1 = new javax.swing.JPanel(); + javax.swing.JLabel step1Label = new javax.swing.JLabel(); + javax.swing.Box.Filler filler1 = new javax.swing.Box.Filler(new java.awt.Dimension(104, 0), new java.awt.Dimension(104, 0), new java.awt.Dimension(104, 32767)); + javax.swing.JPanel displaySettingsPanel = new javax.swing.JPanel(); searchButton = new javax.swing.JButton(); errorLabel = new javax.swing.JLabel(); javax.swing.JButton cancelButton = new javax.swing.JButton(); @@ -344,15 +338,15 @@ final class DiscoveryDialog extends javax.swing.JDialog { .addGap(8, 8, 8)) ); - javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); - jPanel1.setLayout(jPanel1Layout); - jPanel1Layout.setHorizontalGroup( - jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup() + javax.swing.GroupLayout displaySettingsPanelLayout = new javax.swing.GroupLayout(displaySettingsPanel); + displaySettingsPanel.setLayout(displaySettingsPanelLayout); + displaySettingsPanelLayout.setHorizontalGroup( + displaySettingsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, displaySettingsPanelLayout.createSequentialGroup() .addGap(8, 8, 8) - .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) + .addGroup(displaySettingsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(sortingPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 741, Short.MAX_VALUE) - .addGroup(jPanel1Layout.createSequentialGroup() + .addGroup(displaySettingsPanelLayout.createSequentialGroup() .addComponent(errorLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 575, Short.MAX_VALUE) .addGap(18, 18, 18) .addComponent(cancelButton) @@ -360,21 +354,21 @@ final class DiscoveryDialog extends javax.swing.JDialog { .addComponent(searchButton))) .addGap(8, 8, 8)) ); - jPanel1Layout.setVerticalGroup( - jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup() + displaySettingsPanelLayout.setVerticalGroup( + displaySettingsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, displaySettingsPanelLayout.createSequentialGroup() .addGap(8, 8, 8) .addComponent(sortingPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 89, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(8, 8, 8) - .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(displaySettingsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(errorLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE) - .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addGroup(displaySettingsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(cancelButton) .addComponent(searchButton))) .addGap(8, 8, 8)) ); - getContentPane().add(jPanel1, java.awt.BorderLayout.PAGE_END); + getContentPane().add(displaySettingsPanel, java.awt.BorderLayout.PAGE_END); pack(); }// //GEN-END:initComponents @@ -461,7 +455,7 @@ final class DiscoveryDialog extends javax.swing.JDialog { // Get the selected filters final DiscoveryTopComponent tc = DiscoveryTopComponent.getTopComponent(); if (tc == null) { - setInvalid("No Top Component Found"); + setValid("No Top Component Found"); return; } if (tc.isOpened() == false) { @@ -519,64 +513,30 @@ final class DiscoveryDialog extends javax.swing.JDialog { } /** - * Helper method to display an error message when the results of the - * Discovery Top component may be incomplete. - */ - void displayErrorMessage() { - //check if modules run and assemble message - try { - SleuthkitCase skCase = Case.getCurrentCaseThrows().getSleuthkitCase(); - Map dataSourceIngestModules = new HashMap<>(); - for (DataSource dataSource : skCase.getDataSources()) { - dataSourceIngestModules.put(dataSource.getId(), new DataSourceModulesWrapper(dataSource.getName())); - } - - for (IngestJobInfo jobInfo : skCase.getIngestJobs()) { - dataSourceIngestModules.get(jobInfo.getObjectId()).updateModulesRun(jobInfo); - } - String message = ""; - for (DataSourceModulesWrapper dsmodulesWrapper : dataSourceIngestModules.values()) { - message += dsmodulesWrapper.getMessage(); - } - if (!message.isEmpty()) { - JOptionPane.showMessageDialog(discoveryDialog, message, Bundle.OpenDiscoveryAction_resultsIncomplete_text(), JOptionPane.INFORMATION_MESSAGE); - } - } catch (NoCurrentCaseException | TskCoreException ex) { - logger.log(Level.WARNING, "Exception while determining which modules have been run for Discovery", ex); - } - validateDialog(); - } - - /** - * The settings are valid so enable the Search button - */ - private void setValid() { - errorLabel.setText(""); - searchButton.setEnabled(true); - } - - /** - * The settings are not valid so disable the search button and display the - * given error message. + * The adjust the controls to reflect whether the settings are valid based + * on the error. * - * @param error The error message to display. + * @param error The error message to display, null if there is no error. */ - private void setInvalid(String error) { - errorLabel.setText(error); - searchButton.setEnabled(false); + private void setValid(String error) { + if (StringUtils.isBlank(error)) { + errorLabel.setText(""); + searchButton.setEnabled(true); + } else { + errorLabel.setText(error); + searchButton.setEnabled(false); + } } + // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JButton documentsButton; private javax.swing.JLabel errorLabel; - private javax.swing.Box.Filler filler1; private javax.swing.JComboBox groupByCombobox; private javax.swing.JComboBox groupSortingComboBox; private javax.swing.JButton imagesButton; - private javax.swing.JPanel jPanel1; private javax.swing.JComboBox orderByCombobox; private javax.swing.JButton searchButton; - private javax.swing.JLabel step1Label; private javax.swing.JButton videosButton; // End of variables declaration//GEN-END:variables diff --git a/Core/src/org/sleuthkit/autopsy/discovery/DiscoveryTopComponent.form b/Core/src/org/sleuthkit/autopsy/discovery/DiscoveryTopComponent.form index bb144b8173..4e62b44cb9 100644 --- a/Core/src/org/sleuthkit/autopsy/discovery/DiscoveryTopComponent.form +++ b/Core/src/org/sleuthkit/autopsy/discovery/DiscoveryTopComponent.form @@ -61,7 +61,11 @@ - + + + + + @@ -125,6 +129,8 @@ + + diff --git a/Core/src/org/sleuthkit/autopsy/discovery/DiscoveryTopComponent.java b/Core/src/org/sleuthkit/autopsy/discovery/DiscoveryTopComponent.java index a0577b46cf..30341184ad 100644 --- a/Core/src/org/sleuthkit/autopsy/discovery/DiscoveryTopComponent.java +++ b/Core/src/org/sleuthkit/autopsy/discovery/DiscoveryTopComponent.java @@ -98,7 +98,7 @@ public final class DiscoveryTopComponent extends TopComponent { @Override protected void componentClosed() { - cancelCurrentSearch(); + DiscoveryDialog.getDiscoveryDialogInstance().cancelSearch(); DiscoveryEventUtils.getDiscoveryEventBus().unregister(this); DiscoveryEventUtils.getDiscoveryEventBus().unregister(groupListPanel); DiscoveryEventUtils.getDiscoveryEventBus().unregister(resultsPanel); @@ -106,13 +106,6 @@ public final class DiscoveryTopComponent extends TopComponent { super.componentClosed(); } - /** - * Cancel the in progress search. - */ - private void cancelCurrentSearch() { - DiscoveryDialog.getDiscoveryDialogInstance().cancelSearch(); - } - /** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always @@ -124,9 +117,9 @@ public final class DiscoveryTopComponent extends TopComponent { mainSplitPane = new javax.swing.JSplitPane(); rightSplitPane = new AnimatedSplitPane(); - jPanel1 = new javax.swing.JPanel(); + javax.swing.JPanel searchDetailsPanel = new javax.swing.JPanel(); newSearchButton = new javax.swing.JButton(); - progressMessageScrollPane = new javax.swing.JScrollPane(); + javax.swing.JScrollPane progressMessageScrollPane = new javax.swing.JScrollPane(); progressMessageTextArea = new javax.swing.JTextArea(); setMinimumSize(new java.awt.Dimension(199, 200)); @@ -164,31 +157,31 @@ public final class DiscoveryTopComponent extends TopComponent { progressMessageTextArea.setBorder(null); progressMessageScrollPane.setViewportView(progressMessageTextArea); - javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); - jPanel1.setLayout(jPanel1Layout); - jPanel1Layout.setHorizontalGroup( - jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(jPanel1Layout.createSequentialGroup() + javax.swing.GroupLayout searchDetailsPanelLayout = new javax.swing.GroupLayout(searchDetailsPanel); + searchDetailsPanel.setLayout(searchDetailsPanelLayout); + searchDetailsPanelLayout.setHorizontalGroup( + searchDetailsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(searchDetailsPanelLayout.createSequentialGroup() .addContainerGap() .addComponent(newSearchButton, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(progressMessageScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 954, Short.MAX_VALUE) .addContainerGap()) ); - jPanel1Layout.setVerticalGroup( - jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(jPanel1Layout.createSequentialGroup() - .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(jPanel1Layout.createSequentialGroup() + searchDetailsPanelLayout.setVerticalGroup( + searchDetailsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(searchDetailsPanelLayout.createSequentialGroup() + .addGroup(searchDetailsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(searchDetailsPanelLayout.createSequentialGroup() .addGap(8, 8, 8) .addComponent(progressMessageScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addGroup(jPanel1Layout.createSequentialGroup() + .addGroup(searchDetailsPanelLayout.createSequentialGroup() .addGap(17, 17, 17) .addComponent(newSearchButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) .addContainerGap()) ); - add(jPanel1, java.awt.BorderLayout.PAGE_START); + add(searchDetailsPanel, java.awt.BorderLayout.PAGE_START); }// //GEN-END:initComponents private void newSearchButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_newSearchButtonActionPerformed @@ -322,10 +315,8 @@ public final class DiscoveryTopComponent extends TopComponent { } // Variables declaration - do not modify//GEN-BEGIN:variables - private javax.swing.JPanel jPanel1; private javax.swing.JSplitPane mainSplitPane; private javax.swing.JButton newSearchButton; - private javax.swing.JScrollPane progressMessageScrollPane; private javax.swing.JTextArea progressMessageTextArea; private javax.swing.JSplitPane rightSplitPane; // End of variables declaration//GEN-END:variables diff --git a/Core/src/org/sleuthkit/autopsy/discovery/DiscoveryUiUtils.java b/Core/src/org/sleuthkit/autopsy/discovery/DiscoveryUiUtils.java index 4c1497d898..3890751dc7 100644 --- a/Core/src/org/sleuthkit/autopsy/discovery/DiscoveryUiUtils.java +++ b/Core/src/org/sleuthkit/autopsy/discovery/DiscoveryUiUtils.java @@ -22,14 +22,23 @@ import java.awt.Component; import java.awt.Point; import java.util.ArrayList; import java.util.Collections; +import java.util.HashMap; import java.util.List; +import java.util.Map; +import java.util.logging.Level; import javax.swing.ImageIcon; import javax.swing.JComponent; +import javax.swing.JOptionPane; import org.openide.util.ImageUtilities; import org.openide.util.NbBundle; import org.sleuthkit.autopsy.casemodule.Case; +import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException; +import org.sleuthkit.autopsy.coreutils.Logger; import org.sleuthkit.datamodel.BlackboardArtifact; import org.sleuthkit.datamodel.BlackboardAttribute; +import org.sleuthkit.datamodel.DataSource; +import org.sleuthkit.datamodel.IngestJobInfo; +import org.sleuthkit.datamodel.SleuthkitCase; import org.sleuthkit.datamodel.TskCoreException; /** @@ -37,6 +46,7 @@ import org.sleuthkit.datamodel.TskCoreException; */ final class DiscoveryUiUtils { + private final static Logger logger = Logger.getLogger(DiscoveryUiUtils.class.getName()); private static final int BYTE_UNIT_CONVERSION = 1000; private static final int ICON_SIZE = 16; private static final String RED_CIRCLE_ICON_PATH = "org/sleuthkit/autopsy/images/red-circle-exclamation.png"; @@ -193,6 +203,35 @@ final class DiscoveryUiUtils { return ICON_SIZE; } + /** + * Helper method to display an error message when the results of the + * Discovery Top component may be incomplete. + */ + static void displayErrorMessage(DiscoveryDialog dialog) { + //check if modules run and assemble message + try { + SleuthkitCase skCase = Case.getCurrentCaseThrows().getSleuthkitCase(); + Map dataSourceIngestModules = new HashMap<>(); + for (DataSource dataSource : skCase.getDataSources()) { + dataSourceIngestModules.put(dataSource.getId(), new DataSourceModulesWrapper(dataSource.getName())); + } + + for (IngestJobInfo jobInfo : skCase.getIngestJobs()) { + dataSourceIngestModules.get(jobInfo.getObjectId()).updateModulesRun(jobInfo); + } + String message = ""; + for (DataSourceModulesWrapper dsmodulesWrapper : dataSourceIngestModules.values()) { + message += dsmodulesWrapper.getMessage(); + } + if (!message.isEmpty()) { + JOptionPane.showMessageDialog(dialog, message, Bundle.OpenDiscoveryAction_resultsIncomplete_text(), JOptionPane.INFORMATION_MESSAGE); + } + } catch (NoCurrentCaseException | TskCoreException ex) { + logger.log(Level.WARNING, "Exception while determining which modules have been run for Discovery", ex); + } + dialog.validateDialog(); + } + /** * Private constructor for DiscoveryUiUtils utility class. */ diff --git a/Core/src/org/sleuthkit/autopsy/discovery/DocumentFilterPanel.form b/Core/src/org/sleuthkit/autopsy/discovery/DocumentFilterPanel.form index 3f721b2d96..a1c49c4c07 100644 --- a/Core/src/org/sleuthkit/autopsy/discovery/DocumentFilterPanel.form +++ b/Core/src/org/sleuthkit/autopsy/discovery/DocumentFilterPanel.form @@ -17,6 +17,10 @@ + + + + @@ -26,6 +30,10 @@ + + + + diff --git a/Core/src/org/sleuthkit/autopsy/discovery/DocumentFilterPanel.java b/Core/src/org/sleuthkit/autopsy/discovery/DocumentFilterPanel.java index 5bb182368f..9756045387 100644 --- a/Core/src/org/sleuthkit/autopsy/discovery/DocumentFilterPanel.java +++ b/Core/src/org/sleuthkit/autopsy/discovery/DocumentFilterPanel.java @@ -59,8 +59,8 @@ final class DocumentFilterPanel extends AbstractFiltersPanel { // //GEN-BEGIN:initComponents private void initComponents() { - documentFiltersScrollPane = new javax.swing.JScrollPane(); - documentFiltersPanel = new javax.swing.JPanel(); + javax.swing.JScrollPane documentFiltersScrollPane = new javax.swing.JScrollPane(); + javax.swing.JPanel documentFiltersPanel = new javax.swing.JPanel(); documentsFiltersSplitPane = new javax.swing.JSplitPane(); setLayout(new java.awt.BorderLayout()); @@ -94,8 +94,6 @@ final class DocumentFilterPanel extends AbstractFiltersPanel { return FILE_TYPE; } // Variables declaration - do not modify//GEN-BEGIN:variables - private javax.swing.JPanel documentFiltersPanel; - private javax.swing.JScrollPane documentFiltersScrollPane; private javax.swing.JSplitPane documentsFiltersSplitPane; // End of variables declaration//GEN-END:variables diff --git a/Core/src/org/sleuthkit/autopsy/discovery/ImageFilterPanel.form b/Core/src/org/sleuthkit/autopsy/discovery/ImageFilterPanel.form index f48616f1ca..7a3374f5cb 100644 --- a/Core/src/org/sleuthkit/autopsy/discovery/ImageFilterPanel.form +++ b/Core/src/org/sleuthkit/autopsy/discovery/ImageFilterPanel.form @@ -17,6 +17,10 @@ + + + + @@ -26,6 +30,10 @@ + + + + diff --git a/Core/src/org/sleuthkit/autopsy/discovery/ImageFilterPanel.java b/Core/src/org/sleuthkit/autopsy/discovery/ImageFilterPanel.java index d73c79d795..8eec6dd60f 100644 --- a/Core/src/org/sleuthkit/autopsy/discovery/ImageFilterPanel.java +++ b/Core/src/org/sleuthkit/autopsy/discovery/ImageFilterPanel.java @@ -63,8 +63,8 @@ final class ImageFilterPanel extends AbstractFiltersPanel { // //GEN-BEGIN:initComponents private void initComponents() { - imageFiltersScrollPane = new javax.swing.JScrollPane(); - imageFiltersPanel = new javax.swing.JPanel(); + javax.swing.JScrollPane imageFiltersScrollPane = new javax.swing.JScrollPane(); + javax.swing.JPanel imageFiltersPanel = new javax.swing.JPanel(); imageFiltersSplitPane = new javax.swing.JSplitPane(); setLayout(new java.awt.BorderLayout()); @@ -101,8 +101,6 @@ final class ImageFilterPanel extends AbstractFiltersPanel { } // Variables declaration - do not modify//GEN-BEGIN:variables - private javax.swing.JPanel imageFiltersPanel; - private javax.swing.JScrollPane imageFiltersScrollPane; private javax.swing.JSplitPane imageFiltersSplitPane; // End of variables declaration//GEN-END:variables } diff --git a/Core/src/org/sleuthkit/autopsy/discovery/OpenDiscoveryAction.java b/Core/src/org/sleuthkit/autopsy/discovery/OpenDiscoveryAction.java index 4613617c86..9ef7d5dfe6 100644 --- a/Core/src/org/sleuthkit/autopsy/discovery/OpenDiscoveryAction.java +++ b/Core/src/org/sleuthkit/autopsy/discovery/OpenDiscoveryAction.java @@ -30,7 +30,6 @@ import org.openide.util.NbBundle; import org.openide.util.actions.CallableSystemAction; import org.openide.util.actions.Presenter; import org.sleuthkit.autopsy.casemodule.Case; -import org.sleuthkit.autopsy.coreutils.Logger; /** * Class to open the Discovery dialog. Allows the user to run searches and see @@ -45,8 +44,6 @@ import org.sleuthkit.autopsy.coreutils.Logger; @NbBundle.Messages({"CTL_OpenDiscoveryAction=Discovery"}) public final class OpenDiscoveryAction extends CallableSystemAction implements Presenter.Toolbar { - private static final Logger logger = Logger.getLogger(OpenDiscoveryAction.class.getName()); - private static final String DISPLAY_NAME = Bundle.CTL_OpenDiscoveryAction(); private static final long serialVersionUID = 1L; private final JButton toolbarButton = new JButton(); @@ -71,7 +68,7 @@ public final class OpenDiscoveryAction extends CallableSystemAction implements P final DiscoveryDialog discDialog = DiscoveryDialog.getDiscoveryDialogInstance(); discDialog.cancelSearch(); discDialog.setVisible(true); - discDialog.displayErrorMessage(); + DiscoveryUiUtils.displayErrorMessage(discDialog); } /** diff --git a/Core/src/org/sleuthkit/autopsy/discovery/ResultsPanel.java b/Core/src/org/sleuthkit/autopsy/discovery/ResultsPanel.java index 60f7cbe6ec..33f6846660 100644 --- a/Core/src/org/sleuthkit/autopsy/discovery/ResultsPanel.java +++ b/Core/src/org/sleuthkit/autopsy/discovery/ResultsPanel.java @@ -87,7 +87,6 @@ final class ResultsPanel extends javax.swing.JPanel { imageThumbnailViewer.addListSelectionListener((e) -> { if (resultType == FileSearchData.FileType.IMAGE) { if (!e.getValueIsAdjusting()) { - List files = getInstancesForSelected(); //send populateMesage DiscoveryEventUtils.getDiscoveryEventBus().post(new DiscoveryEventUtils.PopulateInstancesListEvent(getInstancesForSelected())); } else { @@ -291,14 +290,13 @@ final class ResultsPanel extends javax.swing.JPanel { }); } - @Subscribe - /** * Set the page number and retrieve its contents. * * @param startingEntry The index of the first file in the group to include * in this page. */ + @Subscribe private synchronized void setPage(int startingEntry) { int pageSize = pageSizeComboBox.getItemAt(pageSizeComboBox.getSelectedIndex()); synchronized (this) { diff --git a/Core/src/org/sleuthkit/autopsy/discovery/SwingAnimator.java b/Core/src/org/sleuthkit/autopsy/discovery/SwingAnimator.java index c3457c43c6..eb5ba0d26f 100644 --- a/Core/src/org/sleuthkit/autopsy/discovery/SwingAnimator.java +++ b/Core/src/org/sleuthkit/autopsy/discovery/SwingAnimator.java @@ -40,7 +40,7 @@ final class SwingAnimator { //duration in milliseconds betweeen each firing of the Timer private static final int INITIAL_TIMING = 10; - private static int timing = INITIAL_TIMING; + private int timing = INITIAL_TIMING; /** * diff --git a/Core/src/org/sleuthkit/autopsy/discovery/VideoFilterPanel.form b/Core/src/org/sleuthkit/autopsy/discovery/VideoFilterPanel.form index ec4b154c7c..259a188967 100644 --- a/Core/src/org/sleuthkit/autopsy/discovery/VideoFilterPanel.form +++ b/Core/src/org/sleuthkit/autopsy/discovery/VideoFilterPanel.form @@ -17,6 +17,10 @@ + + + + @@ -31,6 +35,10 @@ + + + + diff --git a/Core/src/org/sleuthkit/autopsy/discovery/VideoFilterPanel.java b/Core/src/org/sleuthkit/autopsy/discovery/VideoFilterPanel.java index 30b813c3c1..48522a9474 100644 --- a/Core/src/org/sleuthkit/autopsy/discovery/VideoFilterPanel.java +++ b/Core/src/org/sleuthkit/autopsy/discovery/VideoFilterPanel.java @@ -60,8 +60,8 @@ final class VideoFilterPanel extends AbstractFiltersPanel { // //GEN-BEGIN:initComponents private void initComponents() { - videoFiltersScrollPane = new javax.swing.JScrollPane(); - videoFiltersPanel = new javax.swing.JPanel(); + javax.swing.JScrollPane videoFiltersScrollPane = new javax.swing.JScrollPane(); + javax.swing.JPanel videoFiltersPanel = new javax.swing.JPanel(); videoFiltersSplitPane = new javax.swing.JSplitPane(); setLayout(new java.awt.BorderLayout()); @@ -98,8 +98,6 @@ final class VideoFilterPanel extends AbstractFiltersPanel { } // Variables declaration - do not modify//GEN-BEGIN:variables - private javax.swing.JPanel videoFiltersPanel; - private javax.swing.JScrollPane videoFiltersScrollPane; private javax.swing.JSplitPane videoFiltersSplitPane; // End of variables declaration//GEN-END:variables