Autopsy 4.22.1
Graphical digital forensics platform for The Sleuth Kit and other tools.
CTIntegrationMissingDialog.java
Go to the documentation of this file.
1/*
2 * Autopsy Forensic Browser
3 *
4 * Copyright 2023 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 */
19package com.basistech.df.cybertriage.autopsy;
20
21import org.sleuthkit.autopsy.coreutils.Desktop;
22import java.io.IOException;
23import java.net.URI;
24import java.net.URISyntaxException;
25import java.util.logging.Level;
26import javax.swing.JComponent;
27import org.sleuthkit.autopsy.coreutils.Logger;
28
33public class CTIntegrationMissingDialog extends javax.swing.JDialog {
34
35 private static final String DOCS_PAGE_URL = "https://docs.cybertriage.com/en/latest/chapters/integrations/autopsy.html";
36
37 private static final Logger LOGGER = Logger.getLogger(CTIntegrationMissingDialog.class.getName());
38
42 public CTIntegrationMissingDialog(java.awt.Frame parent, boolean modal) {
43 super(parent, modal);
45 }
46
52 @SuppressWarnings("unchecked")
53 // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
54 private void initComponents() {
55 java.awt.GridBagConstraints gridBagConstraints;
56
57 javax.swing.JLabel descriptionLabel = new javax.swing.JLabel();
58 javax.swing.JLabel docsLabel = new javax.swing.JLabel();
59 link = new javax.swing.JLabel();
60 javax.swing.JPanel paddingPanel = new javax.swing.JPanel();
61 javax.swing.JButton okButton = new javax.swing.JButton();
62
63 setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
64 setTitle(org.openide.util.NbBundle.getMessage(CTIntegrationMissingDialog.class, "CTIntegrationMissingDialog.title")); // NOI18N
65 setAlwaysOnTop(true);
66 setResizable(false);
67 getContentPane().setLayout(new java.awt.GridBagLayout());
68
69 org.openide.awt.Mnemonics.setLocalizedText(descriptionLabel, org.openide.util.NbBundle.getMessage(CTIntegrationMissingDialog.class, "CTIntegrationMissingDialog.descriptionLabel.text")); // NOI18N
70 descriptionLabel.setMinimumSize(new java.awt.Dimension(483, 116));
71 gridBagConstraints = new java.awt.GridBagConstraints();
72 gridBagConstraints.gridx = 0;
73 gridBagConstraints.gridy = 0;
74 gridBagConstraints.gridwidth = 2;
75 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
76 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
77 gridBagConstraints.weightx = 1.0;
78 gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
79 getContentPane().add(descriptionLabel, gridBagConstraints);
80
81 org.openide.awt.Mnemonics.setLocalizedText(docsLabel, org.openide.util.NbBundle.getMessage(CTIntegrationMissingDialog.class, "CTIntegrationMissingDialog.docsLabel.text")); // NOI18N
82 docsLabel.setMinimumSize(new java.awt.Dimension(312, 16));
83 gridBagConstraints = new java.awt.GridBagConstraints();
84 gridBagConstraints.gridx = 0;
85 gridBagConstraints.gridy = 1;
86 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
87 gridBagConstraints.insets = new java.awt.Insets(0, 5, 5, 0);
88 getContentPane().add(docsLabel, gridBagConstraints);
89
90 org.openide.awt.Mnemonics.setLocalizedText(link, "<html><span style=\"color: blue; text-decoration: underline\">" + DOCS_PAGE_URL + "</span></html>");
91 link.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
92 link.addMouseListener(new java.awt.event.MouseAdapter() {
93 public void mouseClicked(java.awt.event.MouseEvent evt) {
94 linkMouseClicked(evt);
95 }
96 });
97 gridBagConstraints = new java.awt.GridBagConstraints();
98 gridBagConstraints.gridx = 1;
99 gridBagConstraints.gridy = 1;
100 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
101 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
102 gridBagConstraints.weightx = 1.0;
103 gridBagConstraints.insets = new java.awt.Insets(0, 5, 5, 5);
104 getContentPane().add(link, gridBagConstraints);
105
106 javax.swing.GroupLayout paddingPanelLayout = new javax.swing.GroupLayout(paddingPanel);
107 paddingPanel.setLayout(paddingPanelLayout);
108 paddingPanelLayout.setHorizontalGroup(
109 paddingPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
110 .addGap(0, 0, Short.MAX_VALUE)
111 );
112 paddingPanelLayout.setVerticalGroup(
113 paddingPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
114 .addGap(0, 0, Short.MAX_VALUE)
115 );
116
117 gridBagConstraints = new java.awt.GridBagConstraints();
118 gridBagConstraints.gridx = 0;
119 gridBagConstraints.gridy = 2;
120 gridBagConstraints.gridwidth = 2;
121 gridBagConstraints.weighty = 1.0;
122 getContentPane().add(paddingPanel, gridBagConstraints);
123
124 org.openide.awt.Mnemonics.setLocalizedText(okButton, org.openide.util.NbBundle.getMessage(CTIntegrationMissingDialog.class, "CTIntegrationMissingDialog.okButton.text")); // NOI18N
125 okButton.addActionListener(new java.awt.event.ActionListener() {
126 public void actionPerformed(java.awt.event.ActionEvent evt) {
127 okButtonActionPerformed(evt);
128 }
129 });
130 gridBagConstraints = new java.awt.GridBagConstraints();
131 gridBagConstraints.gridx = 1;
132 gridBagConstraints.gridy = 2;
133 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHEAST;
134 gridBagConstraints.insets = new java.awt.Insets(10, 5, 5, 5);
135 getContentPane().add(okButton, gridBagConstraints);
136
137 pack();
138 }// </editor-fold>//GEN-END:initComponents
139
140 private void linkMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_linkMouseClicked
142 try {
144 } catch (IOException | URISyntaxException e) {
145 LOGGER.log(Level.SEVERE, "Error opening link to: " + DOCS_PAGE_URL, e);
146 }
147 } else {
148 LOGGER.log(Level.WARNING, "Desktop API is not supported. Link cannot be opened.");
149 }
150 }//GEN-LAST:event_linkMouseClicked
151
152 private void okButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_okButtonActionPerformed
153 dispose();
154 }//GEN-LAST:event_okButtonActionPerformed
155
156 public void showDialog(JComponent parentComp) {
157 setLocationRelativeTo(parentComp == null ? getParent() : parentComp);
158 pack();
159 setVisible(true);
160 }
161
162 // Variables declaration - do not modify//GEN-BEGIN:variables
163 private javax.swing.JLabel link;
164 // End of variables declaration//GEN-END:variables
165}
synchronized static Logger getLogger(String name)
Definition Logger.java:124

Copyright © 2012-2024 Sleuth Kit Labs. Generated on:
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.