Autopsy  4.6.0
Graphical digital forensics platform for The Sleuth Kit and other tools.
AdvancedConfigurationCleanDialog.java
Go to the documentation of this file.
1 /*
2  * To change this template, choose Tools | Templates
3  * and open the template in the editor.
4  */
5 package org.sleuthkit.autopsy.corecomponents;
6 
7 import java.awt.Component;
8 import java.awt.Dimension;
9 import java.awt.Toolkit;
10 import javax.swing.JFrame;
11 import javax.swing.JPanel;
12 import org.openide.windows.WindowManager;
13 
19 public class AdvancedConfigurationCleanDialog extends javax.swing.JDialog {
20 
25  this(false);
26  }
27 
31  public AdvancedConfigurationCleanDialog(boolean resizable) {
32  super((JFrame) WindowManager.getDefault().getMainWindow(), true);
33  setResizable(resizable);
34  if (resizable) {
35  this.setIconImage(null);
36  }
38  }
39 
45  public void display(JPanel panel) {
46  this.setTitle(panel.getName());
47 
48  panel.setAlignmentX(Component.CENTER_ALIGNMENT);
49  this.add(panel, 0);
50  this.pack();
51  this.setLocationRelativeTo(WindowManager.getDefault().getMainWindow());
52  this.setVisible(true);
53  }
54 
58  public void close() {
59  this.dispose();
60  }
61 
67  @SuppressWarnings("unchecked")
68  // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
69  private void initComponents() {
70 
71  setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
72  getContentPane().setLayout(new javax.swing.BoxLayout(getContentPane(), javax.swing.BoxLayout.LINE_AXIS));
73 
74  pack();
75  }// </editor-fold>//GEN-END:initComponents
76 
77  // Variables declaration - do not modify//GEN-BEGIN:variables
78  // End of variables declaration//GEN-END:variables
79 }

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