Autopsy  4.5.0
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 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 
20 /*
21  * FileSearchDialog.java
22  *
23  * Created on Mar 5, 2012, 1:57:33 PM
24  */
25 package org.sleuthkit.autopsy.filesearch;
26 
27 import org.openide.util.NbBundle;
28 
29 import java.awt.Dimension;
30 import java.awt.Toolkit;
31 import java.awt.event.ActionEvent;
32 import java.awt.event.ActionListener;
33 import javax.swing.JFrame;
34 import org.openide.windows.WindowManager;
35 
39 class FileSearchDialog extends javax.swing.JDialog {
40 
44  public FileSearchDialog() {
45  super(new JFrame(NbBundle.getMessage(FileSearchDialog.class, "FileSearchDialog.frame.title")),
46  NbBundle.getMessage(FileSearchDialog.class, "FileSearchDialog.frame.msg"), true);
47  initComponents();
48 
49  setResizable(false);
50  Dimension screenDimension = Toolkit.getDefaultToolkit().getScreenSize();
51  double w = getSize().getWidth();
52  double h = getSize().getHeight();
53  setLocation((int) ((screenDimension.getWidth() - w) / 2), (int) ((screenDimension.getHeight() - h) / 2));
54  this.setLocationRelativeTo(WindowManager.getDefault().getMainWindow());
55  fileSearchPanel1.addListenerToAll(new ActionListener() {
56 
57  @Override
58  public void actionPerformed(ActionEvent e) {
59  dispose();
60  }
61  });
62  }
63 
69  @SuppressWarnings("unchecked")
70  // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
71  private void initComponents() {
72 
73  fileSearchPanel1 = new org.sleuthkit.autopsy.filesearch.FileSearchPanel();
74 
75  setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
76 
77  javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
78  getContentPane().setLayout(layout);
79  layout.setHorizontalGroup(
80  layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
81  .addComponent(fileSearchPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, 338, Short.MAX_VALUE)
82  );
83  layout.setVerticalGroup(
84  layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
85  .addComponent(fileSearchPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, 487, Short.MAX_VALUE)
86  );
87 
88  pack();
89  }// </editor-fold>//GEN-END:initComponents
90 
91  // Variables declaration - do not modify//GEN-BEGIN:variables
92  private org.sleuthkit.autopsy.filesearch.FileSearchPanel fileSearchPanel1;
93  // End of variables declaration//GEN-END:variables
94 }

Copyright © 2012-2016 Basis Technology. Generated on: Tue Feb 20 2018
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.