/*
* Autopsy Forensic Browser
*
* Copyright 2011 Basis Technology Corp.
* Contact: carrier <at> sleuthkit <dot> 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.
*/
/*
* FileSearchDialog.java
*
* Created on Mar 5, 2012, 1:57:33 PM
*/
package org.sleuthkit.autopsy.filesearch;
import org.openide.util.NbBundle;
import java.awt.Dimension;
import java.awt.Toolkit;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JFrame;
import org.openide.windows.WindowManager;
/**
* File search dialog
*/
class FileSearchDialog extends javax.swing.JDialog {
/**
* Creates new form FileSearchDialog
*/
public FileSearchDialog() {
super(new JFrame(NbBundle.getMessage(FileSearchDialog.class, "FileSearchDialog.frame.title")),
NbBundle.getMessage(FileSearchDialog.class, "FileSearchDialog.frame.msg"), true);
initComponents();
setResizable(false);
Dimension screenDimension = Toolkit.getDefaultToolkit().getScreenSize();
double w = getSize().getWidth();
double h = getSize().getHeight();
setLocation((int) ((screenDimension.getWidth() - w) / 2), (int) ((screenDimension.getHeight() - h) / 2));
this.setLocationRelativeTo(WindowManager.getDefault().getMainWindow());
fileSearchPanel1.addListenerToAll(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
dispose();
}
});
}
/**
* 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")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
fileSearchPanel1 = new org.sleuthkit.autopsy.filesearch.FileSearchPanel();
setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(fileSearchPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, 338, Short.MAX_VALUE)
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(fileSearchPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, 487, Short.MAX_VALUE)
);
pack();
}// </editor-fold>//GEN-END:initComponents
// Variables declaration - do not modify//GEN-BEGIN:variables
private org.sleuthkit.autopsy.filesearch.FileSearchPanel fileSearchPanel1;
// End of variables declaration//GEN-END:variables
}