19 package org.sleuthkit.autopsy.casemodule;
21 import java.awt.Dimension;
22 import java.awt.Toolkit;
23 import javax.swing.JFrame;
24 import org.openide.util.ImageUtilities;
25 import org.openide.windows.WindowManager;
30 class SolrNotConfiguredDialog
extends javax.swing.JDialog {
32 private static final long serialVersionUID = 1L;
37 SolrNotConfiguredDialog() {
38 super((JFrame) WindowManager.getDefault().getMainWindow(),
true);
40 Dimension screenDimension = Toolkit.getDefaultToolkit().getScreenSize();
41 int width = getSize().width;
42 int height = getSize().height;
43 setLocation((screenDimension.width - width) / 2, (screenDimension.height - height) / 2);
45 setIconImage(ImageUtilities.loadImage(
"org/sleuthkit/autopsy/images/warning16.png",
false));
53 @SuppressWarnings(
"unchecked")
55 private
void initComponents() {
57 okButton =
new javax.swing.JButton();
58 messageLabel =
new javax.swing.JLabel();
60 setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
61 setTitle(
org.openide.util.NbBundle.getMessage(SolrNotConfiguredDialog.class,
"SolrNotConfiguredDialog.title"));
63 setName(
"toolsNotFound");
65 org.openide.awt.Mnemonics.setLocalizedText(okButton,
org.openide.util.NbBundle.getMessage(SolrNotConfiguredDialog.class,
"SolrNotConfiguredDialog.okButton.text"));
66 okButton.addActionListener(
new java.awt.event.ActionListener() {
67 public void actionPerformed(java.awt.event.ActionEvent evt) {
68 okButtonActionPerformed(evt);
72 org.openide.awt.Mnemonics.setLocalizedText(messageLabel,
org.openide.util.NbBundle.getMessage(SolrNotConfiguredDialog.class,
"SolrNotConfiguredDialog.messageLabel.text"));
74 javax.swing.GroupLayout layout =
new javax.swing.GroupLayout(getContentPane());
75 getContentPane().setLayout(layout);
76 layout.setHorizontalGroup(
77 layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
78 .addGroup(layout.createSequentialGroup()
79 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
80 .addGroup(layout.createSequentialGroup()
81 .addGap(0, 15, Short.MAX_VALUE)
82 .addComponent(messageLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 420, javax.swing.GroupLayout.PREFERRED_SIZE))
83 .addGroup(layout.createSequentialGroup()
84 .addGap(189, 189, 189)
85 .addComponent(okButton)
86 .addGap(0, 193, Short.MAX_VALUE)))
89 layout.setVerticalGroup(
90 layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
91 .addGroup(layout.createSequentialGroup()
93 .addComponent(messageLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
94 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
95 .addComponent(okButton)
102 private void okButtonActionPerformed(java.awt.event.ActionEvent evt) {
107 private javax.swing.JLabel messageLabel;
108 private javax.swing.JButton okButton;