diff --git a/Core/src/org/sleuthkit/autopsy/discovery/Bundle.properties b/Core/src/org/sleuthkit/autopsy/discovery/Bundle.properties index 284e78aead..db3f094fc7 100644 --- a/Core/src/org/sleuthkit/autopsy/discovery/Bundle.properties +++ b/Core/src/org/sleuthkit/autopsy/discovery/Bundle.properties @@ -16,7 +16,6 @@ FileSearchDialog.orderSizeRadioButton.text=Group Size FileSearchDialog.jLabel5.text=Order files by: FileSearchDialog.parentCheckBox.text=Parent FileSearchPanel.sortingPanel.border.title=Grouping -FileSearchPanel.searchButton.text=Show FileSearchPanel.addButton.text=Add FileSearchPanel.substringRadioButton.text=Substring FileSearchPanel.fullRadioButton.text=Full @@ -39,7 +38,6 @@ FileSearchDialog.objCheckBox.text=Objects FileSearchDialog.exifCheckBox.text=Must contain EXIF data FileSearchDialog.notableCheckBox.text=Must have been tagged as notable FileSearchDialog.scoreCheckBox.text=Has score -FileSearchPanel.cancelButton.text=Cancel FileSearchPanel.hashSetCheckbox.text=Hash Set: FileSearchPanel.tagsCheckbox.text=Tag: FileSearchPanel.interestingItemsCheckbox.text=Interesting Item: @@ -57,13 +55,14 @@ FileSearchPanel.excludeRadioButton.text=Exclude FileSearchPanel.knownFilesCheckbox.toolTipText= FileSearchPanel.knownFilesCheckbox.text=Hide known files GroupListPanel.groupKeyList.border.title=Groups -DiscoveryTopComponent.imagesButton.text=Images -DiscoveryTopComponent.videosButton.text=Videos ResultsPanel.resultsSplitPane.toolTipText= FileSearchPanel.stepThreeLabel.text=Step 3: Choose display settings -DiscoveryTopComponent.stepOneLabel.text=Step 1: Pick File Type -DiscoveryTopComponent.documentsButton.text=Documents DocumentPanel.fileSizeLabel.toolTipText= DocumentPanel.isDeletedLabel.toolTipText= ImageThumbnailPanel.isDeletedLabel.toolTipText= FileSearchPanel.userCreatedCheckbox.text=Possibly User Created +DiscoveryDialog.documentsButton.text=Documents +DiscoveryDialog.videosButton.text=Videos +DiscoveryDialog.imagesButton.text=Images +DiscoveryDialog.searchButton.text=Show +DiscoveryDialog.cancelButton.text=Cancel diff --git a/Core/src/org/sleuthkit/autopsy/discovery/DiscoveryDialog.form b/Core/src/org/sleuthkit/autopsy/discovery/DiscoveryDialog.form new file mode 100644 index 0000000000..0f36d5ae95 --- /dev/null +++ b/Core/src/org/sleuthkit/autopsy/discovery/DiscoveryDialog.form @@ -0,0 +1,214 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Core/src/org/sleuthkit/autopsy/discovery/DiscoveryDialog.java b/Core/src/org/sleuthkit/autopsy/discovery/DiscoveryDialog.java new file mode 100644 index 0000000000..9a1c45ccaa --- /dev/null +++ b/Core/src/org/sleuthkit/autopsy/discovery/DiscoveryDialog.java @@ -0,0 +1,335 @@ +/* + * Autopsy + * + * Copyright 2020 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.discovery; + +import static java.awt.BorderLayout.CENTER; +import java.awt.Color; +import java.beans.PropertyChangeEvent; +import java.beans.PropertyChangeListener; +import java.util.List; +import java.util.logging.Level; +import org.apache.commons.lang.StringUtils; +import org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepoException; +import org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepository; +import org.sleuthkit.autopsy.coreutils.Logger; + +final class DiscoveryDialog extends javax.swing.JDialog { + + private static final long serialVersionUID = 1L; + private final static Logger logger = Logger.getLogger(DiscoveryDialog.class.getName()); + private final FileSearchPanel filterPanel = new FileSearchPanel(); + 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; + + DiscoveryDialog() { + this(null, true); + } + + /** + * Creates new form DiscoveryDialog + */ + private DiscoveryDialog(java.awt.Frame parent, boolean modal) { + super(parent, modal); + initComponents(); + filterPanel.addPropertyChangeListener(new PropertyChangeListener() { + @Override + public void propertyChange(PropertyChangeEvent evt) { + if (evt.getNewValue() instanceof String) { + String errorMessage = (String) evt.getNewValue(); + if (StringUtils.isBlank(errorMessage)) { + setValid(); + } else { + setInvalid(errorMessage); + } + } + + } + }); + updateSearchSettings(); + add(filterPanel, CENTER); + } + + /** + * Update the search settings to a default state. + */ + private void updateSearchSettings() { + filterPanel.resetPanel(); + imagesButton.setSelected(true); + imagesButton.setEnabled(false); + imagesButton.setBackground(SELECTED_COLOR); + imagesButton.setForeground(Color.BLACK); + videosButton.setSelected(false); + videosButton.setEnabled(true); + videosButton.setBackground(UNSELECTED_COLOR); + documentsButton.setSelected(false); + documentsButton.setEnabled(true); + documentsButton.setBackground(UNSELECTED_COLOR); + filterPanel.setSelectedType(FileSearchData.FileType.IMAGE); + } + + /** + * 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 + * regenerated by the Form Editor. + */ + @SuppressWarnings("unchecked") + // //GEN-BEGIN:initComponents + private void initComponents() { + + javax.swing.JPanel toolBarPanel = new javax.swing.JPanel(); + imagesButton = new javax.swing.JButton(); + videosButton = new javax.swing.JButton(); + documentsButton = new javax.swing.JButton(); + jPanel1 = new javax.swing.JPanel(); + searchButton = new javax.swing.JButton(); + errorLabel = new javax.swing.JLabel(); + cancelButton = new javax.swing.JButton(); + + setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); + + imagesButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/images/pictures-icon.png"))); // NOI18N + org.openide.awt.Mnemonics.setLocalizedText(imagesButton, org.openide.util.NbBundle.getMessage(DiscoveryDialog.class, "DiscoveryDialog.imagesButton.text")); // NOI18N + imagesButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/images/pictures-icon.png"))); // NOI18N + imagesButton.setFocusable(false); + imagesButton.setHorizontalAlignment(javax.swing.SwingConstants.LEFT); + imagesButton.setMaximumSize(new java.awt.Dimension(90, 43)); + imagesButton.setMinimumSize(new java.awt.Dimension(90, 43)); + imagesButton.setPreferredSize(new java.awt.Dimension(90, 43)); + imagesButton.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + imagesButtonActionPerformed(evt); + } + }); + + videosButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/images/video-icon.png"))); // NOI18N + org.openide.awt.Mnemonics.setLocalizedText(videosButton, org.openide.util.NbBundle.getMessage(DiscoveryDialog.class, "DiscoveryDialog.videosButton.text")); // NOI18N + videosButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/images/video-icon.png"))); // NOI18N + videosButton.setDisabledSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/images/video-icon.png"))); // NOI18N + videosButton.setFocusable(false); + videosButton.setHorizontalAlignment(javax.swing.SwingConstants.LEFT); + videosButton.setMaximumSize(new java.awt.Dimension(90, 43)); + videosButton.setMinimumSize(new java.awt.Dimension(90, 43)); + videosButton.setPreferredSize(new java.awt.Dimension(90, 43)); + videosButton.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + videosButtonActionPerformed(evt); + } + }); + + documentsButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/images/documents-icon.png"))); // NOI18N + org.openide.awt.Mnemonics.setLocalizedText(documentsButton, org.openide.util.NbBundle.getMessage(DiscoveryDialog.class, "DiscoveryDialog.documentsButton.text")); // NOI18N + documentsButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/images/documents-icon.png"))); // NOI18N + documentsButton.setDisabledSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/images/documents-icon.png"))); // NOI18N + documentsButton.setFocusable(false); + documentsButton.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + documentsButtonActionPerformed(evt); + } + }); + + javax.swing.GroupLayout toolBarPanelLayout = new javax.swing.GroupLayout(toolBarPanel); + toolBarPanel.setLayout(toolBarPanelLayout); + toolBarPanelLayout.setHorizontalGroup( + toolBarPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(toolBarPanelLayout.createSequentialGroup() + .addContainerGap(99, Short.MAX_VALUE) + .addComponent(imagesButton, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(videosButton, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(documentsButton) + .addContainerGap(88, Short.MAX_VALUE)) + ); + toolBarPanelLayout.setVerticalGroup( + toolBarPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(toolBarPanelLayout.createSequentialGroup() + .addContainerGap() + .addGroup(toolBarPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(videosButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(imagesButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(documentsButton, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addContainerGap()) + ); + + getContentPane().add(toolBarPanel, java.awt.BorderLayout.PAGE_START); + + org.openide.awt.Mnemonics.setLocalizedText(searchButton, org.openide.util.NbBundle.getMessage(DiscoveryDialog.class, "DiscoveryDialog.searchButton.text")); // NOI18N + searchButton.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + searchButtonActionPerformed(evt); + } + }); + + errorLabel.setForeground(new java.awt.Color(255, 0, 0)); + + org.openide.awt.Mnemonics.setLocalizedText(cancelButton, org.openide.util.NbBundle.getMessage(DiscoveryDialog.class, "DiscoveryDialog.cancelButton.text")); // NOI18N + cancelButton.setEnabled(false); + cancelButton.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + cancelButtonActionPerformed(evt); + } + }); + + javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); + jPanel1.setLayout(jPanel1Layout); + jPanel1Layout.setHorizontalGroup( + jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel1Layout.createSequentialGroup() + .addContainerGap() + .addComponent(errorLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(cancelButton) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(searchButton) + .addContainerGap()) + ); + jPanel1Layout.setVerticalGroup( + jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel1Layout.createSequentialGroup() + .addContainerGap() + .addGroup(jPanel1Layout.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) + .addComponent(cancelButton) + .addComponent(searchButton))) + .addContainerGap()) + ); + + getContentPane().add(jPanel1, java.awt.BorderLayout.PAGE_END); + + pack(); + }// //GEN-END:initComponents + + private void imagesButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_imagesButtonActionPerformed +// resetTopComponent(); + imagesButton.setSelected(true); + imagesButton.setEnabled(false); + imagesButton.setBackground(SELECTED_COLOR); + imagesButton.setForeground(Color.BLACK); + videosButton.setSelected(false); + videosButton.setEnabled(true); + videosButton.setBackground(UNSELECTED_COLOR); + documentsButton.setSelected(false); + documentsButton.setEnabled(true); + documentsButton.setBackground(UNSELECTED_COLOR); + filterPanel.setSelectedType(FileSearchData.FileType.IMAGE); + }//GEN-LAST:event_imagesButtonActionPerformed + + private void videosButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_videosButtonActionPerformed + imagesButton.setSelected(false); + imagesButton.setEnabled(true); + imagesButton.setBackground(UNSELECTED_COLOR); + videosButton.setSelected(true); + videosButton.setEnabled(false); + videosButton.setBackground(SELECTED_COLOR); + videosButton.setForeground(Color.BLACK); + documentsButton.setSelected(false); + documentsButton.setEnabled(true); + documentsButton.setBackground(UNSELECTED_COLOR); + filterPanel.setSelectedType(FileSearchData.FileType.VIDEO); + }//GEN-LAST:event_videosButtonActionPerformed + + private void documentsButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_documentsButtonActionPerformed + documentsButton.setSelected(true); + documentsButton.setEnabled(false); + documentsButton.setBackground(SELECTED_COLOR); + documentsButton.setForeground(Color.BLACK); + videosButton.setSelected(false); + videosButton.setEnabled(true); + videosButton.setBackground(UNSELECTED_COLOR); + imagesButton.setSelected(false); + imagesButton.setEnabled(true); + imagesButton.setBackground(UNSELECTED_COLOR); + filterPanel.setSelectedType(FileSearchData.FileType.DOCUMENTS); + }//GEN-LAST:event_documentsButtonActionPerformed + + private void searchButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_searchButtonActionPerformed + // Get the selected filters + final DiscoveryTopComponent tc = DiscoveryTopComponent.getTopComponent(); + if (tc == null) { + setInvalid("No Top Component Found"); + return; + } + + if (tc.isOpened() == false) { + tc.open(); +// tc.updateSearchSettings(); +// displayErrorMessage(tc); + } + tc.resetTopComponent(); + List filters = filterPanel.getFilters(); +// enableSearch(false); + DiscoveryEventUtils.getDiscoveryEventBus().post(new DiscoveryEventUtils.SearchStartedEvent(filterPanel.getSelectedType())); + + // Get the grouping attribute and group sorting method + FileSearch.AttributeType groupingAttr = filterPanel.getGroupingAttribute(); + FileGroup.GroupSortingAlgorithm groupSortAlgorithm = filterPanel.getGroupSortingMethod(); + + // Get the file sorting method + FileSorter.SortingMethod fileSort = filterPanel.getFileSortingMethod(); + CentralRepository centralRepoDb = null; + if (CentralRepository.isEnabled()) { + try { + centralRepoDb = CentralRepository.getInstance(); + } catch (CentralRepoException ex) { + centralRepoDb = null; + logger.log(Level.SEVERE, "Error loading central repository database, no central repository options will be available for File Discovery", ex); + } + } + searchWorker = new SearchWorker(centralRepoDb, filters, groupingAttr, groupSortAlgorithm, fileSort); + searchWorker.execute(); + dispose(); + tc.toFront(); + tc.requestActive(); + }//GEN-LAST:event_searchButtonActionPerformed + + private void cancelButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cancelButtonActionPerformed +// cancelSearch(); + }//GEN-LAST:event_cancelButtonActionPerformed + + /** + * 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. + * + * @param error + */ + private void setInvalid(String error) { + errorLabel.setText(error); + searchButton.setEnabled(false); + } + + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JButton cancelButton; + private javax.swing.JButton documentsButton; + private javax.swing.JLabel errorLabel; + private javax.swing.JButton imagesButton; + private javax.swing.JPanel jPanel1; + private javax.swing.JButton searchButton; + 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 a7c22dd434..df7946a5c2 100644 --- a/Core/src/org/sleuthkit/autopsy/discovery/DiscoveryTopComponent.form +++ b/Core/src/org/sleuthkit/autopsy/discovery/DiscoveryTopComponent.form @@ -28,10 +28,6 @@ - - - - @@ -40,22 +36,6 @@ - - - - - - - - - - - - - - - - @@ -75,168 +55,5 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Core/src/org/sleuthkit/autopsy/discovery/DiscoveryTopComponent.java b/Core/src/org/sleuthkit/autopsy/discovery/DiscoveryTopComponent.java index 9c2da771ca..f17849c678 100644 --- a/Core/src/org/sleuthkit/autopsy/discovery/DiscoveryTopComponent.java +++ b/Core/src/org/sleuthkit/autopsy/discovery/DiscoveryTopComponent.java @@ -18,8 +18,6 @@ */ package org.sleuthkit.autopsy.discovery; -import com.google.common.eventbus.Subscribe; -import java.awt.Color; import java.util.List; import java.util.stream.Collectors; import javax.swing.SwingUtilities; @@ -47,8 +45,6 @@ public final class DiscoveryTopComponent extends TopComponent { private static final long serialVersionUID = 1L; private static final String PREFERRED_ID = "DiscoveryTopComponent"; // NON-NLS - private static final Color SELECTED_COLOR = new Color(216, 230, 242); - private static final Color UNSELECTED_COLOR = new Color(240, 240, 240); private final FileSearchPanel fileSearchPanel; private final GroupListPanel groupListPanel; private final DataContentPanel dataContentPanel; @@ -65,8 +61,7 @@ public final class DiscoveryTopComponent extends TopComponent { dataContentPanel = DataContentPanel.createInstance(); resultsPanel = new ResultsPanel(); groupListPanel = new GroupListPanel(); - leftSplitPane.setLeftComponent(fileSearchPanel); - leftSplitPane.setRightComponent(groupListPanel); + mainSplitPane.setLeftComponent(groupListPanel); rightSplitPane.setTopComponent(resultsPanel); rightSplitPane.setBottomComponent(dataContentPanel); //add list selection listener so the content viewer will be updated with the selected file @@ -106,25 +101,6 @@ public final class DiscoveryTopComponent extends TopComponent { groupListPanel.resetGroupList(); } - /** - * Update the search settings to a default state. - */ - void updateSearchSettings() { - resetTopComponent(); - fileSearchPanel.resetPanel(); - imagesButton.setSelected(true); - imagesButton.setEnabled(false); - imagesButton.setBackground(SELECTED_COLOR); - imagesButton.setForeground(Color.BLACK); - videosButton.setSelected(false); - videosButton.setEnabled(true); - videosButton.setBackground(UNSELECTED_COLOR); - documentsButton.setSelected(false); - documentsButton.setEnabled(true); - documentsButton.setBackground(UNSELECTED_COLOR); - fileSearchPanel.setSelectedType(FileSearchData.FileType.IMAGE); - } - @Override public void componentOpened() { super.componentOpened(); @@ -154,15 +130,8 @@ public final class DiscoveryTopComponent extends TopComponent { // //GEN-BEGIN:initComponents private void initComponents() { - javax.swing.JSplitPane mainSplitPane = new javax.swing.JSplitPane(); - leftSplitPane = new javax.swing.JSplitPane(); + mainSplitPane = new javax.swing.JSplitPane(); rightSplitPane = new javax.swing.JSplitPane(); - javax.swing.JPanel toolBarPanel = new javax.swing.JPanel(); - imagesButton = new javax.swing.JButton(); - javax.swing.JLabel stepOneLabel = new javax.swing.JLabel(); - videosButton = new javax.swing.JButton(); - javax.swing.Box.Filler filler1 = new javax.swing.Box.Filler(new java.awt.Dimension(119, 0), new java.awt.Dimension(119, 0), new java.awt.Dimension(119, 32767)); - documentsButton = new javax.swing.JButton(); setPreferredSize(new java.awt.Dimension(1400, 900)); setLayout(new java.awt.BorderLayout()); @@ -170,11 +139,6 @@ public final class DiscoveryTopComponent extends TopComponent { mainSplitPane.setDividerLocation(450); mainSplitPane.setPreferredSize(new java.awt.Dimension(1400, 828)); - leftSplitPane.setDividerLocation(325); - leftSplitPane.setToolTipText(""); - leftSplitPane.setPreferredSize(new java.awt.Dimension(400, 828)); - mainSplitPane.setLeftComponent(leftSplitPane); - rightSplitPane.setDividerLocation(475); rightSplitPane.setOrientation(javax.swing.JSplitPane.VERTICAL_SPLIT); rightSplitPane.setResizeWeight(0.5); @@ -182,196 +146,8 @@ public final class DiscoveryTopComponent extends TopComponent { mainSplitPane.setRightComponent(rightSplitPane); add(mainSplitPane, java.awt.BorderLayout.CENTER); - - imagesButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/images/pictures-icon.png"))); // NOI18N - org.openide.awt.Mnemonics.setLocalizedText(imagesButton, org.openide.util.NbBundle.getMessage(DiscoveryTopComponent.class, "DiscoveryTopComponent.imagesButton.text")); // NOI18N - imagesButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/images/pictures-icon.png"))); // NOI18N - imagesButton.setFocusable(false); - imagesButton.setHorizontalAlignment(javax.swing.SwingConstants.LEFT); - imagesButton.setMaximumSize(new java.awt.Dimension(90, 43)); - imagesButton.setMinimumSize(new java.awt.Dimension(90, 43)); - imagesButton.setPreferredSize(new java.awt.Dimension(90, 43)); - imagesButton.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - imagesButtonActionPerformed(evt); - } - }); - - org.openide.awt.Mnemonics.setLocalizedText(stepOneLabel, org.openide.util.NbBundle.getMessage(DiscoveryTopComponent.class, "DiscoveryTopComponent.stepOneLabel.text")); // NOI18N - - videosButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/images/video-icon.png"))); // NOI18N - org.openide.awt.Mnemonics.setLocalizedText(videosButton, org.openide.util.NbBundle.getMessage(DiscoveryTopComponent.class, "DiscoveryTopComponent.videosButton.text")); // NOI18N - videosButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/images/video-icon.png"))); // NOI18N - videosButton.setDisabledSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/images/video-icon.png"))); // NOI18N - videosButton.setFocusable(false); - videosButton.setHorizontalAlignment(javax.swing.SwingConstants.LEFT); - videosButton.setMaximumSize(new java.awt.Dimension(90, 43)); - videosButton.setMinimumSize(new java.awt.Dimension(90, 43)); - videosButton.setPreferredSize(new java.awt.Dimension(90, 43)); - videosButton.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - videosButtonActionPerformed(evt); - } - }); - - documentsButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/images/documents-icon.png"))); // NOI18N - org.openide.awt.Mnemonics.setLocalizedText(documentsButton, org.openide.util.NbBundle.getMessage(DiscoveryTopComponent.class, "DiscoveryTopComponent.documentsButton.text")); // NOI18N - documentsButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/images/documents-icon.png"))); // NOI18N - documentsButton.setDisabledSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/images/documents-icon.png"))); // NOI18N - documentsButton.setFocusable(false); - documentsButton.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - documentsButtonActionPerformed(evt); - } - }); - - javax.swing.GroupLayout toolBarPanelLayout = new javax.swing.GroupLayout(toolBarPanel); - toolBarPanel.setLayout(toolBarPanelLayout); - toolBarPanelLayout.setHorizontalGroup( - toolBarPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(toolBarPanelLayout.createSequentialGroup() - .addContainerGap(414, Short.MAX_VALUE) - .addGroup(toolBarPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(toolBarPanelLayout.createSequentialGroup() - .addComponent(imagesButton, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(videosButton, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(documentsButton)) - .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, toolBarPanelLayout.createSequentialGroup() - .addComponent(filler1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addGap(0, 0, 0) - .addComponent(stepOneLabel) - .addGap(119, 119, 119))) - .addContainerGap(413, Short.MAX_VALUE)) - ); - - toolBarPanelLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {documentsButton, imagesButton, videosButton}); - - toolBarPanelLayout.setVerticalGroup( - toolBarPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(toolBarPanelLayout.createSequentialGroup() - .addGap(4, 4, 4) - .addGroup(toolBarPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) - .addComponent(stepOneLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(filler1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addGroup(toolBarPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(videosButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(imagesButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(documentsButton, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addGap(5, 5, 5)) - ); - - toolBarPanelLayout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {documentsButton, imagesButton, videosButton}); - - add(toolBarPanel, java.awt.BorderLayout.PAGE_START); }// //GEN-END:initComponents - private void imagesButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_imagesButtonActionPerformed - resetTopComponent(); - imagesButton.setSelected(true); - imagesButton.setEnabled(false); - imagesButton.setBackground(SELECTED_COLOR); - imagesButton.setForeground(Color.BLACK); - videosButton.setSelected(false); - videosButton.setEnabled(true); - videosButton.setBackground(UNSELECTED_COLOR); - documentsButton.setSelected(false); - documentsButton.setEnabled(true); - documentsButton.setBackground(UNSELECTED_COLOR); - fileSearchPanel.setSelectedType(FileSearchData.FileType.IMAGE); - }//GEN-LAST:event_imagesButtonActionPerformed - - private void videosButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_videosButtonActionPerformed - resetTopComponent(); - imagesButton.setSelected(false); - imagesButton.setEnabled(true); - imagesButton.setBackground(UNSELECTED_COLOR); - videosButton.setSelected(true); - videosButton.setEnabled(false); - videosButton.setBackground(SELECTED_COLOR); - videosButton.setForeground(Color.BLACK); - documentsButton.setSelected(false); - documentsButton.setEnabled(true); - documentsButton.setBackground(UNSELECTED_COLOR); - fileSearchPanel.setSelectedType(FileSearchData.FileType.VIDEO); - }//GEN-LAST:event_videosButtonActionPerformed - - private void documentsButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_documentsButtonActionPerformed - resetTopComponent(); - documentsButton.setSelected(true); - documentsButton.setEnabled(false); - documentsButton.setBackground(SELECTED_COLOR); - documentsButton.setForeground(Color.BLACK); - videosButton.setSelected(false); - videosButton.setEnabled(true); - videosButton.setBackground(UNSELECTED_COLOR); - imagesButton.setSelected(false); - imagesButton.setEnabled(true); - imagesButton.setBackground(UNSELECTED_COLOR); - fileSearchPanel.setSelectedType(FileSearchData.FileType.DOCUMENTS); - }//GEN-LAST:event_documentsButtonActionPerformed - - /** - * Update the user interface in response to a search being cancelled. - * - * @param searchCancelledEvent The SearchCancelledEvent received. - */ - @Subscribe - void handleSearchCancelledEvent(DiscoveryEventUtils.SearchCancelledEvent searchCancelledEvent) { - SwingUtilities.invokeLater(() -> { - if (null != fileSearchPanel.getSelectedType()) { - switch (fileSearchPanel.getSelectedType()) { - case VIDEO: - imagesButton.setEnabled(true); - documentsButton.setEnabled(true); - break; - case IMAGE: - videosButton.setEnabled(true); - documentsButton.setEnabled(true); - break; - case DOCUMENTS: - videosButton.setEnabled(true); - imagesButton.setEnabled(true); - break; - default: - break; - } - } - - }); - } - - /** - * Update the user interface in response to a search being completed. - * - * @param searchCompletedEvent The SearchCompletedEvent received. - */ - @Subscribe - void handleSearchCompletedEvent(DiscoveryEventUtils.SearchCompleteEvent searchCompletedEvent) { - SwingUtilities.invokeLater(() -> { - if (null != fileSearchPanel.getSelectedType()) { - switch (fileSearchPanel.getSelectedType()) { - case VIDEO: - imagesButton.setEnabled(true); - documentsButton.setEnabled(true); - break; - case IMAGE: - videosButton.setEnabled(true); - documentsButton.setEnabled(true); - break; - case DOCUMENTS: - videosButton.setEnabled(true); - imagesButton.setEnabled(true); - break; - default: - break; - } - } - }); - } - @Override public List availableModes(List modes) { /* @@ -383,26 +159,10 @@ public final class DiscoveryTopComponent extends TopComponent { .collect(Collectors.toList()); } - /** - * Update the user interface in response to a search being started. - * - * @param searchStartedEvent The SearchStartedEvent received. - */ - @Subscribe - void handleSearchStartedEvent(DiscoveryEventUtils.SearchStartedEvent searchStartedEvent) { - SwingUtilities.invokeLater(() -> { - imagesButton.setEnabled(false); - videosButton.setEnabled(false); - documentsButton.setEnabled(false); - }); - } // Variables declaration - do not modify//GEN-BEGIN:variables - private javax.swing.JButton documentsButton; - private javax.swing.JButton imagesButton; - private javax.swing.JSplitPane leftSplitPane; + private javax.swing.JSplitPane mainSplitPane; private javax.swing.JSplitPane rightSplitPane; - private javax.swing.JButton videosButton; // End of variables declaration//GEN-END:variables } diff --git a/Core/src/org/sleuthkit/autopsy/discovery/FileSearchPanel.form b/Core/src/org/sleuthkit/autopsy/discovery/FileSearchPanel.form index 27e383ed3b..8460710c89 100644 --- a/Core/src/org/sleuthkit/autopsy/discovery/FileSearchPanel.form +++ b/Core/src/org/sleuthkit/autopsy/discovery/FileSearchPanel.form @@ -47,13 +47,6 @@ - - - - - - - @@ -70,20 +63,12 @@ - + - - - - - - - - - + @@ -813,16 +798,6 @@ - - - - - - - - - - @@ -949,24 +924,6 @@ - - - - - - - - - - - - - - - - - - diff --git a/Core/src/org/sleuthkit/autopsy/discovery/FileSearchPanel.java b/Core/src/org/sleuthkit/autopsy/discovery/FileSearchPanel.java index 641fb9b5a8..a532afe816 100644 --- a/Core/src/org/sleuthkit/autopsy/discovery/FileSearchPanel.java +++ b/Core/src/org/sleuthkit/autopsy/discovery/FileSearchPanel.java @@ -583,9 +583,6 @@ final class FileSearchPanel extends javax.swing.JPanel implements ActionListener * Reset the panel to its initial configuration. */ void resetPanel() { - - searchButton.setEnabled(false); - // Set up the filters setUpDataSourceFilter(); setUpFrequencyFilter(); @@ -1099,8 +1096,7 @@ final class FileSearchPanel extends javax.swing.JPanel implements ActionListener * The settings are valid so enable the Search button */ private void setValid() { - errorLabel.setText(""); - searchButton.setEnabled(true); + firePropertyChange("FilterError", null, null); } /** @@ -1110,8 +1106,7 @@ final class FileSearchPanel extends javax.swing.JPanel implements ActionListener * @param error */ private void setInvalid(String error) { - errorLabel.setText(error); - searchButton.setEnabled(false); + firePropertyChange("FilterError", error, error); } /** @@ -1173,7 +1168,6 @@ final class FileSearchPanel extends javax.swing.JPanel implements ActionListener includeRadioButton = new javax.swing.JRadioButton(); javax.swing.JPanel parentTextPanel = new javax.swing.JPanel(); parentTextField = new javax.swing.JTextField(); - searchButton = new javax.swing.JButton(); javax.swing.JPanel sortingPanel = new javax.swing.JPanel(); groupByCombobox = new javax.swing.JComboBox<>(); orderByCombobox = new javax.swing.JComboBox<>(); @@ -1181,8 +1175,6 @@ final class FileSearchPanel extends javax.swing.JPanel implements ActionListener javax.swing.JLabel orderByLabel = new javax.swing.JLabel(); javax.swing.JLabel groupByLabel = new javax.swing.JLabel(); groupSortingComboBox = new javax.swing.JComboBox<>(); - errorLabel = new javax.swing.JLabel(); - cancelButton = new javax.swing.JButton(); stepTwoLabel = new javax.swing.JLabel(); javax.swing.JLabel stepThreeLabel = new javax.swing.JLabel(); @@ -1664,13 +1656,6 @@ final class FileSearchPanel extends javax.swing.JPanel implements ActionListener filtersScrollPane.setViewportView(filtersPanel); - org.openide.awt.Mnemonics.setLocalizedText(searchButton, org.openide.util.NbBundle.getMessage(FileSearchPanel.class, "FileSearchPanel.searchButton.text")); // NOI18N - searchButton.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - searchButtonActionPerformed(evt); - } - }); - sortingPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(org.openide.util.NbBundle.getMessage(FileSearchPanel.class, "FileSearchPanel.sortingPanel.border.title"))); // NOI18N sortingPanel.setPreferredSize(new java.awt.Dimension(345, 112)); @@ -1717,16 +1702,6 @@ final class FileSearchPanel extends javax.swing.JPanel implements ActionListener .addContainerGap()) ); - errorLabel.setForeground(new java.awt.Color(255, 0, 0)); - - org.openide.awt.Mnemonics.setLocalizedText(cancelButton, org.openide.util.NbBundle.getMessage(FileSearchPanel.class, "FileSearchPanel.cancelButton.text")); // NOI18N - cancelButton.setEnabled(false); - cancelButton.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - cancelButtonActionPerformed(evt); - } - }); - org.openide.awt.Mnemonics.setLocalizedText(stepThreeLabel, org.openide.util.NbBundle.getMessage(FileSearchPanel.class, "FileSearchPanel.stepThreeLabel.text")); // NOI18N javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); @@ -1741,66 +1716,26 @@ final class FileSearchPanel extends javax.swing.JPanel implements ActionListener .addContainerGap()) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) - .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup() - .addComponent(errorLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(cancelButton) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(searchButton)) .addComponent(stepThreeLabel, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(filtersScrollPane, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(sortingPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 309, Short.MAX_VALUE)) .addGap(6, 6, 6)))) ); - - layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {cancelButton, searchButton}); - layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addGap(6, 6, 6) .addComponent(stepTwoLabel) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(filtersScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 207, Short.MAX_VALUE) + .addComponent(filtersScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 181, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(stepThreeLabel) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(sortingPanel, 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(errorLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(cancelButton) - .addComponent(searchButton))) - .addGap(6, 6, 6)) + .addGap(64, 64, 64)) ); }// //GEN-END:initComponents - private void searchButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_searchButtonActionPerformed - // Get the selected filters - List filters = getFilters(); - enableSearch(false); - DiscoveryEventUtils.getDiscoveryEventBus().post(new DiscoveryEventUtils.SearchStartedEvent(fileType)); - - // Get the grouping attribute and group sorting method - FileSearch.AttributeType groupingAttr = getGroupingAttribute(); - FileGroup.GroupSortingAlgorithm groupSortAlgorithm = getGroupSortingMethod(); - - // Get the file sorting method - FileSorter.SortingMethod fileSort = getFileSortingMethod(); - CentralRepository centralRepoDb = null; - if (CentralRepository.isEnabled()) { - try { - centralRepoDb = CentralRepository.getInstance(); - } catch (CentralRepoException ex) { - centralRepoDb = null; - logger.log(Level.SEVERE, "Error loading central repository database, no central repository options will be available for File Discovery", ex); - } - } - searchWorker = new SearchWorker(centralRepoDb, filters, groupingAttr, groupSortAlgorithm, fileSort); - searchWorker.execute(); - }//GEN-LAST:event_searchButtonActionPerformed - /** * Set the enabled status of the search controls. * @@ -1829,8 +1764,6 @@ final class FileSearchPanel extends javax.swing.JPanel implements ActionListener break; } } - searchButton.setEnabled(enabled); - cancelButton.setEnabled(!enabled); orderByCombobox.setEnabled(enabled); groupByCombobox.setEnabled(enabled); groupSortingComboBox.setEnabled(enabled); @@ -1915,10 +1848,6 @@ final class FileSearchPanel extends javax.swing.JPanel implements ActionListener dataSourceList.setEnabled(dataSourceCheckbox.isSelected()); }//GEN-LAST:event_dataSourceCheckboxActionPerformed - private void cancelButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cancelButtonActionPerformed - cancelSearch(); - }//GEN-LAST:event_cancelButtonActionPerformed - private void hashSetCheckboxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_hashSetCheckboxActionPerformed hashSetList.setEnabled(hashSetCheckbox.isSelected()); }//GEN-LAST:event_hashSetCheckboxActionPerformed @@ -1942,7 +1871,6 @@ final class FileSearchPanel extends javax.swing.JPanel implements ActionListener // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JButton addButton; - private javax.swing.JButton cancelButton; private javax.swing.JCheckBox crFrequencyCheckbox; private javax.swing.JList crFrequencyList; private javax.swing.JScrollPane crFrequencyScrollPane; @@ -1950,7 +1878,6 @@ final class FileSearchPanel extends javax.swing.JPanel implements ActionListener private javax.swing.JList dataSourceList; private javax.swing.JScrollPane dataSourceScrollPane; private javax.swing.JButton deleteButton; - private javax.swing.JLabel errorLabel; private javax.swing.JRadioButton excludeRadioButton; private javax.swing.JRadioButton fullRadioButton; private javax.swing.JComboBox groupByCombobox; @@ -1978,7 +1905,6 @@ final class FileSearchPanel extends javax.swing.JPanel implements ActionListener private javax.swing.JCheckBox scoreCheckbox; private javax.swing.JList scoreList; private javax.swing.JScrollPane scoreScrollPane; - private javax.swing.JButton searchButton; private javax.swing.JCheckBox sizeCheckbox; private javax.swing.JList sizeList; private javax.swing.JScrollPane sizeScrollPane; diff --git a/Core/src/org/sleuthkit/autopsy/discovery/OpenDiscoveryAction.java b/Core/src/org/sleuthkit/autopsy/discovery/OpenDiscoveryAction.java index 091e698a4b..0a69539786 100644 --- a/Core/src/org/sleuthkit/autopsy/discovery/OpenDiscoveryAction.java +++ b/Core/src/org/sleuthkit/autopsy/discovery/OpenDiscoveryAction.java @@ -42,8 +42,8 @@ import org.sleuthkit.datamodel.SleuthkitCase; import org.sleuthkit.datamodel.TskCoreException; /** - * Class to open the Discovery top component. Allows the user to run - * searches and see results. + * Class to open the Discovery top component. Allows the user to run searches + * and see results. */ @ActionID(category = "Tools", id = "org.sleuthkit.autopsy.newpackage.OpenDiscoveryAction") @ActionReferences(value = { @@ -75,17 +75,19 @@ public final class OpenDiscoveryAction extends CallableSystemAction implements P @Override @SuppressWarnings("fallthrough") public void performAction() { - final DiscoveryTopComponent tc = DiscoveryTopComponent.getTopComponent(); - if (tc != null) { - if (tc.isOpened() == false) { - tc.open(); - tc.updateSearchSettings(); - displayErrorMessage(tc); - } - tc.toFront(); - tc.requestActive(); - - } + final DiscoveryDialog discDialog = new DiscoveryDialog(); + discDialog.setVisible(true); +// final DiscoveryTopComponent tc = DiscoveryTopComponent.getTopComponent(); +// if (tc != null) { +// if (tc.isOpened() == false) { +// tc.open(); +// tc.updateSearchSettings(); +// displayErrorMessage(tc); +// } +// tc.toFront(); +// tc.requestActive(); +// +// } } /**