19 package org.sleuthkit.autopsy.ingest;
21 import java.awt.BorderLayout;
22 import java.awt.Dimension;
23 import java.awt.Toolkit;
24 import java.awt.event.ActionEvent;
25 import java.awt.event.ActionListener;
26 import java.awt.event.WindowAdapter;
27 import java.awt.event.WindowEvent;
28 import java.util.ArrayList;
29 import java.util.List;
30 import javax.swing.BoxLayout;
31 import javax.swing.JButton;
32 import javax.swing.JDialog;
33 import javax.swing.JFrame;
34 import javax.swing.JOptionPane;
35 import javax.swing.JPanel;
36 import org.openide.util.NbBundle;
52 private static Dimension
DIMENSIONS =
new Dimension(500, 300);
66 super(frame, title, modal);
67 this.dataSources.addAll(dataSources);
88 this.dataSources.add(dir);
96 setLayout(
new BorderLayout());
101 Dimension screenDimension = Toolkit.getDefaultToolkit().getScreenSize();
103 int width = this.getSize().width;
104 int height = this.getSize().height;
105 setLocation((screenDimension.width - width) / 2, (screenDimension.height - height) / 2);
114 add(this.ingestJobSettingsPanel, BorderLayout.PAGE_START);
117 JButton startButton =
new JButton(NbBundle.getMessage(
this.getClass(),
"IngestDialog.startButton.title"));
118 startButton.addActionListener(
new ActionListener() {
120 public void actionPerformed(ActionEvent e) {
126 JButton closeButton =
new JButton(NbBundle.getMessage(
this.getClass(),
"IngestDialog.closeButton.title"));
127 closeButton.addActionListener(
new ActionListener() {
129 public void actionPerformed(ActionEvent e) {
135 JPanel buttonPanel =
new JPanel();
136 buttonPanel.setLayout(
new BoxLayout(buttonPanel, BoxLayout.LINE_AXIS));
137 buttonPanel.add(
new javax.swing.Box.Filler(
new Dimension(10, 10),
new Dimension(10, 10),
new Dimension(10, 10)));
138 buttonPanel.add(startButton);
139 buttonPanel.add(
new javax.swing.Box.Filler(
new Dimension(10, 10),
new Dimension(10, 10),
new Dimension(10, 10)));
140 buttonPanel.add(closeButton);
141 add(buttonPanel, BorderLayout.LINE_START);
147 this.addWindowListener(
new WindowAdapter() {
149 public void windowClosing(WindowEvent e) {
180 ingestJobSettings.
save();
182 if (startIngestJob) {
190 List<String> warnings = ingestJobSettings.
getWarnings();
191 if (warnings.isEmpty() ==
false) {
192 StringBuilder warningMessage =
new StringBuilder();
193 for (String warning : warnings) {
194 warningMessage.append(warning).append(
"\n");
196 JOptionPane.showMessageDialog(null, warningMessage.toString());
212 super(frame, title, modal);
224 this(
new JFrame(TITLE),
TITLE,
true);
236 this.dataSources.clear();
237 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)
static Dimension DIMENSIONS
RunIngestModulesDialog(JFrame frame, String title, boolean modal, List< Content > dataSources)