19 package org.sleuthkit.autopsy.ingest;
 
   21 import java.awt.BorderLayout;
 
   22 import java.awt.Dimension;
 
   23 import java.awt.FlowLayout;
 
   24 import java.awt.Toolkit;
 
   25 import java.awt.event.ActionEvent;
 
   26 import java.awt.event.ActionListener;
 
   27 import java.awt.event.WindowAdapter;
 
   28 import java.awt.event.WindowEvent;
 
   29 import java.util.ArrayList;
 
   30 import java.util.List;
 
   31 import javax.swing.BorderFactory;
 
   32 import javax.swing.JButton;
 
   33 import javax.swing.JDialog;
 
   34 import javax.swing.JFrame;
 
   35 import javax.swing.JOptionPane;
 
   36 import javax.swing.JPanel;
 
   37 import org.openide.util.NbBundle;
 
   38 import org.openide.windows.WindowManager;
 
   67         super(frame, title, modal);
 
   68         this.dataSources.addAll(dataSources);
 
   79         this((JFrame) WindowManager.getDefault().getMainWindow(), 
TITLE, 
true, 
dataSources);
 
   89         this.dataSources.add(dir);
 
   97         setLayout(
new BorderLayout());
 
  102         Dimension screenDimension = Toolkit.getDefaultToolkit().getScreenSize();;
 
  111         setPreferredSize(this.ingestJobSettingsPanel.getPreferredSize());
 
  112         add(this.ingestJobSettingsPanel, BorderLayout.CENTER);
 
  115         JButton startButton = 
new JButton(NbBundle.getMessage(
this.getClass(), 
"IngestDialog.startButton.title"));
 
  116         startButton.addActionListener(
new ActionListener() {
 
  118             public void actionPerformed(ActionEvent e) {
 
  124         JButton closeButton = 
new JButton(NbBundle.getMessage(
this.getClass(), 
"IngestDialog.closeButton.title"));
 
  125         closeButton.addActionListener(
new ActionListener() {
 
  127             public void actionPerformed(ActionEvent e) {
 
  133         JPanel buttonPanel = 
new JPanel();
 
  134         buttonPanel.setLayout(
new FlowLayout(FlowLayout.TRAILING));
 
  135         buttonPanel.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 5));
 
  136         buttonPanel.add(startButton);
 
  137         buttonPanel.add(
new javax.swing.Box.Filler(
new Dimension(5, 10), 
new Dimension(5, 10), 
new Dimension(5, 10)));
 
  138         buttonPanel.add(closeButton);
 
  140         add(buttonPanel, BorderLayout.SOUTH);
 
  146         this.addWindowListener(
new WindowAdapter() {
 
  148             public void windowClosing(WindowEvent e) {
 
  156         int width = this.getPreferredSize().width;
 
  157         int height = this.getPreferredSize().height;
 
  158         setLocation((screenDimension.width - width) / 2, (screenDimension.height - height) / 2);
 
  181         ingestJobSettings.
save();
 
  183         if (startIngestJob) {
 
  191         List<String> warnings = ingestJobSettings.
getWarnings();
 
  192         if (warnings.isEmpty() == 
false) {
 
  193             StringBuilder warningMessage = 
new StringBuilder();
 
  194             for (String warning : warnings) {
 
  195                 warningMessage.append(warning).append(
"\n");
 
  197             JOptionPane.showMessageDialog(null, warningMessage.toString());
 
  213         super(frame, title, modal);
 
  225         this(
new JFrame(TITLE), 
TITLE, 
true);
 
  237         this.dataSources.clear();
 
  238         this.dataSources.addAll(dataSources);
 
static void showWarnings(IngestJobSettings ingestJobSettings)
void doButtonAction(boolean startIngestJob)
static synchronized IngestManager getInstance()
static final long serialVersionUID
IngestJobSettingsPanel ingestJobSettingsPanel
static final String TITLE
RunIngestModulesDialog(Directory dir)
final List< Content > dataSources
final IngestType ingestType
IngestJobSettings getSettings()
RunIngestModulesDialog(List< Content > dataSources)
void queueIngestJob(Collection< Content > dataSources, IngestJobSettings settings)
List< String > getWarnings()
void setDataSources(List< Content > dataSources)
RunIngestModulesDialog(JFrame frame, String title, boolean modal)
RunIngestModulesDialog(JFrame frame, String title, boolean modal, List< Content > dataSources)