19 package org.sleuthkit.autopsy.keywordsearch.multicase;
21 import javax.swing.JDialog;
22 import org.openide.util.NbBundle.Messages;
23 import org.openide.windows.WindowManager;
29 final class MultiCaseKeywordSearchErrorDialog
extends JDialog {
31 private static final long serialVersionUID = 1L;
36 @Messages({
"MultiCaseKeywordSearchErrorDialog.title.text=Error(s) While Searching"})
37 MultiCaseKeywordSearchErrorDialog(String contents) {
38 setTitle(Bundle.MultiCaseKeywordSearchErrorDialog_title_text());
40 errorsTextArea.setText(contents);
41 this.setLocationRelativeTo(WindowManager.getDefault().getMainWindow());
53 @SuppressWarnings(
"unchecked")
55 private void initComponents() {
57 errorsScrollPane =
new javax.swing.JScrollPane();
58 errorsTextArea =
new javax.swing.JTextArea();
59 closeButton =
new javax.swing.JButton();
61 errorsScrollPane.setPreferredSize(
new java.awt.Dimension(470, 175));
63 errorsTextArea.setEditable(
false);
64 errorsTextArea.setColumns(40);
65 errorsTextArea.setLineWrap(
true);
66 errorsTextArea.setRows(5);
67 errorsTextArea.setWrapStyleWord(
true);
68 errorsTextArea.setPreferredSize(
new java.awt.Dimension(460, 160));
69 errorsScrollPane.setViewportView(errorsTextArea);
71 org.openide.awt.Mnemonics.setLocalizedText(closeButton,
org.openide.util.NbBundle.getMessage(MultiCaseKeywordSearchErrorDialog.class,
"MultiCaseKeywordSearchErrorDialog.closeButton.text"));
72 closeButton.addActionListener(
new java.awt.event.ActionListener() {
73 public void actionPerformed(java.awt.event.ActionEvent evt) {
74 closeButtonActionPerformed(evt);
78 javax.swing.GroupLayout layout =
new javax.swing.GroupLayout(getContentPane());
79 getContentPane().setLayout(layout);
80 layout.setHorizontalGroup(
81 layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
82 .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
83 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
84 .addGroup(layout.createSequentialGroup()
86 .addComponent(errorsScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 480, Short.MAX_VALUE))
87 .addGroup(layout.createSequentialGroup()
88 .addGap(0, 0, Short.MAX_VALUE)
89 .addComponent(closeButton)))
92 layout.setVerticalGroup(
93 layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
94 .addGroup(layout.createSequentialGroup()
96 .addComponent(errorsScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 196, Short.MAX_VALUE)
97 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
98 .addComponent(closeButton)
103 private void closeButtonActionPerformed(java.awt.event.ActionEvent evt) {
109 private javax.swing.JButton closeButton;
110 private javax.swing.JScrollPane errorsScrollPane;
111 private javax.swing.JTextArea errorsTextArea;