6305 first batch of codacy fixes

This commit is contained in:
William Schaefer 2020-06-04 20:38:38 -04:00
parent 2af7b14da9
commit 628c2384d4
15 changed files with 150 additions and 131 deletions

View File

@ -53,7 +53,7 @@ final class DetailsPanel extends javax.swing.JPanel {
private final DataContentPanel dataContentPanel;
private final DefaultListModel<AbstractFile> instancesListModel = new DefaultListModel<>();
private ListSelectionListener listener = null;
private final ListSelectionListener listener;
/**
* Creates new form DetailsPanel.

View File

@ -166,6 +166,10 @@
<ResourceString bundle="org/sleuthkit/autopsy/discovery/Bundle.properties" key="DiscoveryDialog.step1Label.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
<AuxValues>
<AuxValue name="JavaCodeGenerator_VariableLocal" type="java.lang.Boolean" value="true"/>
<AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="0"/>
</AuxValues>
</Component>
<Component class="javax.swing.Box$Filler" name="filler1">
<Properties>
@ -180,12 +184,18 @@
</Property>
</Properties>
<AuxValues>
<AuxValue name="JavaCodeGenerator_VariableLocal" type="java.lang.Boolean" value="true"/>
<AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="0"/>
<AuxValue name="classDetails" type="java.lang.String" value="Box.Filler.HorizontalStrut"/>
</AuxValues>
</Component>
</SubComponents>
</Container>
<Container class="javax.swing.JPanel" name="jPanel1">
<Container class="javax.swing.JPanel" name="displaySettingsPanel">
<AuxValues>
<AuxValue name="JavaCodeGenerator_VariableLocal" type="java.lang.Boolean" value="true"/>
<AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="0"/>
</AuxValues>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
<BorderConstraints direction="Last"/>

View File

@ -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,14 +80,9 @@ 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()) {
groupSortingComboBox.addItem(groupSortAlgorithm);
@ -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();
}// </editor-fold>//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.
* The adjust the controls to reflect whether the settings are valid based
* on the error.
*
* @param error The error message to display, null if there is no error.
*/
void displayErrorMessage() {
//check if modules run and assemble message
try {
SleuthkitCase skCase = Case.getCurrentCaseThrows().getSleuthkitCase();
Map<Long, DataSourceModulesWrapper> 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() {
private void setValid(String error) {
if (StringUtils.isBlank(error)) {
errorLabel.setText("");
searchButton.setEnabled(true);
}
/**
* The settings are not valid so disable the search button and display the
* given error message.
*
* @param error The error message to display.
*/
private void setInvalid(String error) {
} 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<GroupingAttributeType> groupByCombobox;
private javax.swing.JComboBox<GroupSortingAlgorithm> groupSortingComboBox;
private javax.swing.JButton imagesButton;
private javax.swing.JPanel jPanel1;
private javax.swing.JComboBox<SortingMethod> orderByCombobox;
private javax.swing.JButton searchButton;
private javax.swing.JLabel step1Label;
private javax.swing.JButton videosButton;
// End of variables declaration//GEN-END:variables

View File

@ -61,7 +61,11 @@
</Container>
</SubComponents>
</Container>
<Container class="javax.swing.JPanel" name="jPanel1">
<Container class="javax.swing.JPanel" name="searchDetailsPanel">
<AuxValues>
<AuxValue name="JavaCodeGenerator_VariableLocal" type="java.lang.Boolean" value="true"/>
<AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="0"/>
</AuxValues>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
<BorderConstraints direction="First"/>
@ -125,6 +129,8 @@
</Property>
</Properties>
<AuxValues>
<AuxValue name="JavaCodeGenerator_VariableLocal" type="java.lang.Boolean" value="true"/>
<AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="0"/>
<AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
</AuxValues>

View File

@ -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);
}// </editor-fold>//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

View File

@ -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<Long, DataSourceModulesWrapper> 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.
*/

View File

@ -17,6 +17,10 @@
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout"/>
<SubComponents>
<Container class="javax.swing.JScrollPane" name="documentFiltersScrollPane">
<AuxValues>
<AuxValue name="JavaCodeGenerator_VariableLocal" type="java.lang.Boolean" value="true"/>
<AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="0"/>
</AuxValues>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
<BorderConstraints direction="Center"/>
@ -26,6 +30,10 @@
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
<SubComponents>
<Container class="javax.swing.JPanel" name="documentFiltersPanel">
<AuxValues>
<AuxValue name="JavaCodeGenerator_VariableLocal" type="java.lang.Boolean" value="true"/>
<AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="0"/>
</AuxValues>
<Layout>
<DimensionLayout dim="0">

View File

@ -59,8 +59,8 @@ final class DocumentFilterPanel extends AbstractFiltersPanel {
// <editor-fold defaultstate="collapsed" desc="Generated Code">//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

View File

@ -17,6 +17,10 @@
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout"/>
<SubComponents>
<Container class="javax.swing.JScrollPane" name="imageFiltersScrollPane">
<AuxValues>
<AuxValue name="JavaCodeGenerator_VariableLocal" type="java.lang.Boolean" value="true"/>
<AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="0"/>
</AuxValues>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
<BorderConstraints direction="Center"/>
@ -26,6 +30,10 @@
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
<SubComponents>
<Container class="javax.swing.JPanel" name="imageFiltersPanel">
<AuxValues>
<AuxValue name="JavaCodeGenerator_VariableLocal" type="java.lang.Boolean" value="true"/>
<AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="0"/>
</AuxValues>
<Layout>
<DimensionLayout dim="0">

View File

@ -63,8 +63,8 @@ final class ImageFilterPanel extends AbstractFiltersPanel {
// <editor-fold defaultstate="collapsed" desc="Generated Code">//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
}

View File

@ -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);
}
/**

View File

@ -87,7 +87,6 @@ final class ResultsPanel extends javax.swing.JPanel {
imageThumbnailViewer.addListSelectionListener((e) -> {
if (resultType == FileSearchData.FileType.IMAGE) {
if (!e.getValueIsAdjusting()) {
List<AbstractFile> 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) {

View File

@ -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;
/**
*

View File

@ -17,6 +17,10 @@
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout"/>
<SubComponents>
<Container class="javax.swing.JScrollPane" name="videoFiltersScrollPane">
<AuxValues>
<AuxValue name="JavaCodeGenerator_VariableLocal" type="java.lang.Boolean" value="true"/>
<AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="0"/>
</AuxValues>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
<BorderConstraints direction="Center"/>
@ -31,6 +35,10 @@
<Dimension value="[223, 66]"/>
</Property>
</Properties>
<AuxValues>
<AuxValue name="JavaCodeGenerator_VariableLocal" type="java.lang.Boolean" value="true"/>
<AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="0"/>
</AuxValues>
<Layout>
<DimensionLayout dim="0">

View File

@ -60,8 +60,8 @@ final class VideoFilterPanel extends AbstractFiltersPanel {
// <editor-fold defaultstate="collapsed" desc="Generated Code">//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