25 package org.sleuthkit.autopsy.filesearch;
 
   27 import org.openide.util.NbBundle;
 
   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;
 
   39 class FileSearchDialog 
extends javax.swing.JDialog {
 
   44     public FileSearchDialog() {
 
   45         super(
new JFrame(NbBundle.getMessage(FileSearchDialog.class, 
"FileSearchDialog.frame.title")),
 
   46                 NbBundle.getMessage(FileSearchDialog.class, 
"FileSearchDialog.frame.msg"), 
true);
 
   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() {
 
   58             public void actionPerformed(ActionEvent e) {
 
   69     @SuppressWarnings(
"unchecked")
 
   71     private 
void initComponents() {
 
   75         setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
 
   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)
 
   83         layout.setVerticalGroup(
 
   84             layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
 
   85             .addComponent(fileSearchPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, 487, Short.MAX_VALUE)