Autopsy  4.19.1
Graphical digital forensics platform for The Sleuth Kit and other tools.
FileSearchDialog.java
Go to the documentation of this file.
1 /*
2  * Autopsy Forensic Browser
3  *
4  * Copyright 2011-2021 Basis Technology Corp.
5  * Contact: carrier <at> sleuthkit <dot> org
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  */
19 package org.sleuthkit.autopsy.filesearch;
20 
21 import java.awt.event.ActionEvent;
22 import java.awt.event.ActionListener;
23 import org.openide.util.NbBundle;
24 import org.openide.windows.WindowManager;
25 
29 @SuppressWarnings("PMD.SingularField") // UI widgets cause lots of false positives
30 final class FileSearchDialog extends javax.swing.JDialog {
31 
32  private static final long serialVersionUID = 1L;
33 
37  FileSearchDialog() {
38  super(WindowManager.getDefault().getMainWindow(),
39  NbBundle.getMessage(FileSearchDialog.class, "FileSearchDialog.frame.msg"), true);
40  initComponents();
41 
42  setResizable(false);
43  this.setLocationRelativeTo(WindowManager.getDefault().getMainWindow());
44  fileSearchPanel1.addListenerToAll(new ActionListener() {
45 
46  @Override
47  public void actionPerformed(ActionEvent e) {
48  setVisible(false);
49  }
50  });
51  }
52 
58  void setSelectedDataSourceFilter(long dataSourceId) {
59  fileSearchPanel1.setDataSourceFilter(dataSourceId);
60  }
61 
66  void resetCaseDependentFilters() {
67  fileSearchPanel1.resetCaseDependentFilters();
68  }
69 
75  @SuppressWarnings("unchecked")
76  // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
77  private void initComponents() {
78 
79  fileSearchPanel1 = new org.sleuthkit.autopsy.filesearch.FileSearchPanel();
80 
81  setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
82 
83  javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
84  getContentPane().setLayout(layout);
85  layout.setHorizontalGroup(
86  layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
87  .addComponent(fileSearchPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, 338, Short.MAX_VALUE)
88  );
89  layout.setVerticalGroup(
90  layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
91  .addComponent(fileSearchPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, 487, Short.MAX_VALUE)
92  );
93 
94  pack();
95  }// </editor-fold>//GEN-END:initComponents
96 
97  // Variables declaration - do not modify//GEN-BEGIN:variables
98  private org.sleuthkit.autopsy.filesearch.FileSearchPanel fileSearchPanel1;
99  // End of variables declaration//GEN-END:variables
100 }

Copyright © 2012-2021 Basis Technology. Generated on: Thu Sep 30 2021
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.