Autopsy  4.10.0
Graphical digital forensics platform for The Sleuth Kit and other tools.
MultiCaseKeywordSearchErrorDialog.java
Go to the documentation of this file.
1 /*
2  * Autopsy Forensic Browser
3  *
4  * Copyright 2019 Basis Technology Corp.
5  * Contact: carrier <at> sleuthkit <dot> org
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  */
19 package org.sleuthkit.autopsy.keywordsearch.multicase;
20 
21 import javax.swing.JDialog;
22 import org.openide.util.NbBundle.Messages;
23 import org.openide.windows.WindowManager;
24 
29 final class MultiCaseKeywordSearchErrorDialog extends JDialog {
30 
31  private static final long serialVersionUID = 1L;
32 
36  @Messages({"MultiCaseKeywordSearchErrorDialog.title.text=Error(s) While Searching"})
37  MultiCaseKeywordSearchErrorDialog(String contents) {
38  setTitle(Bundle.MultiCaseKeywordSearchErrorDialog_title_text());
39  initComponents();
40  errorsTextArea.setText(contents);
41  this.setLocationRelativeTo(WindowManager.getDefault().getMainWindow());
42  pack();
43  setModal(true);
44  setResizable(false);
45  setVisible(true);
46  }
47 
53  @SuppressWarnings("unchecked")
54  // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
55  private void initComponents() {
56 
57  errorsScrollPane = new javax.swing.JScrollPane();
58  errorsTextArea = new javax.swing.JTextArea();
59  closeButton = new javax.swing.JButton();
60 
61  errorsScrollPane.setPreferredSize(new java.awt.Dimension(470, 175));
62 
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);
70 
71  org.openide.awt.Mnemonics.setLocalizedText(closeButton, org.openide.util.NbBundle.getMessage(MultiCaseKeywordSearchErrorDialog.class, "MultiCaseKeywordSearchErrorDialog.closeButton.text")); // NOI18N
72  closeButton.addActionListener(new java.awt.event.ActionListener() {
73  public void actionPerformed(java.awt.event.ActionEvent evt) {
74  closeButtonActionPerformed(evt);
75  }
76  });
77 
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()
85  .addContainerGap()
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)))
90  .addContainerGap())
91  );
92  layout.setVerticalGroup(
93  layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
94  .addGroup(layout.createSequentialGroup()
95  .addContainerGap()
96  .addComponent(errorsScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 196, Short.MAX_VALUE)
97  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
98  .addComponent(closeButton)
99  .addGap(14, 14, 14))
100  );
101  }// </editor-fold>//GEN-END:initComponents
102 
103  private void closeButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_closeButtonActionPerformed
104  dispose();
105  }//GEN-LAST:event_closeButtonActionPerformed
106 
107 
108  // Variables declaration - do not modify//GEN-BEGIN:variables
109  private javax.swing.JButton closeButton;
110  private javax.swing.JScrollPane errorsScrollPane;
111  private javax.swing.JTextArea errorsTextArea;
112  // End of variables declaration//GEN-END:variables
113 }

Copyright © 2012-2018 Basis Technology. Generated on: Fri Mar 22 2019
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.