Autopsy  4.17.0
Graphical digital forensics platform for The Sleuth Kit and other tools.
SolrNotConfiguredDialog.java
Go to the documentation of this file.
1 /*
2  * Autopsy Forensic Browser
3  *
4  * Copyright 2020 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.casemodule;
20 
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;
26 
30 class SolrNotConfiguredDialog extends javax.swing.JDialog {
31 
32  private static final long serialVersionUID = 1L;
33 
37  SolrNotConfiguredDialog() {
38  super((JFrame) WindowManager.getDefault().getMainWindow(), true);
39  // Center the startup window.
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);
44  initComponents();
45  setIconImage(ImageUtilities.loadImage("org/sleuthkit/autopsy/images/warning16.png", false));
46  }
47 
53  @SuppressWarnings("unchecked")
54  // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
55  private void initComponents() {
56 
57  okButton = new javax.swing.JButton();
58  messageLabel = new javax.swing.JLabel();
59 
60  setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
61  setTitle(org.openide.util.NbBundle.getMessage(SolrNotConfiguredDialog.class, "SolrNotConfiguredDialog.title")); // NOI18N
62  setModal(true);
63  setName("toolsNotFound"); // NOI18N
64 
65  org.openide.awt.Mnemonics.setLocalizedText(okButton, org.openide.util.NbBundle.getMessage(SolrNotConfiguredDialog.class, "SolrNotConfiguredDialog.okButton.text")); // NOI18N
66  okButton.addActionListener(new java.awt.event.ActionListener() {
67  public void actionPerformed(java.awt.event.ActionEvent evt) {
68  okButtonActionPerformed(evt);
69  }
70  });
71 
72  org.openide.awt.Mnemonics.setLocalizedText(messageLabel, org.openide.util.NbBundle.getMessage(SolrNotConfiguredDialog.class, "SolrNotConfiguredDialog.messageLabel.text")); // NOI18N
73 
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)))
87  .addContainerGap())
88  );
89  layout.setVerticalGroup(
90  layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
91  .addGroup(layout.createSequentialGroup()
92  .addContainerGap()
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)
96  .addContainerGap())
97  );
98 
99  pack();
100  }// </editor-fold>//GEN-END:initComponents
101 
102  private void okButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_okButtonActionPerformed
103  this.dispose();
104  }//GEN-LAST:event_okButtonActionPerformed
105 
106  // Variables declaration - do not modify//GEN-BEGIN:variables
107  private javax.swing.JLabel messageLabel;
108  private javax.swing.JButton okButton;
109  // End of variables declaration//GEN-END:variables
110 }

Copyright © 2012-2021 Basis Technology. Generated on: Tue Jan 19 2021
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.